1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#! /bin/sh -e
umask 022
package/packagecheck || exit 1
here=`env - PATH=$PATH pwd`
mkdir -p compile
test -r compile/home || echo $here > compile/home
test -h compile/src || ln -s $here/src compile/src
echo 'Linking ./src/* into ./compile...'
for i in `ls src` ; do
test -h compile/$i || ln -s src/$i compile/$i
done
echo 'Compiling everything in ./compile...'
( cd compile;
gmake -v >/dev/null 2>/dev/null && exec env gmake MYMAKE=gmake
exec make
) || exit 1
doit() {
WHAT=$1
DIR=$2
ALL=`cat package/$WHAT 2>/dev/null || true`
if test "x$ALL" = x ; then
return;
fi
mkdir -p $DIR
echo "Copying $WHAT into ./$DIR..."
for i in $ALL ; do
rm -f $DIR/$i'{new}'
cp -p compile/$i $DIR/$i'{new}'
mv -f $DIR/$i'{new}' $DIR/$i
done
}
doit documentation doc
if test -f package/finish ; then
. package/finish
fi
|