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

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