chiark / gitweb /
test/example/check: Reset times for regen tests
[subdirmk.git] / tests / example / check
1 #!/bin/sh
2 set -ex
3
4 cd example
5
6 SUBDIRMK_REGEN_NDEBUG=''
7 export SUBDIRMK_REGEN_NDEBUG
8
9 : ----- in-tree build -----
10
11 git clean -xdff
12 ./autogen.sh && ./configure
13 make -j4 all check
14 make -j4 clean
15 make -j4 all check
16
17 : ----- out of tree build -----
18
19 git clean -xdff
20 mkdir build
21 cd build
22 >>../src/for-test.sd.mk
23 >>../lib/for-test.mk.in
24 .././autogen.sh && ../configure
25 make -j4 all check
26
27 : ----- testing rebuild on input change -----
28
29 reset_times () {
30         find -type f -print0 \
31         | xargs -0 \
32         touch -hmd 'now -1 seconds' --
33 }
34
35 : ----- for-check-1 -----
36 reset_times
37 echo 'for-check-1:' >>../src/for-test.sd.mk
38 make -j4 for-check-1
39 grep '^for-check-1:' src/Subdir.mk || false
40
41 : ----- for-check-2 -----
42 reset_times
43 echo 'for-check-2:' >>../lib/for-test.mk.in
44 make -j4 for-check-2
45 grep '^for-check-2:' lib/for-test.mk || false
46
47 echo ok.