~ubuntu-branches/ubuntu/jaunty/luatex/jaunty

« back to all changes in this revision

Viewing changes to build.sh.cross

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2007-09-24 12:56:11 UTC
  • Revision ID: james.westby@ubuntu.com-20070924125611-a8ge689azbptxvla
Tags: upstream-0.11.2
ImportĀ upstreamĀ versionĀ 0.11.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
!/usr/bin/env bash
 
2
# $Id$
 
3
# builds new pdftex binaries
 
4
 
 
5
# fix path
 
6
OLDPATH=$PATH
 
7
PATH=/usr/mingw32/mingw32/bin:$PATH
 
8
export PATH
 
9
 
 
10
# try to find gnu make; we need it
 
11
MAKE=make;
 
12
if make -v 2>&1| grep -q "GNU Make" 
 
13
then 
 
14
  echo "Your make is a GNU-make; I will use that"
 
15
elif gmake -v >/dev/null 2>&1
 
16
then
 
17
  MAKE=gmake;
 
18
  echo "You have a GNU-make installed as gmake; I will use that"
 
19
else
 
20
  echo "I can't find a GNU-make; I'll try to use make and hope that works." 
 
21
  echo "If it doesn't, please install GNU-make."
 
22
fi
 
23
# ----------
 
24
# Options:
 
25
#       --make      : only make, no make distclean; configure
 
26
#       --parallel  : make -j 2 -l 3.0
 
27
ONLY_MAKE=FALSE
 
28
JOBS_IF_PARALLEL=2
 
29
MAX_LOAD_IF_PARALLEL=3.0
 
30
while [ "$1" != "" ] ; do
 
31
  if [ "$1" = "--make" ] ;
 
32
  then ONLY_MAKE=TRUE ;
 
33
  elif [ "$1" = "--parallel" ] ;
 
34
  then MAKE="$MAKE -j $JOBS_IF_PARALLEL -l $MAX_LOAD_IF_PARALLEL" ;
 
35
  fi ;
 
36
  shift ;
 
37
done
 
38
#
 
39
 
 
40
STRIP=strip
 
41
B=build-windows
 
42
NATIVE=`pwd`
 
43
NATIVE=$NATIVE/linux
 
44
export NATIVE
 
45
 
 
46
# ----------
 
47
# clean up, if needed
 
48
if [ -e "$B"/Makefile -a $ONLY_MAKE = "FALSE" ]
 
49
then
 
50
  rm -rf "$B"
 
51
elif [ ! -e "$B"/Makefile ]
 
52
then
 
53
    ONLY_MAKE=FALSE
 
54
fi
 
55
if [ ! -e "$B" ]
 
56
then
 
57
  mkdir "$B"
 
58
fi
 
59
#
 
60
cd "$B"
 
61
 
 
62
# clean up (uncomment the next line if you have commented out the rm and
 
63
# mkdir above)
 
64
# $MAKE distclean;
 
65
# do a configure without all the things we don't need
 
66
if [ "$ONLY_MAKE" = "FALSE" ]
 
67
then
 
68
  # do a configure without all the things we don't need
 
69
  echo "ignore warnings and errors about the main texmf tree"
 
70
  ../src/configure \
 
71
            --target=i386-mingw32 \
 
72
            --build=i386-mingw32  \
 
73
            --host=i386-linux     \
 
74
            --disable-ipc         \
 
75
              --with-cxx-runtime-hack \
 
76
              --without-aleph     \
 
77
              --without-bibtex8   \
 
78
              --without-cjkutils  \
 
79
              --without-detex     \
 
80
              --without-dialog    \
 
81
              --without-dtl       \
 
82
              --without-dvi2tty   \
 
83
              --without-dvidvi    \
 
84
              --without-dviljk    \
 
85
              --without-dvipdfm   \
 
86
              --without-dvipdfmx  \
 
87
              --without-dvipng    \
 
88
              --without-dvipos    \
 
89
              --without-dvipsk    \
 
90
              --without-etex      \
 
91
              --without-gsftopk   \
 
92
              --without-lacheck   \
 
93
              --without-lcdf-typetools  \
 
94
              --without-makeindexk      \
 
95
              --without-mkocp-default   \
 
96
              --without-mkofm-default   \
 
97
              --without-musixflx  \
 
98
              --without-omega     \
 
99
              --without-pdfopen   \
 
100
              --without-ps2eps    \
 
101
              --without-ps2pkm    \
 
102
              --without-psutils   \
 
103
              --without-sam2p     \
 
104
              --without-seetexk   \
 
105
              --without-t1utils   \
 
106
              --without-tetex     \
 
107
              --without-tex4htk   \
 
108
              --without-texinfo   \
 
109
              --without-texi2html \
 
110
              --without-texlive   \
 
111
              --without-ttf2pk    \
 
112
              --without-tth       \
 
113
              --without-xdv2pdf   \
 
114
              --without-xdvik     \
 
115
              --without-xdvipdfmx \
 
116
              --without-xetex     \
 
117
              || exit 1 
 
118
fi
 
119
 
 
120
# make the binaries
 
121
(cd texk/web2c/web2c; $MAKE) || exit 1
 
122
(cd texk/web2c; $MAKE ../kpathsea/libkpathsea.la) || exit 1
 
123
(cd texk/web2c/lib; $MAKE) || exit 1
 
124
if [ ! "$ONLY_MAKE" = "FALSE" ]
 
125
then
 
126
  (cd texk/web2c/luatexdir; $MAKE libpdf.a) || exit 1
 
127
fi;
 
128
(cd texk/web2c; $MAKE luatex) || exit 1
 
129
# go back
 
130
cd ..
 
131
 
 
132
# show the results
 
133
mkdir -p windows/texk/web2c
 
134
cp "$B"/texk/web2c/luatex windows/texk/web2c/luatex.exe
 
135
$STRIP windows/texk/web2c/luatex.exe
 
136
ls -l windows/texk/web2c/luatex.exe
 
137
 
 
138
# restore environment
 
139
PATH=$OLDPATH
 
140
unset NATIVE