(file) Return to Makefile CVS log (file) (dir) Up to [HallC] / Documents / Howtos

  1 saw   1.1 #
  2           # Makefile to build the whole Hall C howto collection
  3           #
  4 saw   1.2 # $Log: Makefile,v $
  5 saw   1.13 # Revision 1.12  2008/01/03 19:45:42  saw
  6            # Make pdf files available instead of postscript files
  7            #
  8 saw   1.12 # Revision 1.11  2008/01/02 21:35:58  saw
  9            # Fix dvips command line
 10            #
 11 saw   1.11 # Revision 1.10  2008/01/02 20:00:22  saw
 12            # Add some options to dvips command
 13            #
 14 saw   1.10 # Revision 1.9  2007/04/20 01:45:55  saw
 15            # Experiment specific support, viewcvs link, Lecroy/Phillips link
 16            #
 17 saw   1.9  # Revision 1.8.2.1  2005/05/12 14:13:11  saw
 18            # Files not needed for HKS
 19            #
 20            # Revision 1.7.2.1  2005/05/11 13:08:37  saw
 21            # Not used for HKS
 22            #
 23 saw   1.8  # Revision 1.7  2003/04/11 14:30:55  saw
 24            # Only rebuild new/changed documents unless "make rebuild" called first
 25            #
 26 saw   1.7  # Revision 1.6  2003/04/04 14:28:38  saw
 27            # Prohibit off site access to vendor manuals
 28            #
 29 saw   1.6  # Revision 1.5  2003/03/31 18:30:13  saw
 30            # Install howtolist.php
 31            #
 32 saw   1.5  # Revision 1.4  2003/03/19 21:23:58  saw
 33            # Change in chowto_scan.perl arguments
 34            #
 35 saw   1.4  # Revision 1.3  2003/03/11 21:55:57  saw
 36            # chowto_scan.pl generates howtolist.text and index.html
 37            #
 38 saw   1.3  # Revision 1.2  2003/03/08 04:03:46  saw
 39            # Build chowto.tgz, the set of files an author needs to prepare a howto.
 40            #
 41 saw   1.2  # Revision 1.1  2003/03/06 20:20:57  saw
 42            # Initial Checkin
 43            #
 44 saw   1.1  
 45 saw   1.9  HOWTOWEBROOT=http://hallcweb.jlab.org/document
 46            HOWTOFSROOT=/group/hallc/www/hallcweb/html/document
 47 saw   1.8  
 48            #
 49            # If experiment specific, append experiment name to paths
 50            #
 51            EXPERIMENT:=$(shell head -1 EXPERIMENT 2>/dev/null)
 52            ifneq ($(EXPERIMENT),)
 53 saw   1.9  	HOWTOWEBROOT:=$(HOWTOWEBROOT)/$(EXPERIMENT)/howtos
 54            	HOWTOFSROOT:=$(HOWTOFSROOT)/$(EXPERIMENT)/howtos
 55            else
 56            	HOWTOWEBROOT:=$(HOWTOWEBROOT)/howtos
 57            	HOWTOFSROOT:=$(HOWTOFSROOT)/howtos
 58 saw   1.8  endif
 59 saw   1.1  
 60            TEXFILES := $(wildcard *.tex)
 61            
 62 saw   1.12 PDFTARGETS := $(patsubst %.tex,%.pdf,$(TEXFILES))
 63 saw   1.1  DVIFILES := $(patsubst %.tex,%.dvi,$(TEXFILES))
 64            BBLFILES := $(patsubst %.tex,%.bbl,$(TEXFILES))
 65            LATEXHTMLDIRS := $(patsubst %.tex,%,$(TEXFILES))
 66            LATEXHTMLINDEXES := $(patsubst %.tex,%/index.html,$(TEXFILES))
 67            
 68 saw   1.13 .SECONDARY: $(DVIFILES) $(BBLFILES) 
 69 saw   1.1  
 70 saw   1.13 all: $(BBLFILES) pdf html chowto.tgz index.html
 71 saw   1.1  
 72 saw   1.7  clean: clean_texout clean_html rebuild
 73 saw   1.1  
 74            clean_texout:
 75 saw   1.12 	rm -f $(PDFTARGETS) *.dvi *.blg *.bbl *.blg *.aux *.log
 76 saw   1.1  
 77            clean_html:
 78 saw   1.6  	rm -f index.html
 79 saw   1.1  
 80 saw   1.7  rebuild:
 81            	touch REBUILD
 82            
 83            REBUILD:
 84            	touch REBUILD
 85            
 86 saw   1.12 pdf: $(PDFTARGETS)
 87 saw   1.1  
 88            html: $(LATEXHTMLINDEXES)
 89            
 90 saw   1.12 %.pdf: %.dvi
 91            	dvips -t letter -Ppdf -o $*.ps $* 
 92            	ps2pdf $*.ps
 93 saw   1.1  
 94            # Remove straight tex to dvi
 95            %.dvi: %.bbl
 96            	latex $*
 97            	latex $*
 98            
 99 saw   1.7  # 
100            #%.bbl: %.tex chowto.bib chowto-auto.bib REBUILD
101            %.bbl: %.tex REBUILD
102 saw   1.1  	latex $*
103            	-bibtex $*
104            
105            %/index.html: %.bbl chowto.perl
106            	latex2html -init_file latex2html-init $*
107            
108 saw   1.6  chowto-auto.bib howtolist.text index.html: chowto_scan.perl $(TEXFILES)
109 saw   1.4  	./chowto_scan.perl $(HOWTOWEBROOT)
110 saw   1.1  
111 saw   1.2  chowto.tgz: template.tex_tex howtohowto.tex chowto.cls chowto.bst chowto.bib chowto-auto.bib
112            	-mkdir tarfile
113            	cp template.tex_tex tarfile/template.tex
114            	cat chowto.bib chowto-auto.bib > tarfile/chowto.bib
115            	cp howtohowto.tex chowto.cls chowto.bst tarfile
116            	(cd tarfile ; tar -zcf ../chowto.tgz *)
117            	rm -fr tarfile
118            
119 saw   1.1  install:
120 saw   1.7  	install --mode=664 index.html .htaccess $(HOWTOFSROOT)
121            	install --mode=664 howtolist.text howtolist.php $(HOWTOFSROOT)
122            	cat chowto.bib chowto-auto.bib > $(HOWTOFSROOT)/chowto.bib
123 saw   1.2  	install --mode=664 chowto.tgz $(HOWTOFSROOT)
124            	for subdir in $(LATEXHTMLDIRS); do \
125            	   install --mode=775 -d $(HOWTOFSROOT)/$$subdir ; \
126            	   install --mode=664 $$subdir/* $(HOWTOFSROOT)/$$subdir ; \
127            	done
128 saw   1.12 	for pdffile in $(PDFTARGETS); do \
129            	   install --mode=664 $$pdffile $(HOWTOFSROOT) ; \
130 saw   1.7  	done

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0