source: trunk/VUT/doc/SciReport/makefile @ 243

Revision 243, 4.2 KB checked in by bittner, 19 years ago (diff)

SciReport? template

RevLine 
[243]1# ================================================================
2# $Id: makefile,v 1.8 2004/05/07 00:55:51 bittner Exp $
3# ================================================================
4#/** @author Jiri Bittner */
5
6### For Tex Files #####
7####################
8PROJECT   = report
9#####################
10
11BACKUPPATH = ./backup
12SHELL=/bin/sh
13
14##########################################
15
16
17
18#########################################
19PRINT      = lpr -Pduplex
20
21MAKE      = make
22TAR       = tar
23
24DVI       =$(PROJECT).dvi
25PS        =$(PROJECT).ps
26PDF       =$(PROJECT).pdf
27HP        =$(PROJECT).hp
28BIB       =$(PROJECT).bbl
29DEPEND    =  *.tex
30DEPALL    = $(DEPEND) *.ps
31ZIP = zip
32MAKE_GLOSSARY=./makeglossary
33
34
35$(DVI): $(DEPEND)
36        @make code
37        @make epsimages
38        -latex $(PROJECT)
39
40noimages:
41        -latex $(PROJECT)
42
43$(PS):  $(DVI)
44        @dvips -t a4 -o$(PS) $(DVI)
45
46$(MAKE_GLOSSARY):
47        gcc -o $(MAKE_GLOSSARY) $(MAKE_GLOSSARY).c
48
49
50gloss:  $(MAKE_GLOSSARY)
51        $(MAKE_GLOSSARY) $(PROJECT)
52
53$(PROJECT).gls: $(PROJECT).tex
54        make gloss
55
56$(BIB): $(DVI)
57        bibtex $(PROJECT)
58
59bibl:   
60        make $(BIB)
61
62reb:    $(DEPEND) # $(PROJECT).gls
63        -latex $(PROJECT)
64        make bibl
65        -latex $(PROJECT)
66
67
68f:      $(DEPEND)
69        @rm $(DVI)
70        make $(DVI)
71
72show:   
73        $(MAKE) $(DVI)
74        @xdvi -shrinkbutton3 6 -shrinkbutton4 9 -s 9   $(DVI) &
75
76sshow:   
77        $(MAKE) $(DVI)
78        @xdvi -s 7   $(DVI) &
79
80#-mgs3 1100x600
81
82pshow:   
83        $(MAKE) $(PDF)
84        @acroread $(PDF) &
85
86kshow:   
87        $(MAKE) $(DVI)
88        @kdvi $(DVI) &
89
90tar:
91        @if(test -e core) then rm core; fi
92        @$(TAR) Zcvf  "$(BACKUPPATH)/$(PROJECT)`date +%d.%b-%H.%M`.tar.Z" *
93
94zip:
95        @if(test -e core) then rm core; fi
96        @$(ZIP) -r "$(BACKUPPATH)/$(PROJECT)`date +%d.%b-%H.%M`.zip" *  -x backup/*
97
98ziptex:
99        @if(test -e core) then rm core; fi
100        @$(ZIP) "$(BACKUPPATH)/$(PROJECT)-tex`date +%d.%b-%H.%M`.zip" makefile *.tex *.bib *.mac *.sty *.cls *.bst Bib/*.bib code/* figs/* images/* plots/* -x backup/*
101
102
103clean: 
104        -@rm -f *~ *.log *.dvi *.aux *.toc \
105        $(PROJECT).blg $(PROJECT).bbl $(PROJECT).out $(PROJECT).tpt \
106        $(PROJECT).brf
107        @if(test -e core) then rm core; fi
108        @if(test -e $(MAKE_GLOSSARY)) then rm $(MAKE_GLOSSARY); fi
109        @make -C images clean
110        @make -C figs clean
111        @make -C plots clean
112
113cleanall:       
114        @make clean
115        @if(test -e $(PS)) then rm $(PS); fi           
116        @if(test -e $(PDF)) then rm $(PDF); fi
117
118ps:     
119        make $(PS)
120
121pspdf: $(DVI)
122        dvips -Ppdf -G0 -t A4 -o$(PS) $(DVI)
123        ps2pdf -dMaxSubsetPct=100 -dCompatibilityLevel=1.3 \
124          -dSubsetFonts=true -dEmbedAllFonts=true \
125          -dAutoFilterColorImages=false \
126          -dAutoFilterGrayImages=false \
127          -dColorImageFilter=/FlateEncode \
128          -dGrayImageFilter=/FlateEncode \
129          -dMonoImageFilter=/FlateEncode $(PS) $(PDF)
130
131pdf:   
132        make $(PDF)
133
134fpdf:   
135        @rm -f $(PDF)
136        @make $(PDF)
137
138.PHONY: pdfimages
139pdfimages:
140        @make -C figs pdf
141        @make -C plots pdf
142        @make -C images pdf
143
144.PHONY: epsimages
145epsimages:
146        @make -C figs eps
147        @make -C plots eps
148        @make -C images eps
149
150
151.PHONY: images
152images:
153        @make pdfimages
154        @make epsimages
155
156.PHONY: code
157code:
158        @make -C code
159
160
161$(PDF): $(DEPEND)
162        @make code
163        @make pdfimages
164        @pdflatex $(PROJECT)
165
166pdfthumb:
167        @make pdf
168        @thumbpdf $(PROJECT)
169        @make fpdf
170
171
172
173
174#dvipdf $(DVI)
175
176lps:
177        @make $(DVI)
178        @dvips -o$(PS) $(DVI)
179
1804ps:     $(DEPALL) ps
181        rm -f 4$(PS)
182        pstops  '4:0@.5(0,0.45h)+1@.5(0,0)+2@0.5(0.5w,0.45h)+3@0.5(0.5w,0)' \
183        < $(PS) > 4$(PS)
184
185hp:      $(PS)
186        gs -q -dNOPAUSE -sPAPERSIZE=a4 -sOutputFile=$(HP) -sDEVICE=ljet4 -r600 $(PS)
187
188rotate: $(PS)
189          @pstops -w1h -h1w '0L(1h,0)' $(PS) rotated-$(PS)
190
191print: 
192        $(MAKE) $(DVI)
193        @dvips -o$(PS) $(DVI)
194        $(PRINT) $(PS)
195
196help:
197        @echo "------------------------------------------------------"
198        @echo "implicit - rebuids the dvi"
199        @echo "reb      - rebuilds it twice"
200        @echo "show     - rebulds and runs xdvi"
201        @echo "tar      - makes a backup"
202        @echo "clean    - delets *~ *.log *.dvi *.aux *.toc"
203        @echo "ps       - generates ps from dvi"
204        @echo "print    - generates ps and sends it to the printer"
205        @echo "------------------------------------------------------"
206
207
208login:
209        cvs -d :pserver:$(CVSNAME)@sgi.felk.cvut.cz:/usr.sgi/CVS_archive login
210
211update:
212        @echo "Updating in . ..."
213        @export CVS_RSH=ssh ; cvs -z 8 update
214        @echo "done."
215        @echo
216
217commit:
218#       @echo "Type in the comment terminated by ENTER, Ctrl-Z, ENTER."
219        @echo "Commiting ...."
220        @export CVS_RSH=ssh ; cvs -z 8 commit -m ""
221        @echo "done."
222        @echo
Note: See TracBrowser for help on using the repository browser.