# # Makefile to build the whole Hall C howto collection # # $Log: Makefile,v $ # Revision 1.13 2012/10/11 12:46:56 saw # Make all dependent on BBLFILES # # Revision 1.12 2008/01/03 19:45:42 saw # Make pdf files available instead of postscript files # # Revision 1.11 2008/01/02 21:35:58 saw # Fix dvips command line # # Revision 1.10 2008/01/02 20:00:22 saw # Add some options to dvips command # # Revision 1.9 2007/04/20 01:45:55 saw # Experiment specific support, viewcvs link, Lecroy/Phillips link # # Revision 1.8.2.1 2005/05/12 14:13:11 saw # Files not needed for HKS # # Revision 1.7.2.1 2005/05/11 13:08:37 saw # Not used for HKS # # Revision 1.7 2003/04/11 14:30:55 saw # Only rebuild new/changed documents unless "make rebuild" called first # # 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 # HOWTOWEBROOT=http://hallcweb.jlab.org/document HOWTOFSROOT=/group/hallc/www/hallcweb/html/document # # If experiment specific, append experiment name to paths # EXPERIMENT:=$(shell head -1 EXPERIMENT 2>/dev/null) ifneq ($(EXPERIMENT),) HOWTOWEBROOT:=$(HOWTOWEBROOT)/$(EXPERIMENT)/howtos HOWTOFSROOT:=$(HOWTOFSROOT)/$(EXPERIMENT)/howtos else HOWTOWEBROOT:=$(HOWTOWEBROOT)/howtos HOWTOFSROOT:=$(HOWTOFSROOT)/howtos endif TEXFILES := $(wildcard *.tex) PDFTARGETS := $(patsubst %.tex,%.pdf,$(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: $(BBLFILES) pdf html chowto.tgz index.html clean: clean_texout clean_html rebuild clean_texout: rm -f $(PDFTARGETS) *.dvi *.blg *.bbl *.blg *.aux *.log clean_html: rm -f index.html rebuild: touch REBUILD REBUILD: touch REBUILD pdf: $(PDFTARGETS) html: $(LATEXHTMLINDEXES) %.pdf: %.dvi dvips -t letter -Ppdf -o $*.ps $* ps2pdf $*.ps # Remove straight tex to dvi %.dvi: %.bbl latex $* latex $* # #%.bbl: %.tex chowto.bib chowto-auto.bib REBUILD %.bbl: %.tex REBUILD 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 index.html .htaccess $(HOWTOFSROOT) install --mode=664 howtolist.text howtolist.php $(HOWTOFSROOT) cat chowto.bib chowto-auto.bib > $(HOWTOFSROOT)/chowto.bib install --mode=664 chowto.tgz $(HOWTOFSROOT) for subdir in $(LATEXHTMLDIRS); do \ install --mode=775 -d $(HOWTOFSROOT)/$$subdir ; \ install --mode=664 $$subdir/* $(HOWTOFSROOT)/$$subdir ; \ done for pdffile in $(PDFTARGETS); do \ install --mode=664 $$pdffile $(HOWTOFSROOT) ; \ done