File: 2004_02_19_repository_change.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 (96 lines) | stat: -rw-r--r-- 2,262 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
###	SPAR <http://www.cpan.org/scripts/>
###	1	775	1168790726	1329052044	is_relevant.pl
have_cc and is_windows ? makepp( '-n' ) : 1; # Let makepp test if it uses a symlink capable compiler.
###	61	644	1159479798	1381667483	makepp_test_script.pl
sub sed_17($) {
  # Make sure that the foo.c timestamp changes
  wait_timestamp 'foo.c';

  c_sed "s/17/$_[0]/", 'foo/f.c', '-ofoo/foo.c';
}

sub from_rep($) {
  c_cp 'foo/bar/x', $_[0];
  open my $in, 'foo/bar/.makepp/foo.c.mk';
  /FROM_REPOSITORY/ and return while <$in>;

  open my $out, ">>$_[0]";
  print $out "No repository\n";
}

c_cp qw(M foo/Makeppfile);
makepp qw(-R foo/bar=foo foo/bar/nothing);

unlink 'foo/Makeppfile';
makepp qw(-R foo/bar=foo);

c_cp qw(M foo/Makeppfile);
c_cp qw(foo/f.c foo/foo.c);
makepp qw(-R foo/bar=foo foo/bar/x);

from_rep 'x0';

sed_17 18;
makepp qw(-R foo/bar=foo foo/bar/x);

from_rep 'x1';

makepp \'clean', '--only-repository-links', 'foo/bar';
c_cp qw(foo/f.c foo/foo.c);	# If we had not just cleaned, this would sometimes invalidate foo/bar/foo.c!
wait_timestamp 'foo/bar/foo';
makepp 'foo/x';

wait_timestamp 'foo/foo', 'foo/bar/foo';
# This should pick up x from foo/
makepp qw(-R foo/bar=foo foo/bar/x);

from_rep 'x2';

sed_17 18;
# Don't check signatures (\''), because foo/bar/* is out of date
makepp \'', 'foo/x';
makepp \'clean', '--only-repository-links', 'foo/bar';

# This should pick up x from foo/
makepp qw(-R foo/bar=foo foo/bar/x);

from_rep 'x3';

sed_17 19;
# Now it should recompile, but still remember that foo.c comes from a repos
makepp qw(-R foo/bar=foo foo/bar/x);

from_rep 'x4';

1;
###	5	644	1077141637	1186229250	Makeppfile
$(phony x):

iftrue $(filter %cl %cl.exe %bcc32 %bcc32.exe, $(CC))
  perl { die }
endif
###	5	644	1077143366	1077143363	M
$(phony nothing):
	@perl {}

x: foo
	.$/foo > $@
###	D	755	1077216823	1077216823	foo
###	5	644	1077143391	1077143389	foo/f.c
#include <stdio.h>
int main() {
	printf("17\n");
	return 0;
}
###	D	755	1077216767	1077216766	foo/bar
###	D	755	1077216766	1077216761	answers
###	1	644	1077144030	1077144018	answers/x0
17
###	1	644	1077144030	1077144018	answers/x1
18
###	1	644	1077216767	1077216761	answers/x2
17
###	1	644	1077216767	1077216761	answers/x3
18
###	1	644	1077216767	1077216761	answers/x4
19