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 89 90 91 92
|
### SPAR <http://www.cpan.org/scripts/>
### 3 775 1168790726 1329052036 is_relevant.pl
have_cc and is_windows < 0 || is_windows == 1 ?
makepp( '-nfMakefile.relevant' ) : # Let makepp test if it uses a -l capable compiler.
!is_windows
### 5 644 1077141637 1186229250 Makefile.relevant
$(phony x):
iftrue $(filter %cl %cl.exe %bcc32 %bcc32.exe, $(CC))
perl { die }
endif
### 57 644 1160341077 1382888684 RootMakeppfile
#
# Test various things about the lexer, command parsers and C scanner:
# 1) Splitting command up into multiple lines;
# 2) Ignoring the echo with quoted string;
# 3) Handling -lxyz.
# 4) Whether a program is automatically recognized as an implicit dependency.
# 5) Whether register_input_suffix works
#
# Also tests the builtin rule picking up xyz dependencies for xyz.exe on Windows.
#
$(phony all):
.$/main
CPP := $(find-program cpp)
ifeq cpp, $(CPP)
register_input_suffix $(CPP) .vpp
%.v: %.vpp
$(CPP) $< > $@
all: b.v
c.v:
&touch c.v
plus = + 2
endif
&expr '(6 $(plus)) . (Mpp::is_windows ? " 2 0" : " 1 0")' -o answers/n_files
main: LDLIBS = -L. -lxyz
main: xyz1.o
%.o : %.c
@echo Compiling $(input)
echo dummy > /dev/null; $(CC) $(CFLAGS) -c $(input) -o $(output)
echo ' ; gcc a.c ' > /dev/null # Tests ignoring semicolon in quotes
libxyz.a : xyz.o
ifnsys Darwin
$(AR) rs $(output) $(inputs)
else
$(AR) r $(output) $(inputs)
ranlib $(output)
endif
#
# This target should be made:
#
xyz.h:
@&echo 'int xyz();' -o $(output)
#
# This target should not be made.
#
a.c :
&touch $@
### 1 644 1080322036 1080160284 b.vpp
#include "c.v"
### 9 644 1080322036 1210245158 main.c
#include "xyz.h"
int xyz1();
int
main()
{
return xyz();
}
### 4 644 1080322036 1080160259 xyz.c
int xyz()
{
return 0;
}
### 4 644 1080322036 1080160259 xyz1.c
int xyz1()
{
return 0;
}
### D 755 1080322113 1080161189 answers/
|