From e354d8b1657eda7541309ad86786afd79ac139b4 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 11 Dec 2019 13:04:27 +0000 Subject: [PATCH] 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. --- build-aux/bootstrap.sh.in | 8 ++++---- build-aux/cc.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build-aux/bootstrap.sh.in b/build-aux/bootstrap.sh.in index 59de6585..1fbd38df 100644 --- a/build-aux/bootstrap.sh.in +++ b/build-aux/bootstrap.sh.in @@ -50,7 +50,7 @@ cp crt1.s $mes_cpu-mes objects= for c in $libc_mini_SOURCES; do 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" $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c fi @@ -62,7 +62,7 @@ $AR crD $mes_cpu-mes/libc-mini.a $objects objects= for c in $libc_SOURCES; do 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" $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c fi @@ -74,7 +74,7 @@ $AR crD $mes_cpu-mes/libc.a $objects objects= for c in $libc_tcc_SOURCES; do 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" $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c fi @@ -90,7 +90,7 @@ CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kern objects= for c in $mes_SOURCES; do 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" $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c fi diff --git a/build-aux/cc.sh b/build-aux/cc.sh index 28a21802..1a99e95f 100755 --- a/build-aux/cc.sh +++ b/build-aux/cc.sh @@ -22,7 +22,7 @@ compile () { b=$(basename $c .c) o=$b.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 $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS -o $o $c fi