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.3 # Revision 1.2 2003/03/08 04:03:46 saw
6 # Build chowto.tgz, the set of files an author needs to prepare a howto.
7 #
|
8 saw 1.2 # Revision 1.1 2003/03/06 20:20:57 saw
9 # Initial Checkin
10 #
|
11 saw 1.1
12 # These should eventually automatically add branch names
13
14 HOWTOWEBROOT=http://hallcweb.jlab.org/document/howtos
15 HOWTOFSROOT=/group/hallc/www/hallcweb/html/document/howtos
16
17 TEXFILES := $(wildcard *.tex)
18
19 PSTARGETS := $(patsubst %.tex,%.ps,$(TEXFILES))
20 DVIFILES := $(patsubst %.tex,%.dvi,$(TEXFILES))
21 BBLFILES := $(patsubst %.tex,%.bbl,$(TEXFILES))
22 LATEXHTMLDIRS := $(patsubst %.tex,%,$(TEXFILES))
23 LATEXHTMLINDEXES := $(patsubst %.tex,%/index.html,$(TEXFILES))
24
25 .SECONDARY: $(DVIFILES) $(BBLFILES)
26
|
27 saw 1.2 all: postscript html chowto.tgz
|
28 saw 1.1
29 clean: clean_texout clean_html
30
31 clean_texout:
32 rm -f $(PSTARGETS) *.dvi *.blg *.bbl *.blg *.aux *.log
33
34 clean_html:
|
35 saw 1.3 rm -f howtolist.html index.html
|
36 saw 1.1
37 postscript: $(PSTARGETS)
38
39 html: $(LATEXHTMLINDEXES)
40
41 %.ps: %.dvi
42 dvips -o $@ $*
43
44 # Remove straight tex to dvi
45 %.dvi: %.tex
46
47 %.dvi: %.bbl
48 latex $*
49 latex $*
50
51 %.bbl: %.tex chowto.bib chowto-auto.bib
52 latex $*
53 -bibtex $*
54
55 %/index.html: %.bbl chowto.perl
56 latex2html -init_file latex2html-init $*
57 saw 1.1
|
58 saw 1.3 howtolist.html chowto-auto.bib howtolist.text index.html: chowto_scan.perl $(TEXFILES)
|
59 saw 1.1 ./chowto_scan.perl . $(HOWTOWEBROOT)
60
|
61 saw 1.2 chowto.tgz: template.tex_tex howtohowto.tex chowto.cls chowto.bst chowto.bib chowto-auto.bib
62 -mkdir tarfile
63 cp template.tex_tex tarfile/template.tex
64 cat chowto.bib chowto-auto.bib > tarfile/chowto.bib
65 cp howtohowto.tex chowto.cls chowto.bst tarfile
66 (cd tarfile ; tar -zcf ../chowto.tgz *)
67 rm -fr tarfile
68
|
69 saw 1.1 install:
70 install --mode=664 howtolist.html $(HOWTOFSROOT)
|
71 saw 1.3 install --mode=664 howtolist.text $(HOWTOFSROOT)
|
72 saw 1.1 install --mode=664 $(PSTARGETS) $(HOWTOFSROOT)
|
73 saw 1.2 install --mode=664 index.html $(HOWTOFSROOT)
74 install --mode=664 chowto.tgz $(HOWTOFSROOT)
75 for subdir in $(LATEXHTMLDIRS); do \
76 install --mode=775 -d $(HOWTOFSROOT)/$$subdir ; \
77 install --mode=664 $$subdir/* $(HOWTOFSROOT)/$$subdir ; \
78 done
|
79 saw 1.1
|