5 # This script attempts to build the codebase in every possible header configuration,
6 # to check that all files #include what they need, so that we can eventually move away
7 # from a unity build and into incremental compilation.
9 # If these files exist from previous compilation, `./all compile` will stop
10 # detecting changes after running this script so delete them to trigger
11 # a recompile next time.
12 if [ -f ../../csprogs.dat ]; then
16 if [ -f ../../menu.dat ]; then
20 if [ -f ../../progs.dat ]; then
27 : ${QCC:=$PWD/../../../../gmqcc/gmqcc}
32 -DWATERMARK="\"$(git describe --tags --dirty='~')\""
37 QCCDEFS="${QCCDEFS[@]}"
50 -Wno-implicit-function-pointer
51 -Wno-missing-return-values
53 QCCFLAGS="${QCCFLAGS[@]} ${NOWARN[@]}"
59 declare -l prog="${1}"
60 declare -l file="${2}"
62 includes="-include lib/_all.inc"
63 [ -f ${prog}/_all.qh ] && includes="${includes} -include ${prog}/_all.qh"
64 qpp ${file} test.dat \
66 -I. ${QCCIDENT} ${QCCDEFS} > ${WORKDIR}/${prog}.qc
67 qcc ${QCCFLAGS} -o ../${WORKDIR}/test.dat ../${WORKDIR}/${prog}.qc >/dev/null
71 declare -l prog="${1}"
72 find ${prog} -type f -name '*.qc' -print0 | sort -z | while read -r -d '' file; do
73 check1 ${prog} ${file}