###	SPAR <http://www.cpan.org/scripts/>
###	1	644	1329052295	1329052295	is_relevant.pl
have_cc
###	24	755	1154546812	1342866673	makepp_test_script.pl
my $x = is_windows > 0 ? '.\\x' : './x';
makepp;
system $x or die 1;

# Make sure error status propagates if we need something that failed to build
# on behalf of cached scanner info earlier.
eval { makepp 'ERROR=1' } and die 2;

wait_timestamp 'x.o';
makepp;
system $x or die 3;

# Make sure that we can fail to build on behalf of cached scanner info, and
# still succeed if we didn't actually need the target that failed to build.
wait_timestamp 'x.o';
makepp 'ERROR=1', 'NOINC=1';
 system $x and die 4;

# Make sure we rescan (not just rebuild) if x.c changes.
c_sed 's/^$/#include "z.h"/', '-o+<x.c';

wait_timestamp 'x.o';
makepp 'ERROR=1', 'NOINC=1';
system $x or die 6;
###	21	644	1113579093	1102389344	Makeppfile
$(phony default): x

x.h:
ifdef ERROR
	perl { die "Oops\n" }
else
	&echo '#undef X\n#define X 1' -o $@
endif

y.h:
ifdef NOINC
	&echo -o $@
else
	&echo '#include "x.h"' -o $@
endif

z.h:
	&echo '#undef X\n#define X 1' -o $@

x.o: x.c : smartscan
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $(input) -o $(output)
###	4	644	1102389274	1102389240	x.c
#define X 0
#include "y.h"

int main() { return X; }