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

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