]> rtime.felk.cvut.cz Git - omk.git/blob - tests/headers-generated
Update wvtool
[omk.git] / tests / headers-generated
1 #!/bin/bash
2
3 . ./functions.sh
4
5 make default-config || error "Can't run make default-config"
6 make include-pass || error "Can't run make include-pass"
7
8 eval $(make omk-get-var VAR=COMPILED_DIR_NAME|grep ^COMPILED_DIR_NAME)
9
10 GC=$COMPILED_DIR_NAME/include/global.h
11 test -f "$GC" || error "Can't find the produced global config"
12
13 grep -Fv "/* config files:" $GC | diff -u correct/global.h - || error "Global config differs"
14
15 needs_valid_CC
16 make || error "Can't run make to produce local config"
17 make CFLAGS=-Wall || error "Make failed with custom CFLAGS"
18 LC=$(find _build -wholename '*/lincan/lincan_config.h')
19 test -f "$LC" || error "Can't find the produced local config"
20 grep -Fv "/* config files:" $LC | diff -u correct/lincan_config.h - || error "Local config differs"
21
22 TLC=$(find _build -name 'toplevel_config.h')
23 test -f "$TLC" || error "Can't find the produced local config"
24 grep -Fv "/* config files:" $TLC | diff -u correct/toplevel_config.h - || error "Toplevel local config differs"
25
26 touch -t 200001010000 $LC
27 stat -c '%z' $LC > stat.log1
28 touch config.omk-default
29 make
30 stat -c '%z' $LC > stat.log2
31 diff stat.log1 stat.log2 || error "Generated config changed without without reason"