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