build: Cater for FreeBSD.

* build-aux/bootstrap.sh.in: Add test ! -e -o to satisfy FreeBSD test.
Fixes skipping over all compilations.
* build-aux/cc.sh (compile): Likewise.
This commit is contained in:
Jan Nieuwenhuizen 2019-12-11 13:04:27 +00:00
parent ec9aecea07
commit e354d8b165
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
2 changed files with 5 additions and 5 deletions

View file

@ -50,7 +50,7 @@ cp crt1.s $mes_cpu-mes
objects= objects=
for c in $libc_mini_SOURCES; do for c in $libc_mini_SOURCES; do
o=$(basename $c .c).o o=$(basename $c .c).o
if test ${srcdest}$c -nt $o; then if test ! -e $o -o ${srcdest}$c -nt $o; then
echo " CC $c" echo " CC $c"
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
fi fi
@ -62,7 +62,7 @@ $AR crD $mes_cpu-mes/libc-mini.a $objects
objects= objects=
for c in $libc_SOURCES; do for c in $libc_SOURCES; do
o=$(basename $c .c).o o=$(basename $c .c).o
if test ${srcdest}$c -nt $o; then if test ! -e $o -o ${srcdest}$c -nt $o; then
echo " CC $c" echo " CC $c"
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
fi fi
@ -74,7 +74,7 @@ $AR crD $mes_cpu-mes/libc.a $objects
objects= objects=
for c in $libc_tcc_SOURCES; do for c in $libc_tcc_SOURCES; do
o=$(basename $c .c).o o=$(basename $c .c).o
if test ${srcdest}$c -nt $o; then if test ! -e $o -o ${srcdest}$c -nt $o; then
echo " CC $c" echo " CC $c"
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
fi fi
@ -90,7 +90,7 @@ CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kern
objects= objects=
for c in $mes_SOURCES; do for c in $mes_SOURCES; do
o=$(basename $c .c).o o=$(basename $c .c).o
if test ${srcdest}$c -nt $o; then if test ! -e $o -o ${srcdest}$c -nt $o; then
echo " CC $c" echo " CC $c"
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
fi fi

View file

@ -22,7 +22,7 @@ compile () {
b=$(basename $c .c) b=$(basename $c .c)
o=$b.o o=$b.o
objects="$objects $o" objects="$objects $o"
if test $c -nt $o; then if test ! -e $o -o $c -nt $o; then
trace "CC $c" $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS -o $o $c trace "CC $c" $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS -o $o $c
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS -o $o $c $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS -o $o $c
fi fi