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
|
# -*- sh -*-
#
# To create the SGML files, you will need to install the tm-utils
# package. See http://www.jedsoft.org/ for more information.
TMDIST = /nfs/aluche/d1/web/tm-dist
TM2SGML = $(TMDIST)/bin/tmexpand
DB2MAN = docbook2man
MACRODIR = $(TMDIST)/macros
STEM = tess
TXT_FILES = $(STEM).txt
SGML_FILES = $(STEM).sgml tessrun.sgml
HTML_FILES = $(STEM).html
HELP_FILES = tess.hlp
TEX_FILES = $(STEM).tex
PS_FILES = $(STEM).ps
PDF_FILES = $(STEM).pdf
MAN_PAGES = tessrun.1
GENERATED_FILES=$(SGML_FILES) $(HTML_FILES) $(TEX_FILES) $(TXT_FILES) \
$(PS_FILES) $(PDF_FILES) $(HELP_FILES) $(MAN_PAGES) tessfun.tm
SGML2LATEX = sgml2latex -p letter -o tex
SGML2HTML = sgml2html
SGML2TXT = sgml2txt -f
LATEX = latex
PDFLATEX = pdflatex
DOC_IMAGES =
TEXTDIR = ../text
PSDIR = ../ps
HTMLDIR = ../html
SGMLDIR = ../sgml
PDFDIR = ../pdf
MANDIR = ../man
SL2TM = sl2tm
TM2TXT = tm2txt
SRC = ../..
SUBDIRS = $(TEXTDIR) $(HTMLDIR) $(PSDIR) $(SGMLDIR) $(PDFDIR) $(MANDIR)
SRCDIR = `pwd`
.PHONY: all install uninstall clean distclean texclean
.SUFFIXES: .sgml .tm
.tm.sgml:
$(TM2SGML) -I$(MACRODIR) $? $*.sgml
all: $(GENERATED_FILES) $(MAN_PAGES)
#----- SGML Files -----------------------------------------------------------
$(STEM).sgml : $(STEM).tm preface.tm tessfun.tm
$(TM2SGML) -I$(MACRODIR) $(STEM).tm $(STEM).sgml
#----- HTML Files -----------------------------------------------------------
$(STEM).html : $(STEM).sgml
$(SGML2HTML) $(STEM).sgml
#----- TeX Files ------------------------------------------------------------
$(STEM).tex : $(STEM).sgml
$(SGML2LATEX) $(STEM).sgml
jed -script ./fixtex.sl $(STEM).tex
#----- PDF Files -----------------------------------------------------------
$(STEM).pdf : $(STEM).tex
$(PDFLATEX) $(STEM).tex
$(PDFLATEX) $(STEM).tex
$(MAKE) texclean
#----- PS Files -----------------------------------------------------------
$(STEM).ps : $(STEM).pdf
pdftops $? $@
#----- Text Files -----------------------------------------------------------
SL_SCRIPTS = $(SRC)/tess.sl
$(STEM).txt: $(STEM).sgml
$(SGML2TXT) $(STEM).sgml
tessfun.tm: $(SL_SCRIPTS)
$(SL2TM) -sl $(SL_SCRIPTS) > $@
./mungefuns $@
tess.hlp: $(SL_SCRIPTS)
$(SL2TM) -sl $(SL_SCRIPTS) > tesshelp.tmp
$(TM2TXT) tesshelp.tmp > $@
tessrun.1: tessrun.sgml
$(DB2MAN) $?
@echo Check that end-user man page is up-to-date
#----------------------------------------------------------------------------
texclean:
-rm -f *.dvi *.log *.aux *.toc *.out
clean: texclean
-rm -f *~ *.tmp *.sgml-error $(GENERATED_FILES) *.html \
manpage.refs manpage.links
distclean: clean
-rm -f *.html *.ps $(STEM).tm
install-txt-files: $(TXT_FILES)
-mv $(TXT_FILES) ../text
install: all $(PS_FILES)
-mkdir -p $(SUBDIRS)
-mv $(TXT_FILES) $(TEXTDIR)
-cp -f tess.hlp $(TEXTDIR)
-mv *.html $(HTMLDIR)
-mv $(PS_FILES) $(PSDIR)
-mv $(SGML_FILES) $(SGMLDIR)
-mv $(PDF_FILES) $(PDFDIR)
-mv $(MAN_PAGES) $(MANDIR)
uninstall:
if [ ! -z "$(SUBDIRS)" ] ; then \
\rm -rf $(SUBDIRS) ; \
fi
|