1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

conf.sh: avoid pointless reruns (re: 33b6718b)

Same idea as in the referenced commit.

src/lib/libast/comp/conf.sh:
- If an output header file has not changed after rerunning conf.sh,
  still update the output file's timestamp using touch(1) to signal
  that the test has already been run.
This commit is contained in:
Martijn Dekker 2021-01-19 23:05:39 +00:00
parent 7c7128e496
commit a75d0dfa18

View file

@ -1567,7 +1567,7 @@ extern const int prefix_elements;
} > $tmp.2 } > $tmp.2
case $debug in case $debug in
-d7) echo $command: $tmp.2 ${base}.h ;; -d7) echo $command: $tmp.2 ${base}.h ;;
*) cmp -s $tmp.2 ${base}.h 2>/dev/null || mv $tmp.2 ${base}.h ;; *) cmp -s "$tmp.2" "${base}.h" 2>/dev/null && touch "${base}.h" || mv "$tmp.2" "${base}.h" ;;
esac esac
case $verbose in case $verbose in
@ -1624,7 +1624,7 @@ const int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]);
} > $tmp.4 } > $tmp.4
case $debug in case $debug in
-d7) echo $command: $tmp.4 ${base}.c ;; -d7) echo $command: $tmp.4 ${base}.c ;;
*) cmp -s $tmp.4 ${base}.c 2>/dev/null || mv $tmp.4 ${base}.c ;; *) cmp -s "$tmp.4" "${base}.c" 2>/dev/null && touch "${base.c}" || mv "$tmp.4" "${base}.c" ;;
esac esac
# limits.h generation code # limits.h generation code
@ -1646,6 +1646,6 @@ test -f $tmp.l && cat $tmp.l
} > $tmp.5 } > $tmp.5
case $debug in case $debug in
-d7) echo $command: $tmp.5 ${base}.h ;; -d7) echo $command: $tmp.5 ${base}.h ;;
*) cmp -s $tmp.5 ${base}.h 2>/dev/null || mv $tmp.5 ${base}.h ;; *) cmp -s "$tmp.5" "${base}.h" 2>/dev/null && touch "${base}.h" || mv "$tmp.5" "${base}.h" ;;
esac esac
exit 0 exit 0