diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/Makefile')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/Makefile | 152 |
1 files changed, 92 insertions, 60 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/Makefile b/Master/texmf-dist/doc/generic/FAQ-en/Makefile index 981a8bbcaa3..c261a5f276a 100644 --- a/Master/texmf-dist/doc/generic/FAQ-en/Makefile +++ b/Master/texmf-dist/doc/generic/FAQ-en/Makefile @@ -1,23 +1,27 @@ -BODY = faqbody.tex filectan.tex dirctan.tex +# define variables WEB, WEB_BETA, CGI_BIN, HOME_DIR, CTAN_HOME, CTAN_ROOT +include locations.mk + +# list of subdocuments of gather-faqbody +include subdocuments.mk + +BODY = gather-faqbody.tex filectan.tex dirctan.tex $(SUBDOCS) MACROS = faq.cls faq.sty CONFIGS = archive.cfg CMFONTS = cmz -PATCH = newfaq-patch.tex additions.tex add-errors.tex add-biblio.tex \ - add-general.tex +PATCH = newfaq-patch.tex add-general.tex add-hammond.tex MAKEF = Makefile +HTML_TAR = FAQ-html.tar.gz + LATEX = latex PDFLATEX = pdflatex -DVIPS = dvips - -# define variables WEB, WEB_BETA, CGI_BIN, HOME_DIR, CTAN_HOME, CTAN_ROOT -include locations.mk CTAN_HOME = help/uk-tex-faq #h #hThe main targets of this Makefile are -#h all build a distribution +#h release build a distribution +#h #h patch build latest patched version #h #h ctan install distribution on CTAN @@ -27,18 +31,18 @@ CTAN_HOME = help/uk-tex-faq #h the CGI script) #h web-beta ditto, except beta distribution #h -#h inst-perl install texfaq2html in the cgi-bin directory -#h (to be run on the CTAN machine) -#h inst-perl-beta ditto, for texfaq2html-beta +#h inst-perl install texfaq2html and sanitize.pl +#h in the cgi-bin directory +#h inst-perl-beta ditto, for texfaq2html-beta, sanitize-beta +#h inst-perl-gamma ditto, for texfaq2html-gamma #h #h html make html files in html/ -#h inst-html export html/ files via ftp.cl.cam.ac.uk +#h html-gamma make html files in html, copy for -gamma tests help:; @sed -n 's/^#h//p' < $(MAKEF) -all: newfaq.pdf letterfaq.pdf \ - newfaq.ps letterfaq.ps \ - newfaq-cm.dvi letterfaq-cm.dvi +release: all html-tar +all: newfaq.pdf letterfaq.pdf # did have faqfont.cfg in here, but that caused problems, since it # typically doesn't exist... @@ -52,6 +56,8 @@ newfaq.pdf: newfaq.tex $(BODY) $(MACROS) $(CONFIGS) $(PDFLATEX) \\def\\Status{1} \\input pdf-newfaq ; \ grep "Rerun to get cross" pdf-newfaq.log > /dev/null ) do true ; \ done + thumbpdf pdf-newfaq + $(PDFLATEX) \\def\\Status{1} \\input pdf-newfaq mv pdf-newfaq.pdf newfaq.pdf rm pdf-newfaq.tex @@ -62,6 +68,8 @@ letterfaq.pdf: letterfaq.tex $(BODY) $(MACROS) $(CONFIGS) $(PDFLATEX) \\def\\Status{1} \\input pdf-letterfaq ; \ grep "Rerun to get cross" pdf-letterfaq.log > /dev/null ) do true ; \ done + thumbpdf pdf-letterfaq + $(PDFLATEX) \\def\\Status{1} \\input pdf-letterfaq mv pdf-letterfaq.pdf letterfaq.pdf rm pdf-letterfaq.tex @@ -72,36 +80,33 @@ newfaq-patch: newfaq-patch.pdf newfaq-patch.ps patch.pdf: newfaq-patch.pdf newfaq-patch.pdf: $(PATCH) $(BODY) $(MACROS) $(CONFIGS) + ./find-add-files ln -sf newfaq-patch.tex ./pdf-newfaq-patch.tex rm -f faqfont.cfg while ( \ $(PDFLATEX) \\def\\Status{1} \\input pdf-newfaq-patch ; \ grep "Rerun to get cross" pdf-newfaq-patch.log > /dev/null ) do true ; \ done + thumbpdf pdf-newfaq-patch + $(PDFLATEX) \\def\\Status{1} \\input pdf-newfaq-patch mv pdf-newfaq-patch.pdf newfaq-patch.pdf + ln -sf newfaq-patch.pdf patch.pdf rm pdf-newfaq-patch.tex -patch.ps: newfaq-patch.ps - -newfaq-patch.ps: newfaq-patch.dvi - $(DVIPS) -P$(CMFONTS) -j1 newfaq-patch - patch.dvi: newfaq-patch.dvi newfaq-patch.dvi: $(PATCH) $(BODY) $(MACROS) $(CONFIGS) - rm -f faqfont.cfg + ./find-add-files while ( \ $(LATEX) newfaq-patch ; \ grep "Rerun to get cross" newfaq-patch.log > /dev/null ) do true ; \ done + ln -sf newfaq-patch.dvi patch.dvi -newfaq.ps: newfaq.dvi - $(DVIPS) -P$(CMFONTS) -j1 newfaq +newfaq.aux: newfaq.dvi -letterfaq.ps: letterfaq.dvi - $(DVIPS) -t letter -P$(CMFONTS) -j1 letterfaq - -newfaq.dvi newfaq.aux: newfaq.tex $(BODY) $(MACROS) $(CONFIGS) +newfaq.dvi: newfaq.tex $(BODY) $(MACROS) $(CONFIGS) + echo $(LATEX) while ( \ $(LATEX) newfaq ; \ grep "Rerun to get cross" newfaq.log > /dev/null ) do true ; \ @@ -131,61 +136,88 @@ letterfaq-cm.dvi: letterfaq.tex $(BODY) $(MACROS) $(CONFIGS) done rm faqfont.cfg letterfaq-cm.tex -#install: -# (cd /homes/rf/FTP/faq; \ -# make -f /homes/rf/tex/faq/Makefile.FTP) +$(HTML_TAR): + tar czvf $(HTML_TAR) html/* -ctan: +ctan: $(HTML_TAR) (cd $(CTAN_ROOT)/$(CTAN_HOME); \ - really -u ctan make -f /homes/rf/tex/faq/Makefile.CTAN) + really -u ctan make -f /home/rf/tex/faq/Makefile.CTAN) -web: $(WEB)/dirctan.tex $(WEB)/filectan.tex $(WEB)/faqbody.tex $(WEB)/newfaq.aux $(WEB)/archive.list +# faqbody for all the webbery stuff +faqbody.tex: $(SUBDOCS) gather-faqbody.tex + ./build-faqbody -$(WEB)/dirctan.tex: $(HOME_DIR)/dirctan.tex -$(WEB)/filectan.tex: $(HOME_DIR)/filectan.tex -$(WEB)/faqbody.tex: $(HOME_DIR)/faqbody.tex -$(WEB)/newfaq.aux: $(HOME_DIR)/newfaq.aux -$(WEB)/archive.list: $(HOME_DIR)/archive.list +web: $(WEB)/dirctan.tex $(WEB)/filectan.tex $(WEB)/faqbody.tex $(WEB)/newfaq.aux $(WEB)/archive.list -$(WEB)/dirctan.tex $(WEB)/filectan.tex $(WEB)/faqbody.tex $(WEB)/newfaq.aux $(WEB)/archive.list: - rm -f $@ - copy -t $? $@ +$(WEB)/dirctan.tex: dirctan.tex +$(WEB)/filectan.tex: filectan.tex +$(WEB)/faqbody.tex: faqbody.tex +$(WEB)/newfaq.aux: newfaq.aux +$(WEB)/archive.list: archive.list +$(WEB)/aliasquestion.list: aliasquestion.list +$(WEB)/label-to-file.pl: label-to-file.pl + +$(WEB)/dirctan.tex $(WEB)/filectan.tex $(WEB)/faqbody.tex $(WEB)/newfaq.aux $(WEB)/archive.list $(WEB)/aliasquestion.list $(WEB)/label-to-file.pl: + if [ -f $@ ]; then \ + chmod 644 $@; \ + cp -p $< $@-t; \ + mv $@-t $@; \ + else \ + cp -p $< $@; \ + fi chmod 444 $@ -web-beta: $(WEB_BETA)/dirctan.tex $(WEB_BETA)/filectan.tex $(WEB_BETA)/faqbody.tex $(WEB_BETA)/newfaq.aux $(WEB_BETA)/archive.list - -$(WEB_BETA)/dirctan.tex: $(HOME_DIR)/dirctan.tex -$(WEB_BETA)/filectan.tex: $(HOME_DIR)/filectan.tex -$(WEB_BETA)/faqbody.tex: $(HOME_DIR)/faqbody.tex -$(WEB_BETA)/newfaq.aux: $(HOME_DIR)/newfaq.aux -$(WEB_BETA)/archive.list: $(HOME_DIR)/archive.list - -$(WEB_BETA)/dirctan.tex $(WEB_BETA)/filectan.tex $(WEB_BETA)/faqbody.tex $(WEB_BETA)/newfaq.aux $(WEB_BETA)/archive.list: - rm -f $@ - copy -t $? $@ +web-beta: $(WEB_BETA)/dirctan.tex $(WEB_BETA)/filectan.tex $(WEB_BETA)/faqbody.tex $(WEB_BETA)/newfaq.aux $(WEB_BETA)/archive.list $(WEB_BETA)/aliasquestion.list $(WEB_BETA)/label-to-file.pl + +$(WEB_BETA)/dirctan.tex: dirctan.tex +$(WEB_BETA)/filectan.tex: filectan.tex +$(WEB_BETA)/faqbody.tex: faqbody.tex +$(WEB_BETA)/newfaq.aux: newfaq.aux +$(WEB_BETA)/archive.list: archive.list +$(WEB_BETA)/aliasquestion.list: aliasquestion.list +$(WEB_BETA)/label-to-file.pl: label-to-file.pl + +$(WEB_BETA)/dirctan.tex $(WEB_BETA)/filectan.tex $(WEB_BETA)/faqbody.tex $(WEB_BETA)/newfaq.aux $(WEB_BETA)/archive.list $(WEB_BETA)/aliasquestion.list $(WEB_BETA)/label-to-file.pl: + if [ -f $@ ]; then \ + chmod 644 $@; \ + cp -p $< $@-t; \ + mv $@-t $@; \ + else \ + cp -p $< $@; \ + fi chmod 444 $@ inst-perl: $(CGI_BIN)/texfaq2html $(CGI_BIN)/sanitize.pl inst-perl-beta: $(CGI_BIN)/texfaq2html-beta $(CGI_BIN)/sanitize-beta.pl +inst-perl-gamma: $(CGI_BIN)/texfaq2html-gamma $(CGI_BIN)/texfaq2html: $(HOME_DIR)/texfaq2html $(CGI_BIN)/texfaq2html-beta: $(HOME_DIR)/texfaq2html-beta +$(CGI_BIN)/texfaq2html-gamma: $(HOME_DIR)/texfaq2html-gamma $(CGI_BIN)/sanitize.pl: $(HOME_DIR)/sanitize.pl -$(CGI_BIN)/sanitize-beta.pl: $(HOME_DIR)/sanitize.pl +$(CGI_BIN)/sanitize-beta.pl: $(HOME_DIR)/sanitize-beta.pl -$(CGI_BIN)/texfaq2html $(CGI_BIN)/texfaq2html-beta $(CGI_BIN)/sanitize.pl $(CGI_BIN)/sanitize-beta.pl: +$(CGI_BIN)/texfaq2html $(CGI_BIN)/texfaq2html-beta $(CGI_BIN)/texfaq2html-gamma $(CGI_BIN)/sanitize.pl $(CGI_BIN)/sanitize-beta.pl: co -l $@ - copy -t $? $@ + cp -p $? $@ ci -u -m"automatic check-in" $@ html: $(HTMLDIR)/index.html -$(HTMLDIR)/index.html: $(BODY) newfaq.aux +$(HTMLDIR)/index.html: $(BODY) newfaq.aux faqbody.tex ./texfaq2file -inst-html: $(HTMLDIR)/index.html - gtar czvf /homes/rf/FTP/faq/FAQ-html.tar.gz README html/* +html-tar: html + tar czf FAQ-html.tar.gz $(HTMLDIREL)/ + +html-gamma: $(HTMLDIR_GAMMA)/index.html + +$(HTMLDIR_GAMMA)/index.html: $(BODY) newfaq.aux + ./texfaq2file -2 -w + cp -p $(HTMLDIR_GAMMA)/* $(GAMMADIR)/ clean: - rm -f *.ps *.pdf *.dvi *.log *.bak *.toc *.out comment.cut - rm -f *.aux html/*.html + rm -f *.pdf *.dvi *.log *.bak *.toc *.out *.lab *.tpt *.png + rm -f *.aux html/*.html html_gamma/*.html htmltext/*.txt + rm -f pdf-newfaq*.tex comment.cut additions.tex aliasquestion.list + rm -f faqbody.tex FAQ-html.tar.gz |