summaryrefslogtreecommitdiff
path: root/bin/reverse_clean
blob: 37d77daee50ded638ecdfc18a1f0e46c8176dec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
    & eval 'exec perl -S $0 $argv:q'
    if 0;
# -*- perl -*-
# $Id$
#
# This script does a realclean of the list in the reverse order that
# is passed to this. This is just a utility script

@ARGS = ();

if ($ARGV[0] eq ''){
    print STDERR "$0:  No directories provided\n";
    die "provide list of directories";
}       

my $make = $ARGV[0];
shift;

@BUILD_LIST = @ARGV;


foreach $i (reverse (@BUILD_LIST)) {
    system ("$make -k -C $i realclean");
}