File: 2004_03_31_stale.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 (77 lines) | stat: -rw-r--r-- 1,739 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
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
###	SPAR <http://www.cpan.org/scripts/>
###	11	755	1119219345	1231331952	makepp_test_script.pl
makepp qw(gone2 generated stale);
c_cp 'generated', 'generated-1';
c_cp 'stale', 'stale-1';

unlink 'gone';
eval { makepp qw(-k --rm-stale) };
c_cp 'generated', 'generated-2';
c_cp 'stale', 'stale-2';
-f 'subdir/foo' or die; # Verify that it wasn't spuriously removed by makepp

makepp qw(generated stale x STALE=1);
###	37	644	1151616989	1231331948	Makeppfile
$(phony default): *

perl_begin
    # Test that command line variables are accessible in Perl
    $MY_STALE = $makefile->expand_variable( 'STALE' );
perl_end

a: d
    &touch $@

ifndef STALE
 b:
    &touch $@
endif

register_input_suffix echo .x
d: d.x : parser c_compilation
    echo $< > $@

x:
    &echo $(MY_STALE) -o $@

# Fake makepp into thinking that '0' will be a directory
0/y:
    &touch $@

gone2: gone1
       &cp gone1 gone2

gone1: gone
       &cp gone gone1

generated:
    &echo $(only_generated *) -o $@

stale:
    &echo $(only_stale *) -o $@
###	0	644	1080781634	1080781634	c
###	2	644	1119219345	1080782214	d.x
#include "subdir/foo"
#include "0"
###	0	644	1231330532	1231330532	gone
###	D	755	1080782838	1080782836	subdir
###	4	644	1080782838	1080782836	subdir/Makeppfile
bar:
	&touch foo bar

prebuild bar
###	D	755	1080782838	1080782836	answers
###	1	644	1080782836	1080782836	answers/generated
a b d generated stale x
###	1	644	1080782836	1080782836	answers/generated-1
gone1 gone2
###	1	644	1080782836	1080782836	answers/generated-2
a b d generated gone1 gone2 stale
###	1	644	1080782836	1080782836	answers/stale
b
###	1	644	1080782836	1080782836	answers/stale-1

###	1	644	1080782836	1080782836	answers/stale-2

###	1	644	1080782836	1080782836	answers/x
1