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

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