1997-11-24 05:07:28 +00:00
|
|
|
#
|
|
|
|
# This is the top level makefile for making GNO documentation. It can't
|
|
|
|
# be run under GNO itself yet, and probably never will be due to the
|
|
|
|
# dependancy on LaTeX.
|
|
|
|
#
|
1998-01-26 07:13:14 +00:00
|
|
|
# This file is for use with dmake.
|
|
|
|
#
|
1997-11-24 05:07:28 +00:00
|
|
|
# Devin Reade, 1997.
|
|
|
|
#
|
1998-03-15 00:36:38 +00:00
|
|
|
# $Id: Makefile,v 1.9 1998/03/15 00:36:33 gdr-ftp Exp $
|
1997-11-24 05:07:28 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# Set this to 'true' (without the quotes) for local links (used
|
|
|
|
# during editing).
|
1998-01-26 07:13:14 +00:00
|
|
|
DRAFT =
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
# This is the name and address that will be given as contact info
|
|
|
|
# at the bottom of each of the HTML pages. Do NOT use '<' or '>' in the
|
|
|
|
# address.
|
|
|
|
NAME = Devin Reade
|
1998-01-26 07:13:14 +00:00
|
|
|
ADDRESS = gdr@trenco.gno.org
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
# Pathnames for various programs.
|
|
|
|
DVIPS = dvips
|
|
|
|
LATEX = latex
|
|
|
|
TEX2HTML = latex2html
|
|
|
|
MAKEINDEX = makeindex
|
|
|
|
|
|
|
|
# The names of the subdirs where we will collect html generated by
|
|
|
|
# latex(1), latex2html(1), and dvips(1).
|
|
|
|
DVID = dvid
|
|
|
|
HTMLD = htmld
|
|
|
|
PSD = psd
|
|
|
|
|
|
|
|
.IF $(DRAFT) == true
|
|
|
|
# This is the root of the html tree used in the generated sources.
|
|
|
|
HTML_ROOT = file:/home/gdr/src/gno/doc/refs/$(HTMLD)
|
|
|
|
|
|
|
|
# This is the directory where the remaining gifs may be found
|
|
|
|
GIFDIR = file:/home/gdr/graphics/
|
|
|
|
.ELSE
|
1998-01-26 07:13:14 +00:00
|
|
|
HTML_ROOT = http://www.gno.org/~gno
|
|
|
|
GIFDIR = http://www.gno.org/icons
|
1997-11-24 05:07:28 +00:00
|
|
|
.END
|
1998-01-26 07:13:14 +00:00
|
|
|
FTP_ROOT = ftp://ftp.gno.org/pub/apple2/gs.specific/gno
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Where can the FAQ be located?
|
|
|
|
#FAQ = http://web.cs.ualberta.ca/~glyn/FAQ.csa2g
|
1998-01-26 07:13:14 +00:00
|
|
|
FAQ = http://www.gno.org/~gno/FAQ.html
|
|
|
|
FAQLOG = http://www.gno.org/~gno/FAQ-log.html
|
1997-11-30 06:45:16 +00:00
|
|
|
FAQ_TEXT = $(FTP_ROOT)/doc/faq/CURRENT
|
|
|
|
FAQLOG_TEXT = $(FTP_ROOT)/doc/faq/LOG
|
|
|
|
|
|
|
|
FTP_INTRO = $(FTP_ROOT)/doc/refs/intro
|
|
|
|
FTP_KERN = $(FTP_ROOT)/doc/refs/kern
|
|
|
|
FTP_GSH = $(FTP_ROOT)/doc/refs/gsh
|
|
|
|
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
# Where can the old v2.0.4 docs be found?
|
|
|
|
#OLD_HTML = http://web.cs.ualberta.ca/~glyn/GNOv2.0.4Docs
|
1998-01-26 07:13:14 +00:00
|
|
|
OLD_HTML = http://www.gno.org/~gno/docs.Aug96
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
#########################################################
|
|
|
|
# You should not have to modify anything below this line.
|
|
|
|
#########################################################
|
|
|
|
|
|
|
|
|
|
|
|
# Format of the comment block for each html page.
|
|
|
|
CONTACT1 = '$(NAME)\
|
|
|
|
<A HREF="mailto:$(ADDRESS)" TITLE="GNO Documentation Feedback">\
|
|
|
|
<$(ADDRESS)></A><br>Last Updated: '
|
|
|
|
CONTACT2 = '<br>Document Version: '
|
|
|
|
|
|
|
|
# Some more programs and flags
|
|
|
|
GETDATE = ./getdate -date
|
|
|
|
GETVERS = ./getdate -version
|
1997-11-30 06:45:16 +00:00
|
|
|
DVIPS_FLAGS =
|
1997-11-24 05:07:28 +00:00
|
|
|
LATEX_FLAGS =
|
1998-02-19 03:04:10 +00:00
|
|
|
TEX2HTML_FLAGS = -info "" -local_icons -dir $(HTMLD) -up_url refs.html
|
1997-11-24 05:07:28 +00:00
|
|
|
TEXINPUTS = ':/usr/local/lib/latex2html'
|
|
|
|
|
1997-11-30 06:45:16 +00:00
|
|
|
DVI = intro.dvi kern.dvi
|
|
|
|
PS_LTR = intro.ltr.ps kern.ltr.ps
|
|
|
|
PS_A4 = intro.a4.ps kern.a4.ps
|
|
|
|
HTML = $(HTMLD)/intro.html $(HTMLD)/kern.html
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
.PRECIOUS: $(DVI)
|
|
|
|
|
|
|
|
MANORG = ../../usr.man
|
|
|
|
MANHTML = $(HTMLD)/man
|
|
|
|
MKSO = $(MANORG)/mkso.data
|
|
|
|
|
|
|
|
|
|
|
|
# Scratch files to clean up
|
|
|
|
MANUAL_GARBAGE = top.html
|
|
|
|
TEX_GARBAGE = *.err *.aux *.log *.dvi *.toc *.idx *.ilg *.ind
|
|
|
|
DVIPS_GARBAGE = *.ps *.djc
|
1997-11-30 06:45:16 +00:00
|
|
|
BIB_GARBAGE = *.blg *.bbl
|
1997-11-24 05:07:28 +00:00
|
|
|
|
1997-11-30 07:56:21 +00:00
|
|
|
UPLOADS = \
|
1997-11-30 06:45:16 +00:00
|
|
|
intro.dvi.Z intro.ltr.ps.Z intro.a4.ps.Z \
|
1997-11-30 07:56:21 +00:00
|
|
|
kern.dvi.Z kern.ltr.ps.Z kern.a4.ps.Z \
|
|
|
|
htmld.tar.gz
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# targets
|
|
|
|
#
|
1997-11-30 06:45:16 +00:00
|
|
|
all: dvi ps h man
|
1997-11-24 05:07:28 +00:00
|
|
|
dvi: $(DVI)
|
1997-11-30 06:45:16 +00:00
|
|
|
ps: ps_ltr ps_a4
|
|
|
|
ps_ltr: $(PS_LTR)
|
|
|
|
ps_a4: $(PS_A4)
|
1998-02-19 03:04:10 +00:00
|
|
|
h: $(HTML) \
|
|
|
|
$(HTMLD)/index.html \
|
|
|
|
$(HTMLD)/faqindex.html \
|
|
|
|
$(HTMLD)/refs.html \
|
|
|
|
$(HTMLD)/manindex.html \
|
|
|
|
$(HTMLD)/related.html \
|
|
|
|
$(HTMLD)/oldrefs.html \
|
1998-03-15 00:36:38 +00:00
|
|
|
$(HTMLD)/bugs.html \
|
1998-02-19 03:04:10 +00:00
|
|
|
$(HTMLD)/unaval.html top.html cleanhtml
|
1997-11-30 06:45:16 +00:00
|
|
|
bib: intro.bbl
|
|
|
|
|
|
|
|
intro.bbl: gno.bib
|
|
|
|
bibtex intro
|
1997-11-24 05:07:28 +00:00
|
|
|
|
1997-11-30 07:56:21 +00:00
|
|
|
upload: all $(UPLOADS)
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
htmld.tar.gz: h
|
|
|
|
tar -cf - $(HTMLD) | gzip --best > $@
|
|
|
|
|
1997-11-30 06:45:16 +00:00
|
|
|
intro.dvi.Z: intro.dvi; compress -c $< > $@
|
|
|
|
intro.ltr.ps.Z: intro.ltr.ps; compress -c $< > $@
|
|
|
|
intro.a4.ps.Z: intro.a4.ps; compress -c $< > $@
|
|
|
|
|
|
|
|
kern.dvi.Z: kern.dvi; compress -c $< > $@
|
|
|
|
kern.ltr.ps.Z: kern.ltr.ps; compress -c $< > $@
|
|
|
|
kern.a4.ps.Z: kern.a4.ps; compress -c $< > $@
|
|
|
|
|
|
|
|
gsh.dvi.Z: gsh.dvi; compress -c $< > $@
|
|
|
|
gsh.ltr.ps.Z: gsh.ltr.ps; compress -c $< > $@
|
|
|
|
gsh.a4.ps.Z: gsh.a4.ps; compress -c $< > $@
|
1997-11-24 05:07:28 +00:00
|
|
|
|
1998-02-19 03:04:10 +00:00
|
|
|
REPLACE= perl -p -e 's,%%HTML_ROOT%%,$(HTML_ROOT),g;' \
|
1997-11-24 05:07:28 +00:00
|
|
|
-e 's,%%FTP_ROOT%%,$(FTP_ROOT),g;' \
|
1997-11-30 06:45:16 +00:00
|
|
|
-e 's,%%FTP_INTRO%%,$(FTP_INTRO),g;' \
|
|
|
|
-e 's,%%FTP_KERN%%,$(FTP_KERN),g;' \
|
|
|
|
-e 's,%%FTP_GSH%%,$(FTP_GSH),g;' \
|
1997-11-24 05:07:28 +00:00
|
|
|
-e 's,%%FAQ%%,$(FAQ),g;' \
|
|
|
|
-e 's,%%FAQLOG%%,$(FAQLOG),g;' \
|
1997-11-30 06:45:16 +00:00
|
|
|
-e 's,%%FAQ_TEXT%%,$(FAQ_TEXT),g;' \
|
|
|
|
-e 's,%%FAQLOG_TEXT%%,$(FAQLOG_TEXT),g;' \
|
1997-11-24 05:07:28 +00:00
|
|
|
-e 's,%%OLD_HTML%%,$(OLD_HTML),g;' \
|
1998-02-19 03:04:10 +00:00
|
|
|
-e 's,%%GIFDIR%%,$(GIFDIR),g;'
|
|
|
|
|
|
|
|
$(HTMLD)/index.html: index.html tail.html
|
|
|
|
@echo "making $@"; \
|
|
|
|
[ -d $(HTMLD) ] || mkdir -p $(HTMLD); \
|
|
|
|
cat index.html tail.html | $(REPLACE) > $@
|
|
|
|
|
|
|
|
$(HTMLD)/faqindex.html: faqindex.html
|
|
|
|
@echo "making $@"; \
|
|
|
|
[ -d $(HTMLD) ] || mkdir -p $(HTMLD); \
|
|
|
|
cat head.html $< tail.html | $(REPLACE) \
|
|
|
|
-e 's,%%TITLE%%,GNO Frequently Asked Questions (Index),;' > $@
|
|
|
|
$(HTMLD)/faqindex.html: head.html tail.html
|
|
|
|
|
|
|
|
$(HTMLD)/refs.html: refs.html
|
|
|
|
@echo "making $@"; \
|
|
|
|
[ -d $(HTMLD) ] || mkdir -p $(HTMLD); \
|
|
|
|
cat head.html $< tail.html | $(REPLACE) \
|
|
|
|
-e 's,%%TITLE%%,GNO Reference Manuals,;' > $@
|
|
|
|
$(HTMLD)/refs.html: head.html tail.html
|
|
|
|
|
|
|
|
$(HTMLD)/manindex.html: manindex.html
|
|
|
|
@echo "making $@"; \
|
|
|
|
[ -d $(HTMLD) ] || mkdir -p $(HTMLD); \
|
|
|
|
cat head.html $< tail.html | $(REPLACE) \
|
|
|
|
-e 's,%%TITLE%%,GNO Manual Pages Index,;' > $@
|
|
|
|
$(HTMLD)/manindex.html: head.html tail.html
|
1997-11-24 05:07:28 +00:00
|
|
|
|
1998-02-19 03:04:10 +00:00
|
|
|
$(HTMLD)/related.html: related.html
|
|
|
|
@echo "making $@"; \
|
|
|
|
[ -d $(HTMLD) ] || mkdir -p $(HTMLD); \
|
|
|
|
cat head.html $< tail.html | $(REPLACE) \
|
|
|
|
-e 's,%%TITLE%%,GNO-Related Web Pages,;' > $@
|
|
|
|
$(HTMLD)/related.html: head.html tail.html
|
|
|
|
|
1998-03-15 00:36:38 +00:00
|
|
|
$(HTMLD)/bugs.html: bugs.html
|
|
|
|
@echo "making $@"; \
|
|
|
|
[ -d $(HTMLD) ] || mkdir -p $(HTMLD); \
|
|
|
|
cat head.html $< tail.html | $(REPLACE) \
|
|
|
|
-e 's,%%TITLE%%,GNO Bug Reports,;' > $@
|
|
|
|
$(HTMLD)/bugs.html: head.html tail.html
|
|
|
|
|
1998-02-19 03:04:10 +00:00
|
|
|
$(HTMLD)/oldrefs.html: oldrefs.html
|
|
|
|
@echo "making $@"; \
|
|
|
|
[ -d $(HTMLD) ] || mkdir -p $(HTMLD); \
|
|
|
|
cat head.html $< tail.html | $(REPLACE) \
|
|
|
|
-e 's,%%TITLE%%,Old GNO Documentation,;' > $@
|
|
|
|
$(HTMLD)/oldrefs.html: head.html tail.html
|
|
|
|
|
|
|
|
$(HTMLD)/unaval.html: head.html unaval.html tail.html
|
|
|
|
@echo "making $@"; \
|
|
|
|
cat head.html unaval.html tail.html | $(REPLACE) \
|
|
|
|
-e 's,%%TITLE%%,Unpublished Document,;' > $@
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
cleanhtml:
|
|
|
|
@echo "cleaning guano from html files"; \
|
|
|
|
perl -pi \
|
|
|
|
-e 's/NOWRAP//g;' \
|
|
|
|
-e '(/<!--\s*cleantable-start\s*-->/) && ($$cts=1);' \
|
|
|
|
-e '(/<!--\s*cleantable-end\s*-->/) && ($$cts=0);' \
|
|
|
|
-e '($$cts == 1) && (s/(<BR>|<HR>)//g);' \
|
|
|
|
$(HTMLD)/*.html
|
|
|
|
|
|
|
|
# -e '($$cts == 1) && (s/^\s*<BR><HR>\s*$$//);'
|
|
|
|
|
|
|
|
top.html:
|
|
|
|
ln -s $(HTMLD)/index.html top.html
|
|
|
|
|
|
|
|
|
|
|
|
# This target creates the html versions of all the current man pages,
|
|
|
|
# plus the chapter index pages. Unfortunately, this target rebuilds
|
|
|
|
# _all_ of it's files, not just those that are out of date.
|
1997-11-24 05:46:29 +00:00
|
|
|
man: mansetup
|
1997-11-24 05:07:28 +00:00
|
|
|
@GNOROOT=../.. MANHTML=$(MANHTML) NAME="$(NAME)" \
|
|
|
|
ADDR="$(ADDRESS)" MKSO="$(MKSO)" HTMLROOT="$(HTML_ROOT)" \
|
|
|
|
./mkhtmlman
|
|
|
|
|
1997-11-24 05:46:29 +00:00
|
|
|
mansetup: newer
|
|
|
|
|
1997-11-24 05:07:28 +00:00
|
|
|
clean:
|
1997-11-30 06:45:16 +00:00
|
|
|
-rm -rf *~ $(TEX_GARBAGE) $(BIB_GARBAGE) $(DVIPS_GARBAGE) $(UPLOADS)
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
clobber: clean
|
1997-11-24 05:46:29 +00:00
|
|
|
-rm -rf $(MANUAL_GARBAGE) $(HTMLD) $(PSD) $(DVID) newer
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# default rules
|
|
|
|
#
|
|
|
|
$(HTMLD)/%.html: %.tex
|
|
|
|
@true; \
|
|
|
|
[ -d $(HTMLD) ] || mkdir $(HTMLD); \
|
|
|
|
$(TEX2HTML) \
|
|
|
|
-prefix "$*". -no_auto_link \
|
|
|
|
-address $(CONTACT1)"`$(GETDATE) <$<`"$(CONTACT2)"`$(GETVERS) <$<`" \
|
|
|
|
-up_title \
|
|
|
|
"`perl -n -e '(m,<title>(.*)</title>,) && printf("%s\n",$$1);'\
|
1998-02-19 03:04:10 +00:00
|
|
|
< $(HTMLD)/refs.html `" \
|
1997-11-24 05:07:28 +00:00
|
|
|
$(TEX2HTML_FLAGS) $<
|
|
|
|
|
|
|
|
$(HTMLD)/%.gif: GIF/%.gif
|
|
|
|
ln $< $@
|
|
|
|
|
1997-11-30 06:45:16 +00:00
|
|
|
%.ltr.ps: %.dvi
|
|
|
|
$(DVIPS) -tletter $(DVIPS_FLAGS) -o $@ $<
|
1997-11-24 05:07:28 +00:00
|
|
|
|
1997-11-30 06:45:16 +00:00
|
|
|
%.a4.ps: %.dvi
|
|
|
|
$(DVIPS) -ta4 $(DVIPS_FLAGS) -o $@ $<
|
1997-11-24 05:07:28 +00:00
|
|
|
|
|
|
|
%.dvi: %.tex
|
|
|
|
@for i in 1 2 3; do \
|
|
|
|
echo "****** latex pass $$i"; \
|
|
|
|
TEXINPUTS=$(TEXINPUTS) $(LATEX) $(LATEX_FLAGS) $<; \
|
1997-11-30 06:45:16 +00:00
|
|
|
if [ "$*" = intro ]; then \
|
|
|
|
echo "****** running bibtex"; \
|
|
|
|
bibtex $*; \
|
|
|
|
fi; \
|
1997-11-24 05:07:28 +00:00
|
|
|
$(MAKEINDEX) $*; \
|
|
|
|
done; \
|
|
|
|
echo "****** latex passes done"
|
|
|
|
|
1997-11-30 06:45:16 +00:00
|
|
|
|