File: 2005_03_31_scanfail.test

package info (click to toggle)
makepp 2.0.98.5-2.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,744 kB
  • sloc: perl: 15,893; makefile: 38; javascript: 25; sh: 1
file content (48 lines) | stat: -rw-r--r-- 1,068 bytes parent folder | download | duplicates (3)
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
###	SPAR <http://www.cpan.org/scripts/>
###	1	644	1329052295	1329052295	is_relevant.pl
have_cc
###	17	644	1159374480	1186006640	Makeppfile
ifeq $(filter %cl %cl.exe %bcc32 %bcc32.exe, $(CC))
  $(phony default): x.o
else
  $(phony default): x.obj
endif

ifndef NORULE
 x.x:
 ifdef BROKEN
	perl { die "FAIL" }
 else
	&echo "#define X" -o $@
 endif # BROKEN
endif # NORULE

%.h: %.x
	&cp $< $@
###	20	755	1164351460	1112308605	makepp_test_script.pl
# Make sure that the include directive is cached even if we can't find the
# include file.
eval { makepp 'NORULE=1' } and die;
open my $mk, '.makepp/x.c.mk';
my $inc = 0;
while( <$mk> ) {
  $inc++ if /INCLUDES=.*x.h/;
}
die if !$inc;

# Now just make sure that it builds.
makepp;

# Finally, make sure that when we update x.x on behalf of cached scanner
# info, we get a good diagnostic.
eval { makepp 'BROKEN=1' } and die;
n_files 0, sub { $fail++ if /because .*x.x failed to build/ };
die if !$fail;

1;
###	4	644	1112308158	1112308295	x.c
#include "x.h"
#ifndef X
# error
#endif
###	D	755	1112308158	1112308295	answers