4 # Copyright 2008 Taco Hoekwater.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>
20 # OME 20070912: Taken from luatex build.sh:
21 # try to find gnu make; we need it
23 if make -v 2>&1| grep "GNU Make" >/dev/null
25 echo "Your make is a GNU-make; I will use that"
26 elif gmake -v >/dev/null 2>&1
29 echo "You have a GNU-make installed as gmake; I will use that"
31 echo "I can't find a GNU-make; I'll try to use make and hope that works."
32 echo "If it doesn't, please install GNU-make."
35 # this deletes all previous builds.
36 # comment out the rm and mkdir if you want to keep them (and uncomment and
37 # change the $MAKE distclean below)
41 # clean up (uncomment the next line if you have commented out the rm and
45 # guess the correct datadir
47 DATADIR=`which kpsewhich > /dev/null && kpsewhich texmf.cnf | sed 's%/texmf.cnf$%%' | sed 's%/web2c$%%' | sed 's%/texmf[^\/]*$%%'`
48 if test -z "$DATADIR"; then
53 # do a configure without all the things we don't need
54 ../../src/texk/configure --datadir=$DATADIR || exit 1
56 # make the kpathsea library
57 (cd kpathsea; $MAKE ../kpathsea/libkpathsea.la) || exit 1
62 (../../../../src/texk/web2c/mpdir/configure; $MAKE )|| exit 1
66 # $STRIP web2c/mpdir/newmpost
70 ls -l build/texk/web2c/mpdir/mpost