chiark / gitweb /
a5b27ba043da0ce0485ff9ad9a509747557f21ee
[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 echo '# for-check 1' >>../src/for-test.sd.mk
30 make -j4
31 grep '^# for-check 1' src/Subdir.mk || false
32
33 echo '# for-check 2' >>../lib/for-test.mk.in
34 make -j4
35 grep '^# for-check 2' lib/for-test.mk || false
36
37 echo ok.