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