mirror of
https://github.com/GnoConsortium/gno.git
synced 2025-01-18 08:30:42 +00:00
71090e862f
kern reference is really ready for viewing, and that is still missing the index.
193 lines
4.8 KiB
Makefile
193 lines
4.8 KiB
Makefile
#
|
|
# 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.
|
|
#
|
|
# Devin Reade, 1997.
|
|
#
|
|
# $Id: Makefile,v 1.1 1997/11/24 05:07:26 gdr Exp $
|
|
#
|
|
|
|
# Set this to 'true' (without the quotes) for local links (used
|
|
# during editing).
|
|
DRAFT =
|
|
|
|
# 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
|
|
ADDRESS = gdr@eddore.myrias.com
|
|
|
|
# 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
|
|
|
|
# The name of the manually-maintained index page in this directory
|
|
MINDEX = index.html
|
|
|
|
.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
|
|
HTML_ROOT = http://trenco.myrias.com/~gno
|
|
GIFDIR = http://trenco.myrias.com/icons
|
|
.END
|
|
FTP_ROOT = ftp://trenco.myrias.com/pub/apple2/gno
|
|
|
|
|
|
# Where can the FAQ be located?
|
|
#FAQ = http://web.cs.ualberta.ca/~glyn/FAQ.csa2g
|
|
FAQ = http://trenco.myrias.com/~gno/FAQ.html
|
|
FAQLOG = http://trenco.myrias.com/~gno/FAQ-log
|
|
|
|
# Where can the old v2.0.4 docs be found?
|
|
#OLD_HTML = http://web.cs.ualberta.ca/~glyn/GNOv2.0.4Docs
|
|
OLD_HTML = http://trenco.myrias.com/~gno/docs.Aug96
|
|
|
|
#########################################################
|
|
# 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
|
|
DVIPS_FLAGS = -tletter
|
|
LATEX_FLAGS =
|
|
TEX2HTML_FLAGS = -info "" -local_icons -dir $(HTMLD) -up_url $(MINDEX)
|
|
TEXINPUTS = ':/usr/local/lib/latex2html'
|
|
|
|
DVI = kern.dvi # intro.dvi
|
|
PS = kern.ps # intro.ps
|
|
HTML = $(HTMLD)/kern.html # $(HTMLD)/intro.html
|
|
|
|
.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
|
|
|
|
UPLOADS = htmld.tar.gz \
|
|
kern.dvi.Z kern.ps.Z
|
|
|
|
#
|
|
# targets
|
|
#
|
|
all: h dvi ps
|
|
dvi: $(DVI)
|
|
ps: $(PS)
|
|
h: $(HTML) $(HTMLD)/index.html $(HTMLD)/unaval.html top.html cleanhtml
|
|
|
|
upload: man $(UPLOADS)
|
|
|
|
htmld.tar.gz: h
|
|
tar -cf - $(HTMLD) | gzip --best > $@
|
|
|
|
kern.dvi.Z: kern.dvi; compress -c $< > $@
|
|
kern.ps.Z: kern.ps; compress -c $< > $@
|
|
|
|
$(HTMLD)/index.html: $(MINDEX)
|
|
@echo "making $@"; \
|
|
[ -d $(HTMLD) ] || mkdir -p $(HTMLD); \
|
|
perl -p -e 's,%%HTML_ROOT%%,$(HTML_ROOT),g;' \
|
|
-e 's,%%FTP_ROOT%%,$(FTP_ROOT),g;' \
|
|
-e 's,%%FAQ%%,$(FAQ),g;' \
|
|
-e 's,%%FAQLOG%%,$(FAQLOG),g;' \
|
|
-e 's,%%OLD_HTML%%,$(OLD_HTML),g;' \
|
|
-e 's,%%GIFDIR%%,$(GIFDIR),g;' \
|
|
< $< > $@
|
|
|
|
$(HTMLD)/unaval.html: unaval.html
|
|
cp $< $@
|
|
|
|
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.
|
|
man:
|
|
@GNOROOT=../.. MANHTML=$(MANHTML) NAME="$(NAME)" \
|
|
ADDR="$(ADDRESS)" MKSO="$(MKSO)" HTMLROOT="$(HTML_ROOT)" \
|
|
./mkhtmlman
|
|
|
|
clean:
|
|
-rm -rf *~ $(TEX_GARBAGE) $(DVIPS_GARBAGE) $(UPLOADS)
|
|
|
|
clobber: clean
|
|
-rm -rf $(MANUAL_GARBAGE) $(HTMLD) $(PSD) $(DVID)
|
|
|
|
#
|
|
# 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);'\
|
|
< $(MINDEX) `" \
|
|
$(TEX2HTML_FLAGS) $<
|
|
|
|
$(HTMLD)/%.gif: GIF/%.gif
|
|
ln $< $@
|
|
|
|
#$(PSD)/%.ps: %.ps
|
|
# @true; [ -d $(PSD) ] || mkdir $(PSD)
|
|
# rm -f $@
|
|
# ln $*.ps $@
|
|
|
|
#$(DVID)/%.dvi: %.dvi
|
|
# @true; [ -d $(DVID) ] || mkdir $(DVID)
|
|
# rm -f $@
|
|
# ln $< $@
|
|
|
|
%.ps: %.dvi
|
|
$(DVIPS) $(DVIPS_FLAGS) -o $@ $<
|
|
|
|
%.dvi: %.tex
|
|
@for i in 1 2 3; do \
|
|
echo "****** latex pass $$i"; \
|
|
TEXINPUTS=$(TEXINPUTS) $(LATEX) $(LATEX_FLAGS) $<; \
|
|
$(MAKEINDEX) $*; \
|
|
done; \
|
|
echo "****** latex passes done"
|
|
|