mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-02-06 22:45:27 +00:00
Formerly build.template.~3~
This commit is contained in:
parent
099b4d5643
commit
fae8065d7f
1 changed files with 14 additions and 9 deletions
|
@ -41,20 +41,25 @@ includedir=${prefix}/include
|
||||||
# Exit as soon as any command fails.
|
# Exit as soon as any command fails.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
globobjs="%globobjs%"
|
# These are all the objects we need to link together.
|
||||||
|
objs="%objs% ${extras} ${ALLOCA}"
|
||||||
# To make life simpler, just copy the glob sources into this directory.
|
|
||||||
for file in `echo ${globobjs} | sed 's/\.o/.c/g'`; do
|
|
||||||
ln ${srcdir}/glob/$file $file || cp ${srcdir}/glob/$file $file
|
|
||||||
done
|
|
||||||
|
|
||||||
objs="%objs% ${globobjs} ${extras} ${ALLOCA}"
|
|
||||||
|
|
||||||
|
# Compile the source files into those objects.
|
||||||
for file in `echo ${objs} | sed 's/\.o/.c/g'`; do
|
for file in `echo ${objs} | sed 's/\.o/.c/g'`; do
|
||||||
echo compiling ${file}...
|
echo compiling ${file}...
|
||||||
$CC $CFLAGS $defines -c -I. -I${srcdir} -I${srcdir}/glob ${srcdir}/$file
|
$CC $CFLAGS $defines -c -I. -I${srcdir} -I${srcdir}/glob ${srcdir}/$file
|
||||||
done
|
done
|
||||||
|
|
||||||
echo linking make
|
# The object files were actually all put in the current directory.
|
||||||
|
# Remove the source directory names from the list.
|
||||||
|
srcobjs="$objs"
|
||||||
|
objs=
|
||||||
|
for obj in $srcobjs; do
|
||||||
|
objs="$objs `basename $obj`"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Link all the objects together.
|
||||||
|
echo linking make...
|
||||||
$CC $LDFLAGS $objs $LOADLIBES -o make.new
|
$CC $LDFLAGS $objs $LOADLIBES -o make.new
|
||||||
|
echo done
|
||||||
mv -f make.new make
|
mv -f make.new make
|
||||||
|
|
Loading…
Reference in a new issue