+#! /bin/sh
case $CONFIG in
'')
if test -f config.sh; then TOP=.;
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
+
+: ${bin_sh=/bin/sh}
+
echo "Extracting makedepend (with variable substitutions)"
rm -f makedepend
$spitshell >makedepend <<!GROK!THIS!
$cat /dev/null >.deptmp
$rm -f *.c.c c/*.c.c
if test -f Makefile; then
+ rm -f $firstmakefile
cp Makefile $firstmakefile
fi
mf=$firstmakefile
if $test -s .deptmp; then
for file in `cat .shlist`; do
$echo `$expr X$file : 'X\(.*\).SH'`: $file $TOP/config.sh \; \
- /bin/sh $file >> .deptmp
+ $bin_sh $file >> .deptmp
done
$echo "Updating $mf..."
$echo "# If this runs make out of memory, delete /usr/include lines." \
$sed -f .hsed >> $mf.new
for file in `$cat .shlist`; do
$echo `$expr X$file : 'X\(.*\).SH'`: $file $TOP/config.sh \; \
- /bin/sh $file >> $mf.new
+ $bin_sh $file >> $mf.new
done
fi
$rm -f $mf.old
$cp $mf $mf.old
+$rm -f $mf
$cp $mf.new $mf
$rm $mf.new
$echo "# WARNING: Put nothing here or make depend will gobble it up!" >> $mf