Debian Codegraph @

package/compile

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