bootstrap: Build files only once.

* build-aux/bootstrap.sh.in: Build files only once.
This commit is contained in:
Jan Nieuwenhuizen 2019-12-07 23:29:34 +01:00
parent 82c85c24da
commit 093a8b0903
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
4 changed files with 22 additions and 14 deletions

View File

@ -49,9 +49,11 @@ 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
echo " CC $c"
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
o=$(basename $c .c).o
fi
objects="$objects $o"
done
echo " AR $mes_cpu-mes/libc-mini.a"
@ -59,9 +61,11 @@ $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
echo " CC $c"
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
o=$(basename $c .c).o
fi
objects="$objects $o"
done
echo " AR $mes_cpu-mes/libc.a"
@ -69,9 +73,11 @@ $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
echo " CC $c"
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
o=$(basename $c .c).o
fi
objects="$objects $o"
done
echo " AR $mes_cpu-mes/libc+tcc.a"
@ -83,9 +89,11 @@ 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
echo " CC $c"
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
o=$(basename $c .c).o
fi
objects="$objects $o"
done
echo " CCLD src/mes"

View File

@ -47,7 +47,7 @@ libc_mini_SOURCES="$libc_mini_shared_SOURCES"
if test $mes_libc = mes; then
libc_mini_SOURCES="$libc_mini_SOURCES
lib/mes/write.c
lib/mes/mini-write.c
"
fi
@ -101,7 +101,7 @@ lib/posix/getcwd.c
lib/posix/getenv.c
lib/posix/isatty.c
lib/posix/open.c
lib/posix/read.c
lib/posix/buffered-read.c
lib/posix/setenv.c
lib/posix/wait.c
lib/stdio/fgetc.c