blob: 4ac377f9be718574de1a9c6710e911571595cfbc (
plain)
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
|
# -*-perl-*-
$description = "Test make -B (always remake) option.\n";
$details = "\
Construct a simple makefile that builds a target.
Invoke make once, so it builds everything. Invoke it again and verify
that nothing is built. Then invoke it with -B and verify that everything
is built again.";
&touch('bar.x');
run_make_test('
.SUFFIXES:
.PHONY: all
all: foo
foo: bar.x
@echo cp $< $@
@echo "" > $@
',
'', 'cp bar.x foo');
run_make_test(undef, '', "#MAKE#: Nothing to be done for `all'.");
run_make_test(undef, '-B', 'cp bar.x foo');
# Put the timestamp for foo into the future; it should still be remade.
utouch(1000, 'foo');
run_make_test(undef, '', "#MAKE#: Nothing to be done for `all'.");
run_make_test(undef, '-B', 'cp bar.x foo');
# Clean up
rmfiles('bar.x', 'foo');
1;
|