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

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