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
|
# Makefile created by Andrew Gray <ajpg@debian.org> for tex4ht, 11/3/1999
# modified for 1999-05-06 version of tex4ht, 23/5/1999
# (designed for Debian GNU/Linux, but should be moreorless usable on other
# Linuxes/Unixes)
############################################################
# You may want to comment out this variable if not compiling for Debian:
PACKAGEDFOR=debian
# Comment this out if not using the kpathsea file search library:
SEARCHLIBRARY=kpathsea
############################################################
# Directories for installation
# DESTDIR used for Debian packaging; USRDIR typically /usr or /usr/local:
DESTDIR=
USRDIR=/usr
BINDIR=$(DESTDIR)$(USRDIR)/bin
MANDIR=$(DESTDIR)$(USRDIR)/man/man1
ifeq ($(PACKAGEDFOR),debian)
TEXMFDIR=$(DESTDIR)$(USRDIR)/share/texmf
TEX4HTDIR=$(DESTDIR)/etc/tex4ht
DOCDIR=$(DESTDIR)$(USRDIR)/doc/texmf/tex4ht
TEXMFCNF=$(DESTDIR)/etc/texmf/texmf.cnf
else
TEXMFDIR=$(DESTDIR)$(USRDIR)/lib/texmf
TEX4HTDIR=$(TEXMFDIR)/tex4ht
DOCDIR=$(TEXMFDIR)/doc/tex4ht
TEXMFCNF=$(TEXMFDIR)/web2c/texmf.cnf
endif
TEXDIR=$(TEXMFDIR)/tex/generic/tex4ht
TEXEXTRADIR=$(TEXDIR)/all4ht
HTFDIR=$(TEXMFDIR)/tex4ht/ht-fonts
TESTDIR=$(DOCDIR)/test
############################################################
# The tex4ht sources include the manual files in the top-level directory, and
# other files under 'share/'. These definitions try to group the files:
#DOCFILES=$(wildcard ../*.html) $(wildcard ../*.css) $(wildcard ../*.gif) $(wildcard ../*.txt) ../turtle.class
DOCFILES=../*.*
TEXFILES=tex4ht.sty
TEXEXTRAFILES=all4ht/*
TEX4HTFILES=htfcss.env tex4ht.env
HTFFILES=ht-fonts/*
TESTFILES=demo.tex test1.tex
############################################################
# Compiler/program options:
SED=sed
CC=gcc
CFLAGS=-O -DHAVE_DIRENT_H
ifeq ($(SEARCHLIBRARY),kpathsea)
CFLAGS:=$(CFLAGS) -I/usr/include/kpathsea -lkpathsea -DKPATHSEA
else
CFLAGS:=$(CFLAGS) -DENVFILE='"$(TEX4HTDIR)/tex4ht.env"' -DHTFDIR='"$(HTFDIR)"'
endif
############################################################
PROGS=tex4ht t4ht ht
MANS=tex4ht.1 t4ht.1 ht.1
.PHONY : all install clean
all : $(PROGS) $(MANS)
tex4ht : tex4ht.c
$(CC) -o $@ $^ $(CFLAGS)
t4ht : t4ht.c
$(CC) -o $@ $^ $(CFLAGS)
ht :
echo "#!/bin/sh" > $@
echo "TEXPROG=\$$1" >> $@
echo "TEXFILE=\$$2" >> $@
echo "shift 2" >> $@
echo "\$$TEXPROG \$$TEXFILE" >> $@
echo "\$$TEXPROG \$$TEXFILE" >> $@
echo "\$$TEXPROG \$$TEXFILE" >> $@
echo "tex4ht \$$TEXFILE" >> $@
echo "t4ht \$$TEXFILE \"\$$@\"" >> $@
ht.1 : tex4ht.1
ln -s $< $@
t4ht.1 : tex4ht.1
ln -s $< $@
tex4ht.1 : tex4ht.man
$(SED) -e "s;@DOCDIR@;$(DOCDIR);g" \
-e "s;@TEXDIR@;$(TEXDIR);g" \
-e "s;@TEXEXTRADIR@;$(TEXEXTRADIR);g" \
-e "s;@TEX4HTDIR@;$(TEX4HTDIR);g" \
-e "s;@TEXMFCNF@;$(TEXMFCNF);g" \
$< > $@
install : all
install -d -m 755 $(BINDIR) $(DOCDIR) $(TESTDIR) $(TEXDIR) $(TEXEXTRADIR) $(TEX4HTDIR) $(HTFDIR) $(MANDIR)
install -s -m 755 $(PROGS) $(BINDIR)
$(foreach MANFILE,$(MANS),cp -d $(MANFILE) $(MANDIR);)
install -m 644 $(DOCFILES) $(DOCDIR)
install -m 644 $(TESTFILES) $(TESTDIR)
install -m 644 $(TEXFILES) $(TEXDIR)
install -m 644 $(TEXEXTRAFILES) $(TEXEXTRADIR)
install -m 644 $(TEX4HTFILES) $(TEX4HTDIR)
cp -r $(HTFFILES) $(HTFDIR)
chmod -R 644 $(HTFDIR)
find $(HTFDIR) -type d -exec chmod 755 {} \;
clean :
rm -f $(PROGS) $(MANS)
|