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

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