1% BEGIN LICENSE BLOCK 2% Version: CMPL 1.1 3% 4% The contents of this file are subject to the Cisco-style Mozilla Public 5% License Version 1.1 (the "License"); you may not use this file except 6% in compliance with the License. You may obtain a copy of the License 7% at www.eclipse-clp.org/license. 8% 9% Software distributed under the License is distributed on an "AS IS" 10% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 11% the License for the specific language governing rights and limitations 12% under the License. 13% 14% The Original Code is The ECLiPSe Constraint Logic Programming System. 15% The Initial Developer of the Original Code is Cisco Systems, Inc. 16% Portions created by the Initial Developer are 17% Copyright (C) 2006 Cisco Systems, Inc. All Rights Reserved. 18% 19% Contributor(s): 20% 21% END LICENSE BLOCK 22DESTFILE = 23 24ROOTFILE = project 25 26CHAPTERS = $(ROOTFILE).tex organisation.tex 27 28EPSFIGURES = 29 30#------------------- generic part ------------------- 31 32# the files that are touched by latex as a side effect 33#CHAPAUX = $(CHAPTERS:%.tex=%.aux) $(ROOTFILE).toc $(ROOTFILE).idx 34CHAPAUX = $(ROOTFILE).aux $(ROOTFILE).toc $(ROOTFILE).idx 35 36 37all: $(ROOTFILE).dvi $(ROOTFILE)/$(ROOTFILE).html 38 39#install: ../../doc/$(ROOTFILE).pdf $(ROOTFILE)/$(ROOTFILE).html 40# rm -rf ../../doc/$(DESTFILE) 41# mv $(ROOTFILE) ../../doc/$(DESTFILE) 42# 43#../../doc/$(DESTFILE).pdf: $(ROOTFILE).pdf 44# cp $(ROOTFILE).pdf ../../doc/$(DESTFILE).pdf 45# chmod 644 ../../doc/$(DESTFILE).pdf 46 47# tex -> dvi -> pdf 48 49$(ROOTFILE).dvi: indexfile.tex $(CHAPAUX) $(ROOTFILE).bbl 50 @echo ======== UPDATE-PASS ========= 51 @for f in $(CHAPAUX); do \ 52 mv $$f $$f.old; cp $$f.old $$f; \ 53 done 54 latex $(ROOTFILE) 55 @for f in $(CHAPAUX); do \ 56 if cmp -s $$f $$f.old; then mv $$f.old $$f; \ 57 else rm $$f.old; echo ===== $$f was modified === ; fi \ 58 done 59 $(MAKE) $(ROOTFILE).dvi 60 61$(ROOTFILE).aux: $(CHAPTERS) 62 @echo ======== PASS 1 ========= 63 latex $(ROOTFILE) 64 65$(ROOTFILE).idx: $(ROOTFILE).aux 66 touch $(ROOTFILE).idx 67 68$(ROOTFILE).bbl: $(ROOTFILE).aux 69 -bibtex $(ROOTFILE) 70 71indexfile.tex: $(ROOTFILE).idx 72 -makeindex -o indexfile.tex $(ROOTFILE).idx 73 74$(ROOTFILE).pdf: $(ROOTFILE).ps $(EPSFIGURES) 75 ps2pdf $(ROOTFILE).ps 76 77$(ROOTFILE).ps: $(ROOTFILE).dvi $(EPSFIGURES) 78 dvips -Ppdf -t a4 -o $(ROOTFILE).ps $(ROOTFILE) 79 80$(ROOTFILE).ps.Z: $(ROOTFILE).ps 81 compress -f $(ROOTFILE).ps 82 83# This preprocesses all *.tex files 84# to insert links to the bip pages 85biprefs: 86 eclipse -e "[makerefs],do" -- *.tex 87 88 89# HTML version 90 91$(ROOTFILE)/$(ROOTFILE).html: $(CHAPTERS) 92 latex2html $(ROOTFILE) 93 94 95clean: 96 rm -f *.bak *.idx *.ind *.bbl *.aux *.dvi *.toc *.log *.ilg *.blg 97 rm -f indexfile.tex 98 rm -f $(ROOTFILE).ps $(ROOTFILE).ps.Z $(ROOTFILE).pdf 99 rm -rf $(ROOTFILE) 100