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
|
################################################################
# Makefile for the SWI-Prolog based latex2html converter
#
# Author: Jan Wielemaker
# E-mail: jkan@swi.psy.uva.nl
#
# Free for personal usage and usage by academic institutions.
# This package may be distributed freely.
# This package may be modified if it is clearly indicated is concerns a
# modified version, and the copyright and authorship notices are left
# in place.
#
# Copyright (c) 1996, SWI, University of Amsterdam, all rights reserved
################################################################
PL=pl
prefix=/usr
LIBDIR=$(prefix)/lib/latex2html
BINDIR=$(prefix)/bin
CC=gcc
LDSO=gcc
LDSOFLAGS=-shared
COFLAGS=-O2
CDFLAGS=-D__SWI_PROLOG__ -I../include
CFLAGS=$(COFLAGS) $(CDFLAGS) -fpic
INSTALL=install -c
INSTALL_PROGRAM=$(INSTALL) -m 755
INSTALL_DATA=$(INSTALL) -m 644
OBJ= tex.o psfile.o
LIB= latex2html.pl latex.cmd pl.pl pl.cmd xpce.pl xpce.cmd
all:
@echo "==============================================================="
@echo "Usage:"
@echo ""
@echo "$(MAKE) install Install the package"
@echo "$(MAKE) html Translate the documentation into HTML"
@echo "$(MAKE) dvi Translate the documentation into DVI"
@echo "==============================================================="
install:
eval `$(PL) -dump-runtime-variables` && $(MAKE) ARCH=$$PLARCH HOME=$$PLBASE xinstall
xinstall: tex.so latex2html
mkdir -p $(LIBDIR)/lib/$(ARCH)
$(INSTALL_DATA) tex.so $(LIBDIR)/lib/$(ARCH)
$(INSTALL_PROGRAM) latex2html $(BINDIR)
for f in $(LIB); do $(INSTALL_DATA) $$f $(LIBDIR); done
mkdir -p $(LIBDIR)/icons
for f in icons/*.gif; do $(INSTALL_DATA) $$f $(LIBDIR)/icons; done
latex2html: Makefile latex2html.in
sed -e 's%@PL@%$(PL)%' -e 's%@LIBDIR@%$(LIBDIR)%' latex2html.in > $@
chmod 755 $@
tex.so: $(OBJ)
$(LDSO) $(LDSOFLAGS) -o $@ $(OBJ)
################################################################
# Documentation
################################################################
html: latex2html manual.tex
latex2html manual
dvi: manual.tex
latex manual
latex manual
manual.tex: manual.doc
./doc2tex manual.doc > manual.tex
################################################################
# Cleanup
################################################################
clean:
rm -f *% *~ $(OBJ) tex.so latex2html
|