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 22 23DESTFILE = libman 24 25ROOTFILE = libman 26 27CHAPTERS = $(ROOTFILE).tex solverinter.tex eplex.tex gfd.tex \ 28 repair.tex fdsets.tex extpropia.tex \ 29 extchr.tex fdglobal.tex ic.tex introduction.tex icsymbolic.tex 30 31EPSFIGURES = example1.eps 32 33#------------------- generic part ------------------- 34 35# the files that are touched by latex as a side effect 36#CHAPAUX = $(CHAPTERS:%.tex=%.aux) $(ROOTFILE).toc $(ROOTFILE).idx 37CHAPAUX = $(ROOTFILE).aux $(ROOTFILE).toc $(ROOTFILE).idx 38 39 40all: $(ROOTFILE).dvi $(ROOTFILE)/$(ROOTFILE).html 41 echo Do make install to install 42 43install: ../../doc/$(ROOTFILE).pdf $(ROOTFILE)/$(ROOTFILE).html 44 rm -rf ../../doc/$(DESTFILE) 45 mv $(ROOTFILE) ../../doc/$(DESTFILE) 46 47../../doc/$(DESTFILE).pdf: $(ROOTFILE).pdf 48 cp $(ROOTFILE).pdf ../../doc/$(DESTFILE).pdf 49 chmod 644 ../../doc/$(DESTFILE).pdf 50 51# tex -> dvi -> pdf 52 53$(ROOTFILE).dvi: $(CHAPAUX) $(ROOTFILE).ind $(ROOTFILE).bbl 54 @echo ======== UPDATE-PASS ========= 55 @for f in $(CHAPAUX); do \ 56 mv $$f $$f.old; cp $$f.old $$f; \ 57 done 58 latex $(ROOTFILE) 59 # The touches below are supposed to work around nfs clock skew problems: 60 # The latex run may leave the dvi file with a modification time in the 61 # future. Touch it to make sure the time is right relative to the 62 # subsequent touches of the aux files. Sleep in between to make sure 63 # the dvi is strictly older than the touched aux files. 64 touch $(ROOTFILE).dvi 65 sleep 1 66 @for f in $(CHAPAUX); do \ 67 if cmp -s $$f $$f.old; then mv $$f.old $$f; \ 68 else rm $$f.old; echo ==== $$f was modified ====; touch $$f; \ 69 fi \ 70 done 71 $(MAKE) $(ROOTFILE).dvi 72 73$(ROOTFILE).aux: $(CHAPTERS) 74 @echo ======== PASS 1 ========= 75 latex $(ROOTFILE) 76 77$(ROOTFILE).idx: $(ROOTFILE).aux 78 touch $(ROOTFILE).idx 79 80$(ROOTFILE).bbl: $(ROOTFILE).aux 81 -bibtex $(ROOTFILE) 82 83$(ROOTFILE).ind: $(ROOTFILE).idx 84 -makeindex $(ROOTFILE) 85 86$(ROOTFILE).pdf: $(ROOTFILE).ps $(EPSFIGURES) 87 ps2pdf $(ROOTFILE).ps 88 89$(ROOTFILE).ps: $(ROOTFILE).dvi $(EPSFIGURES) 90 dvips -Ppdf -t a4 -o $(ROOTFILE).ps $(ROOTFILE) 91 92$(ROOTFILE).ps.Z: $(ROOTFILE).ps 93 compress -f $(ROOTFILE).ps 94 95# This preprocesses all *.tex files 96# to insert links to the bip pages 97biprefs: 98 eclipse -e "[makerefs],do" -- *.tex 99 100 101# HTML version 102 103$(ROOTFILE)/$(ROOTFILE).html: $(CHAPTERS) 104 mkdir -p $(ROOTFILE) 105 hevea -fix underscore.hva url.hva $(ROOTFILE) 106 # replace the hard link index.html -> $(ROOTFILE).html by a soft link 107 # because of problems with tar on Windows 108 hacha -tocbis $(ROOTFILE).html 109 # copy the files needed for the html to $(ROOTFILE) directory 110 cp $(ROOTFILE)[0-9]??.* $(ROOTFILE)/ 111 cp $(ROOTFILE).css $(ROOTFILE)/ 112 cp contents_motif.gif next_motif.gif previous_motif.gif $(ROOTFILE) 113 cp index.html $(ROOTFILE)/$(ROOTFILE).html 114 ln -s $(ROOTFILE).html $(ROOTFILE)/index.html 115 116clean: 117 rm -f *.bak *.idx *.ind *.bbl *.aux *.dvi *.toc *.log *.ilg *.blg 118 rm -f *.hind *.haux *.hind *.htoc $(ROOTFILE).image.* index.html 119 rm -f $(ROOTFILE)[0-9]??.* 120 rm -f $(ROOTFILE).ps $(ROOTFILE).ps.Z $(ROOTFILE).pdf $(ROOTFILE).html 121 rm -rf $(ROOTFILE) 122