1###	SPAR <http://www.cpan.org/scripts/>
2###	3	644	1181596243	1181903567	makepp_test_script.pl
3eval { makepp 'abc.inaa' } and die;
4eval { makepp 'a.xaa' } and die;
5makepp;
6###	92	644	1175559408	1181906278	Makeppfile
7#
8# This makeppfile tests pattern rules.
9#
10
11.PHONY: all
12
13INFILES = abc def xyz
14
15all: $(INFILES).out2 a.x b.x xyz.lc live.yoghurt abc.ina a.xa a.n
16
17# Potential endless loop shall abort both based on files already existing and
18# on ones to be discovered in the future.
19%a: %
20	&cp -l $(input) $(output)
21
22# static pattern rule
23a.x b.x : %.x : %.y
24      &cat $^ -o $@
25
26a.y b.y :
27	&echo $@ -o $@
28
29#
30# A pattern rule that builds off another pattern rule, and also has
31# two pattern dependencies:
32#
33%.out2: %.out %.in
34	&echo $@ -o $@
35	&cat $^ -o>>$@
36
37#
38# A pattern rule that overrides another pattern rule:
39#
40x%.out2: x%.out
41	&echo $@ -o $@
42	&echo "(File $@ is another exception.)" -o>>$@
43	&cat $^ -o>>$@
44
45#
46# GNU make style pattern rule.  Note that this tests using an alternate name
47# for the directory.
48#
49%.out: ./%.in
50	&echo $@ -o $@
51	&cat $^ -o>>$@
52
53#
54# Another GNU make style pattern rule. Here the pattern is in the second dependency.
55#
56%.yoghurt: bacteria ./%.cream
57	&echo $@ -o $@
58	&cat $^ -o>>$@
59
60#
61# Pattern rule overridden by a explicit rule:
62#
63xyz.out: xyz.in subdir/percent_subdirs_test
64	&echo $@ -o $@
65	&echo "(File $@ is an exception.)" -o>>$@
66	&cat $^ -o>>$@
67
68#
69# Do mixed case rules work, especially when not case sensitive?
70#
71%.Uc: %.in
72	&cp -l $(input) $(output)
73
74%.lc: %.Uc
75	&cp -l $(input) $(output)
76
77# Long chain, partially ordered forward, partially backward:
78%.q: %.r
79	&cp -l $(input) $(output)
80%.p: %.q
81	&cp -l $(input) $(output)
82%.o: %.p
83	&cp -l $(input) $(output)
84%.n: %.o
85	&cp -l $(input) $(output)
86
87%.r: %.s
88	&cp -l $(input) $(output)
89%.s: %.t
90	&cp -l $(input) $(output)
91%.t: %.u
92	&cp -l $(input) $(output)
93%.u: %.v
94	&cp -l $(input) $(output)
95%.v: %.w
96	&cp -l $(input) $(output)
97%.w: %.x
98	&cp -l $(input) $(output)
99###	1	644	1175559408	965501121	abc.in
100abc
101###	1	644	1175559408	1175558557	bacteria
102must be present for good live yoghurt
103###	1	644	1175559408	965501124	def.in
104def
105###	1	644	1175559408	1175558557	live.cream
106rich, creamy goodness
107###	1	644	1175559408	965501136	xyz.in
108xyz
109###	D	755	1175559408	990032657	subdir/
110###	12	644	1175559408	990032469	subdir/Makeppfile
111#
112# This file tests pattern rules with the percent_subdirs turned on, so
113# the same rule applies to several subdirectories.
114#
115makepp_percent_subdirs = 1		# Allow % to refer to subdirectories, too.
116
117%.out: %.in
118	&echo $@ -o $@
119	&cat $^ -o>>$@
120
121percent_subdirs_test : **/*.out
122	&cat $^ -o>>$@
123###	24	644	1175559408	990032639	subdir/percent_subdirs_test
124suba/a.out
125a
126suba/subb/b.out
127b
128subc/c.out
129c
130suba/a.out
131a
132suba/subb/b.out
133b
134subc/c.out
135c
136suba/a.out
137a
138suba/subb/b.out
139b
140subc/c.out
141c
142suba/a.out
143a
144suba/subb/b.out
145b
146subc/c.out
147c
148###	D	755	1175559408	990032657	subdir/suba/
149###	1	644	1175559408	990031804	subdir/suba/a.in
150a
151###	D	755	1175559408	990032657	subdir/suba/subb/
152###	1	644	1175559408	990031797	subdir/suba/subb/b.in
153b
154###	D	755	1175559408	990032657	subdir/subc/
155###	1	644	1175559408	990031835	subdir/subc/c.in
156c
157###	D	755	1175559459	1175559461	answers/
158###	1	444	1175559408	1104356247	answers/a.x
159a.y
160###	1	444	1175559408	1104356247	answers/a.y
161a.y
162###	1	444	1175559408	1104356247	answers/b.x
163b.y
164###	1	444	1175559408	1104356247	answers/b.y
165b.y
166###	3	644	1175559408	1175558694	answers/live.yoghurt
167live.yoghurt
168must be present for good live yoghurt
169rich, creamy goodness
170###	1	644	1175559408	1190053902	answers/n_files
17129 1 0
172###	1	444	1175559408	1104356247	answers/xyz.lc
173xyz
174