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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
################## Configuration parameters
# Compile using ocamlopt, to use ocamlc set TARGET=byte
TARGET=opt
# Library directory of hevea
LIBDIR=/usr/local/lib/hevea
# Where to install programms
BINDIR=/usr/local/bin
# C preprocessor with proper options (don't ask)
CPP=cpp -E -P
#Some alternatives...
#CPP=/lib/cpp -E -P (Old fashioned Unix)
#CPP=gcc -E -P -x c (If you have gcc)
#CPP=cc --traditional-cpp -E -P -x c (repported to work on MacOsX by Georg)
############### End of configuration parameters
SUF=
DIR=
HEVEA=./hevea.$(TARGET)
ESPONJA=./esponja.$(TARGET)
OCAMLC=${DIR}ocamlc$(SUF)
OCAMLFLAGS=
OCAMLCI=$(OCAMLC)
OCAMLOPT=${DIR}ocamlopt$(SUF)
OCAMLLEX=${DIR}ocamllex$(SUF)
INSTALL=cp
MKDIR=mkdir -p
ONLYESPONJA=emisc.cmo buff.cmo htmllex.cmo htmlparse.cmo htmltext.cmo pp.cmo util.cmo explode.cmo ultra.cmo esponja.cmo
OBJS=version.cmo mysys.cmo stack.cmo location.cmo misc.cmo element.cmo out.cmo table.cmo mylib.cmo parse_opts.cmo myfiles.cmo symb.cmo save.cmo auxx.cmo lexstate.cmo subst.cmo latexmacros.cmo counter.cmo noimage.cmo image.cmo length.cmo get.cmo tabular.cmo htmlCommon.cmo htmlMath.cmo mathML.cmo html.cmo text.cmo infoRef.cmo info.cmo section.cmo foot.cmo entry.cmo index.cmo colscan.cmo color.cmo hot.cmo package.cmo videoc.cmo verb.cmo latexscan.cmo zyva.cmo $(ONLYESPONJA) latexmain.cmo
OBJSCUT=version.cmo mysys.cmo stack.cmo location.cmo misc.cmo out.cmo thread.cmo cross.cmo mylib.cmo section.cmo length.cmo save.cmo cut.cmo cutmain.cmo
OBJSESPONJA=mysys.cmo stack.cmo location.cmo $(ONLYESPONJA) esponjamain.cmo
GENSRC=colscan.ml cut.ml entry.ml get.ml latexscan.ml length.ml save.ml tabular.ml videoc.ml verb.ml infoRef.ml subst.ml htmllex.ml
OPTS=$(OBJS:.cmo=.cmx)
OPTSCUT=$(OBJSCUT:.cmo=.cmx)
OPTSESPONJA=$(OBJSESPONJA:.cmo=.cmx)
include libs.def
all: $(TARGET)
everything: byte opt
install: install-$(TARGET)
opt:
$(MAKE) $(MFLAGS) TARGET=opt hevea.opt hacha.opt esponja.opt cutfoot-fra.html cutfoot-eng.html
byte:
$(MAKE) $(MFLAGS) TARGET=byte hevea.byte hacha.byte esponja.byte cutfoot-fra.html cutfoot-eng.html
install-lib:
- $(MKDIR) $(LIBDIR)
$(INSTALL) hevea.sty cutfoot-fra.html cutfoot-eng.html footer.tex ${LIBDIR}
$(INSTALL) contents_motif.gif next_motif.gif previous_motif.gif ${LIBDIR}
$(INSTALL) $(ALLLIB) $(LIBDIR)
- $(MKDIR) $(LIBDIR)/html
cd html ; $(INSTALL) $(HTMLLIB) $(LIBDIR)/html
- $(MKDIR) $(LIBDIR)/text
cd text ; $(INSTALL) $(TEXTLIB) $(LIBDIR)/text
- $(MKDIR) $(LIBDIR)/info
cd info ; $(INSTALL) $(INFOLIB) $(LIBDIR)/info
install-opt: install-lib
$(INSTALL) hevea.opt $(BINDIR)/hevea
$(INSTALL) hacha.opt $(BINDIR)/hacha
$(INSTALL) esponja.opt $(BINDIR)/esponja
$(INSTALL) imagen $(BINDIR)
install-byte: install-lib
$(INSTALL) hevea.byte $(BINDIR)/hevea
$(INSTALL) hacha.byte $(BINDIR)/hacha
$(INSTALL) esponja.byte $(BINDIR)/esponja
$(INSTALL) imagen $(BINDIR)
hevea.byte: ${OBJS}
${OCAMLC} ${OCAMLFLAGS} -o $@ ${OBJS}
hacha.byte: ${OBJSCUT}
${OCAMLC} ${OCAMLFLAGS} -o $@ ${OBJSCUT}
esponja.byte: ${OBJSESPONJA}
${OCAMLC} ${OCAMLFLAGS} -o $@ ${OBJSESPONJA}
hevea.opt: ${OPTS}
${OCAMLOPT} -o $@ ${OPTS}
hacha.opt: ${OPTSCUT}
${OCAMLOPT} -o $@ ${OPTSCUT}
esponja.opt: ${OPTSESPONJA}
${OCAMLOPT} -o $@ ${OPTSESPONJA}
mylib.cmo: mylib.ml mylib.cmi
${OCAMLC} ${OCAMLFLAGS} -pp '${CPP} -DLIBDIR=\"${LIBDIR}\"' -c mylib.ml
mylib.cmx: mylib.ml mylib.cmi
${OCAMLOPT} -pp '${CPP} -DLIBDIR=\"${LIBDIR}\"' -c mylib.ml
cutfoot-fra.html: cutfoot.tex html/hevea.hva ${HEVEA}
HEVEADIR=. ; export HEVEADIR ; ${HEVEA} -francais < cutfoot.tex | ${ESPONJA}> $@
cutfoot-eng.html: cutfoot.tex html/hevea.hva ${HEVEA}
HEVEADIR=. ; export HEVEADIR ; ${HEVEA} < cutfoot.tex | ${ESPONJA}> $@
.SUFFIXES:
.SUFFIXES: .ml .cmo .mli .cmi .c .mll .cmx
.mll.ml:
${OCAMLLEX} $<
.ml.cmx:
${OCAMLOPT} -c $<
.ml.cmo:
${OCAMLC} ${OCAMLFLAGS} -c $<
.mli.cmi:
${OCAMLCI} -c $<
.c:
$(CC) $(CFLAGS) -o $@ $<
cleanbyte:
rm -f *.byte
rm -f *.cmo
clean: cleanbyte
rm -f *.byte *.opt
rm -f $(GENSRC)
rm -f *.o *.cmi *.cmo *.cmx *.o *.ppo *.ppi
rm -f *~ #*# html/*~ html/#*# text/*~ text/#*# info/*~ info/#*#
rm -f cutfoot-fra.html cutfoot-eng.html
depend: $(GENSRC)
- cp .depend .depend.bak
ocamldep *.mli *.ml > .depend
videoc.cmi : latexscan.cmi
videoc.cmo : videoc.cmi
include .depend
|