# # Makefile to build the whole Hall C howto collection # # $Log: Makefile,v $ # Revision 1.6 2003/04/04 14:28:38 saw # Prohibit off site access to vendor manuals # # Revision 1.5 2003/03/31 18:30:13 saw # Install howtolist.php # # Revision 1.4 2003/03/19 21:23:58 saw # Change in chowto_scan.perl arguments # # Revision 1.3 2003/03/11 21:55:57 saw # chowto_scan.pl generates howtolist.text and index.html # # Revision 1.2 2003/03/08 04:03:46 saw # Build chowto.tgz, the set of files an author needs to prepare a howto. # # Revision 1.1 2003/03/06 20:20:57 saw # Initial Checkin # # These should eventually automatically add branch names HOWTOWEBROOT=http://hallcweb.jlab.org/document/howtos HOWTOFSROOT=/group/hallc/www/hallcweb/html/document/howtos TEXFILES := $(wildcard *.tex) PSTARGETS := $(patsubst %.tex,%.ps,$(TEXFILES)) DVIFILES := $(patsubst %.tex,%.dvi,$(TEXFILES)) BBLFILES := $(patsubst %.tex,%.bbl,$(TEXFILES)) LATEXHTMLDIRS := $(patsubst %.tex,%,$(TEXFILES)) LATEXHTMLINDEXES := $(patsubst %.tex,%/index.html,$(TEXFILES)) .SECONDARY: $(DVIFILES) $(BBLFILES) all: postscript html chowto.tgz index.html clean: clean_texout clean_html clean_texout: rm -f $(PSTARGETS) *.dvi *.blg *.bbl *.blg *.aux *.log clean_html: rm -f index.html postscript: $(PSTARGETS) html: $(LATEXHTMLINDEXES) %.ps: %.dvi dvips -o $@ $* # Remove straight tex to dvi %.dvi: %.tex %.dvi: %.bbl latex $* latex $* %.bbl: %.tex chowto.bib chowto-auto.bib latex $* -bibtex $* %/index.html: %.bbl chowto.perl latex2html -init_file latex2html-init $* chowto-auto.bib howtolist.text index.html: chowto_scan.perl $(TEXFILES) ./chowto_scan.perl $(HOWTOWEBROOT) chowto.tgz: template.tex_tex howtohowto.tex chowto.cls chowto.bst chowto.bib chowto-auto.bib -mkdir tarfile cp template.tex_tex tarfile/template.tex cat chowto.bib chowto-auto.bib > tarfile/chowto.bib cp howtohowto.tex chowto.cls chowto.bst tarfile (cd tarfile ; tar -zcf ../chowto.tgz *) rm -fr tarfile install: install --mode=664 howtolist.text $(HOWTOFSROOT) install --mode=664 howtolist.php $(HOWTOFSROOT) install --mode=664 $(PSTARGETS) $(HOWTOFSROOT) install --mode=664 index.html $(HOWTOFSROOT) install --mode=664 chowto.tgz $(HOWTOFSROOT) for subdir in $(LATEXHTMLDIRS); do \ install --mode=775 -d $(HOWTOFSROOT)/$$subdir ; \ install --mode=664 $$subdir/* $(HOWTOFSROOT)/$$subdir ; \ done