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