2 # $Id: Build,v 1.3 2005/05/08 15:55:26 taco Exp $
4 # builds new metapost binary.
5 # this is a temporary hack, it simply copies the source dir to the build dir.
6 # no mpware support yet, either
8 # OME 20070912: Taken from luatex build.sh:
9 # try to find gnu make; we need it
11 if make -v 2>&1| grep "GNU Make" >/dev/null
13 echo "Your make is a GNU-make; I will use that"
14 elif gmake -v >/dev/null 2>&1
17 echo "You have a GNU-make installed as gmake; I will use that"
19 echo "I can't find a GNU-make; I'll try to use make and hope that works."
20 echo "If it doesn't, please install GNU-make."
23 # this deletes all previous builds.
24 # comment out the rm and mkdir if you want to keep them (and uncomment and
25 # change the $MAKE distclean below)
29 # clean up (uncomment the next line if you have commented out the rm and
33 # guess the correct datadir
35 DATADIR=`which kpsewhich > /dev/null && kpsewhich texmf.cnf | sed 's%/texmf.cnf$%%' | sed 's%/web2c$%%' | sed 's%/texmf[^\/]*$%%'`
36 if test -z "$DATADIR"; then
41 # do a configure without all the things we don't need
42 ../../src/texk/configure --datadir=$DATADIR || exit 1
44 # make the kpathsea library
45 (cd kpathsea; $MAKE ../kpathsea/libkpathsea.la) || exit 1
52 (../../../../../src/texk/web2c/mpdir/lib/configure; $MAKE )|| exit 1
54 # make the newmpost binary
56 ln -s ../../../../src/texk/web2c/mpdir/Makefile .
57 ln -s ../../../../src/texk/web2c/mpdir/mpost.w .
61 # $STRIP web2c/mpdir/newmpost
65 ls -l build/texk/web2c/mpdir/newmpost