diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2011-03-07 16:20:57 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2011-03-07 16:20:57 -0500 |
commit | 5a149a1d280b57f60af827fe8ba7aa7fb674a2d1 (patch) | |
tree | 5b6f34af68fce1c6dbee2b8c0f627a022535c987 | |
parent | 381376b2be2b433598c082d741d08c079befae62 (diff) |
Add cleanonly option to do_build script.
-rwxr-xr-x | do_build.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/do_build.pl b/do_build.pl index 14c6553..f29b1eb 100755 --- a/do_build.pl +++ b/do_build.pl @@ -19,7 +19,8 @@ die "Bad arguments" unless defined($type); my $resume = shift @ARGV; my $config_only = defined($resume) && ($resume eq 'configonly'); -$resume = undef if $config_only; +my $clean_only = defined($resume) && ($resume eq 'cleanonly'); +$resume = undef if $config_only || $clean_only; chdir($basedir) or die "Failed to change directory to $basedir: $!\n"; @@ -89,7 +90,11 @@ for (@$ref) { } system($cmd) and do { print FH "ERROR: Autogen of '$dir' was UNSUCCESSFUL!!!\n"; die }; exit if $config_only; - system('make clean') and do { print FH "ERROR: Clean of '$dir' was UNSUCCESSFUL!!!\n"; die } + if ($clean_only) { + system('make distclean') and do { print FH "ERROR: Clean of '$dir' was UNSUCCESSFUL!!!\n"; die }; + next; + } + system('make clean') and do { print FH "ERROR: Clean of '$dir' was UNSUCCESSFUL!!!\n"; die }; } # Build |