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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
### SPAR <http://www.cpan.org/scripts/>
### 2 644 1381956736 1382127816 hint
Ccache at least up to version 3.1.9 is known to make this test die,
bug report https://bugzilla.samba.org/show_bug.cgi?id=8728 refers.
### 1 644 1329052295 1329052295 is_relevant.pl
have_cc
### 28 644 1099447329 1381956819 makepp_test_script.pl
local $ENV{CCACHE_DISABLE} = 1 if $ENV{AUTOMATED_TESTING}; # Else faile with hint to let user know.
makepp 'BUILD=1';
print "Checking that ./x exits nonzero...\n";
-x 'x' or die;
system './x' or die;
c_cp qw(targlist targlist-1);
# The x.o timestamp has to change, or else we might not rebuild x
wait_timestamp 'x.o';
makepp '--rm_stale';
c_cp qw(targlist targlist-2);
# Scanner removed the stale include file:
-f 'stale2' and die;
print "Checking that building a stale file results in an error...\n";
eval { makepp qw(--rm_stale stale) } and die;
c_echo '/* Repos */', '-orepos/stale1';
makepp qw(--rm_stale stale1);
1;
### 25 644 1099447411 1099447387 Makeppfile
repository repos
CFLAGS := -I inc
ifdef BUILD
$(phony default): stale1 stale2 repos/stale x targlist frail2
perl {}
else
$(phony default): x targlist
./x
endif
ifdef BUILD
stale$(foreach): : foreach 1 2
&echo "/* $@ */" -o $@
endif
frail%: stale%
&cp $< $@
targlist:
&echo $(wildcard frail* stale*) -o $@
oldlist:
&echo $(only_stale frail* stale*) -o $@
### 6 644 1099422033 1099421990 x.c
#define RETURN return 1
#include "stale2"
int main() {
RETURN;
}
### D 755 1099447412 1099447412 inc
### 2 644 1099422496 1099422491 inc/stale2
#undef RETURN
#define RETURN return 0
### D 755 1099447412 1099447412 repos
### 7 644 1099421311 1099421301 repos/Makeppfile
$(phony default):
perl {}
ifdef BUILD
stale:
&echo $@ -o $@
endif
### D 755 1099447412 1099447366 answers
### 1 644 1099447362 1099447333 answers/stale1
/* Repos */
### 1 644 1099447358 1099447329 answers/targlist-1
frail1 frail2 stale1 stale2
### 1 644 1099447362 1099447333 answers/targlist-2
|