annotate doc/tex/Makefile @ 917:8c813d136298

Added Example for adding a Artifact for the FIS with no Products doc/trunk@1051 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 04 May 2010 11:50:53 +0000
parents 6df869086544
children
rev   line source
900
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1 # Copyright 2004 Chris Monson (shiblon@gmail.com)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2 # Latest version available at http://www.bouncingchairs.net/oss
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
4 # This file is part of ``Chris Monson's Free Software''.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
5 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
6 # ``Chris Monson's Free Software'' is free software; you can redistribute it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
7 # and/or modify it under the terms of the GNU General Public License as
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
8 # published by the Free Software Foundation, Version 2.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
9 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
10 # ``Chris Monson's Free Software'' is distributed in the hope that it will
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
11 # be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
13 # Public License for more details.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
14 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
15 # You should have received a copy of the GNU General Public License along
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
16 # with ``Chris Monson's Free Software''; if not, write to the Free Software
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
18 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
19 # It is also available on the web at http://www.gnu.org/copyleft/gpl.html
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
20 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
21 # Note that using this makefile to build your documents does NOT place them
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
22 # under the GPL unless you, the author, specifically do so. In other words,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
23 # I, Chris Monson, the copyright holder and author of this makefile,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
24 # consider it impossible to ``link'' to this makefile in any way covered by
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
25 # the GPL.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
26 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
27 # TO OBTAIN INSTRUCTIONS FOR USING THIS FILE, RUN:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
28 # make help
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
29 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
30 fileinfo := LaTeX Makefile
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
31 author := Chris Monson
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
32 version := 2.2.0-rc1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
33 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
34 # Note that the user-global version is imported *after* the source directory,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
35 # so that you can use stuff like ?= to get proper override behavior.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
36 .PHONY: Makefile GNUmakefile Makefile.ini $(HOME)/.latex-makefile/Makefile.ini
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
37 -include Makefile.ini
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
38 -include $(HOME)/.latex-makefile/Makefile.ini
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
39 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
40 # This can be pdflatex or latex - you can change this by adding the following line to your Makefile.ini:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
41 # BUILD_STRATEGY := latex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
42 BUILD_STRATEGY ?= pdflatex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
43 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
44 # Sets LC_ALL=C, by default, so that the locale-aware tools, like sort, be
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
45 # # immune to changes to the locale in the user environment.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
46 export LC_ALL ?= C
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
47 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
48 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
49 # If you specify sources here, all other files with the same suffix
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
50 # will be treated as if they were _include_ files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
51 #onlysources.tex ?= main.tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
52 #onlysources.tex.sh ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
53 #onlysources.tex.pl ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
54 #onlysources.tex.py ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
55 #onlysources.rst ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
56 #onlysources.fig ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
57 #onlysources.gpi ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
58 #onlysources.dot ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
59 #onlysources.xvg ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
60 #onlysources.svg ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
61 #onlysources.eps.gz ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
62 #onlysources.eps ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
63 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
64 # If you list files here, they will be treated as _include_ files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
65 #includes.tex ?= file1.tex file2.tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
66 #includes.tex.sh ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
67 #includes.tex.pl ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
68 #includes.tex.py ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
69 #includes.rst ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
70 #includes.fig ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
71 #includes.gpi ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
72 #includes.dot ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
73 #includes.xvg ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
74 #includes.svg ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
75 #includes.eps.gz ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
76 #includes.eps ?=
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
77 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
78 # If you list files or wildcards here, they will *not* be cleaned - default is
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
79 # to allow everything to be cleaned.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
80 #neverclean ?= *.pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
81 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
82 # Alternatively (recommended), you can add those lines to a Makefile.ini file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
83 # and it will get picked up automatically without your having to edit this
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
84 # Makefile.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
85 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
86 # KNOWN ISSUES:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
87 # * The following occurs:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
88 # file with: \usepackage{named}\bibliographystyle{named}
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
89 # Compile
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
90 # change to: \usepackage{apalike}\bibliographystyle{apalike}
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
91 # Compile again -- BARF!
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
92 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
93 # The workaround: make clean-nographics; make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
94 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
95 # Note that we may not be able to fix this. LaTeX itself barfs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
96 # on this, not the makefile. The very first invocation of LaTeX
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
97 # (when something like this has happened) reads the existing .aux
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
98 # file and discovers invalid commands like \citeauthoryear that
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
99 # are only valid in the package that was just removed. It then
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
100 # tries to parse them and explodes. It's not at all clear to me
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
101 # how to fix this. I tried removing the .aux files on the first
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
102 # run of LaTeX, but that necessarily requires more subsequent
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
103 # rebuilds on common edits. There does not appear to be a
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
104 # graceful solution to this issue.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
105 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
106 # CHANGES:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
107 # Chris Monson (2010-04-08):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
108 # * Bumped version to 2.2.0-rc1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
109 # * Added back in the rst_style_file stuff that got broken when switching
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
110 # rst -> tex to use the script mechanism
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
111 # Chris Monson (2010-03-23):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
112 # * Bumped version to 2.2.0-beta8
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
113 # * Work on issue 76: bad backtick escape for some sed versions, failure
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
114 # to clear out the hold buffer when outputting MISSING comment.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
115 # - Backed out 2>&1 to &> (doesn't work in sh)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
116 # - Backed out using . to source variables
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
117 # Chris Monson (2010-03-22):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
118 # * Bumped version to 2.2.0-beta7
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
119 # * Issue 72: Fix latex/bibtex invocation order for annotated bib styles
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
120 # * Fixed informational output to reflect which LaTeX run we're on
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
121 # * Fixed graphic detection to include graphics that are already there in
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
122 # .d files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
123 # * Tightened up the .d file output to only make .d depend on graphic
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
124 # *source* files. This means that building foo.d no longer
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
125 # builds all of the graphics files on which foo.tex depends.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
126 # Had to use .SECONDEXPANSION trickery to make it work.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
127 # * Changed get-graphics to only accept a stem.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
128 # * Fixed build-once logic for scripted .tex to work better
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
129 # * Made get-inputs sed script more maintainable.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
130 # * Moved Makefile.ini import up higher.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
131 # * Changed bare stems to not recursively invoke make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
132 # * Updated diff output to be more silent everywhere
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
133 # * Added a MISSING comment to the .d file if stuff isn't found - forces
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
134 # removal of .1st.make file, which often forces it to try again.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
135 # * Fixed broken graphics-target function
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
136 # * Added sleep to .d file generation when stuff is missing - if it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
137 # builds too fast, make doesn't realize it needs to be reloaded,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
138 # and thus never discovers some deeper dependencies (especially
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
139 # evident when graphics are included from scripted include
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
140 # files).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
141 # Chris Monson (2010-03-17):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
142 # * Bumped version to 2.2.0-beta6
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
143 # * Fixed bareword builds to actually work (requires static patterns)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
144 # * Fixed colorization to work with new paragraph stuff
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
145 # Chris Monson (2010-03-17):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
146 # * Bumped version to 2.2.0-beta5
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
147 # * Fixed graphic detection to be much more focused - splits log file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
148 # into paragraphs before doing pattern matching.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
149 # * Fixed make foo to work properly (recursively calls make foo.pdf)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
150 # * Fixed gpi -> pdf generation to not waste time building .eps *after*
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
151 # the pdf already exists.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
152 # * Changed log copies to include MAKE_RESTARTS as part of the name.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
153 # * Fixed missing include file detection (also makes use of the paragraph
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
154 # stuff) to detect missing scripted include files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
155 # Chris Monson (2010-03-16):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
156 # * Bumped version to 2.2.0-beta4
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
157 # * issue 70: .pdf not moved out of the way properly on first
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
158 # compilation, resulting in early error detection failure.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
159 # * issue 74: fixed broken error on missing .aux files: the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
160 # implementation was masking real errors.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
161 # Chris Monson (2010-03-15):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
162 # * Bumped version to 2.2.0-beta3
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
163 # * issue 71: Made the tput dependency optional
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
164 # * issue 73: Made .tex targets not pull in .d files (building them from
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
165 # scripts should not require a .d)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
166 # * issue 74: Output a much saner error when a .aux file is not produced
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
167 # (e.g., when you are typing "make" without arguments in a
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
168 # directory with included .tex files that are not named with
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
169 # ._include_.)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
170 # Chris Monson (2010-03-11):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
171 # * Bumped version to 2.2.0-beta2
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
172 # * Fixed clean-graphics to get rid of intermediate .eps files that may
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
173 # be hanging around
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
174 # * Added an automatic setting to use eps terminals in pdflatex mode for
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
175 # gnuplot if it doesn't understand pdf.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
176 # * issue 66: Removed grayscale generation via magic suffix. Grayscale
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
177 # generation is now only available via GRAY=1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
178 # * issue 68: Added explicit handling of LC_ALL for locale-aware tools
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
179 # like "sort"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
180 # Chris Monson (2010-03-10):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
181 # * Bumped version to 2.2.0-beta1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
182 # * Fixed success message to handle output message in different places
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
183 # * Added name of produced file to success message
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
184 # Chris Monson (2010-03-10):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
185 # * Bumped version to 2.2.0-alpha3
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
186 # * Added meaningful error message for wrong hyperref options
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
187 # * Added meaningful error message for incorrect graphics extensions
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
188 # Chris Monson (2010-03-09):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
189 # * Bumped version to 2.2.0-alpha2
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
190 # * Updated graphics handling (gnuplot and fig generate pdf natively)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
191 # * Changed xmgrace to output monochrome natively
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
192 # Chris Monson (2010-03-09):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
193 # * Bumped version to 2.2.0-alpha1 - major change!
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
194 # * Support pdflatex natively and by default (issue 6 - a long time coming)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
195 # * Add ability to have a single $HOME/.latex-makefile/Makefile.ini for
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
196 # all invocations
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
197 # * Reworked graphic inclusion detection so that extensions need not be
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
198 # specified for either build strategy (e.g.,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
199 # \includegraphics{test1.eps} -> \includegrahpics{test1})
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
200 # * Changed log format to include filenames and line numbers
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
201 # Chris Monson (2010-02-04):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
202 # * Bumped version to 2.1.43
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
203 # * All of the following are for issue 63 (thanks to mojoh81):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
204 # * Added documentation about fixing Makefile.ini default target
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
205 # * Added perl and python script targets
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
206 # * Fixed run logic to allow included .tex files to be scripted (the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
207 # run-again logic now detects missing .tex files, and the MV
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
208 # command has been switched out for a command that only invokes
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
209 # MV if the files exist)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
210 # * Changed scripted generation to only run once per make invocation
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
211 # * Added dependency on expr
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
212 # Chris Monson (2010-01-19):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
213 # * Bumped version to 2.1.42
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
214 # * issue 62: Added .brf extension to cleanable files (backrefs)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
215 # Chris Monson (2010-01-07):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
216 # * Bumped version to 2.1.41
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
217 # * issue 60: bad makeindex runs now error out on subsequent tries
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
218 # Chris Monson (2009-12-01):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
219 # * Bumped version to 2.1.40
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
220 # * issue 36: build all indices (for e.g., splitidx usage)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
221 # * issue 59: clean up all generated files (including indices)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
222 # Chris Monson (2009-11-23):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
223 # * Bumped version to 2.1.39
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
224 # * issue 57: change ps2pdf invocations to just use gs directly
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
225 # Chris Monson (2009-11-19):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
226 # * Bumped version to 2.1.38
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
227 # * issue 57: Added some limited support for Cygwin (spaces in filenames)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
228 # Chris Monson (2009-11-15):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
229 # * Bumped version to 2.1.37
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
230 # * Removed svninfo, since this is now managed by mercurial
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
231 # * Fixed typo in changelist
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
232 # * Issue 52: added jpg->eps conversion (thanks to brubakee)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
233 # * Issue 54: fix missing Overfull colorization due to lack of a blank
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
234 # line preceding the first error.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
235 # * Issue 51: remove head.tmp and body.tmp in make clean invocation
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
236 # * Issue 56: maintain multiple versions of log files (for debugging)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
237 # Chris Monson (2009-11-14):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
238 # * Bumped version to 2.1.36
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
239 # * Issues 53 and 49: added .brf, .mtc, and .maf to the cleanables
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
240 # Chris Monson (2009-11-05):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
241 # * Bumped version to 2.1.35
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
242 # * Added nomenclature support (see issue 48)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
243 # Chris Monson (2009-10-29):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
244 # * Bumped version to 2.1.34
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
245 # * Fixed _out_ creation bug introduced in 2.1.33 (it was always created)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
246 # * Fixed erroneous help output for $HOME in BINARY_TARGET_DIR
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
247 # * Changed contact email address - bring on the spam!
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
248 # Chris Monson (2009-10-21):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
249 # * Bumped version to 2.1.33
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
250 # * Fixed issue 46, adding support for dot2tex (thanks to fdemesmay)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
251 # * Made all_files.* settable in Makefile.ini (using ?= instead of :=)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
252 # * Fixed issue 47, thanks to fdemesmay: add binary copy directory, copy
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
253 # dvi, pdf, and ps if it exists
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
254 # Chris Monson (2009-09-25):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
255 # * Bumped version to 2.1.32
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
256 # * Fixed so that a changed lol file will cause a rebuild
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
257 # * Added .lol files to the cleanable list
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
258 # Chris Monson (2009-09-08):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
259 # * Bumped version to 2.1.31
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
260 # * Closed issue 43: evince doesn't notice pdf change w/out touch
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
261 # Chris Monson (2009-08-28):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
262 # * Bumped version to 2.1.30
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
263 # * Closed issue 39: Capture multi-line log warnings/errors to output
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
264 # Chris Monson (2009-08-26):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
265 # * Bumped version to 2.1.29
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
266 # * Closed issue 42: add svg support using inkscape
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
267 # Chris Monson (2009-08-17):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
268 # * Bumped version to 2.1.28
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
269 # * Patch from paul.biggar for issue 38: package warnings are overlooked
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
270 # Chris Monson (2009-08-07):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
271 # * Bumped version to 2.1.27
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
272 # * Included patch for issue 37 - removes pdf/ps files before copying,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
273 # allowing some broken viewers to see changes properly.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
274 # Chris Monson (2009-05-15):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
275 # * Bumped version to 2.1.26
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
276 # * Included patch for issue 9 from favonia - detects .fig changes for
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
277 # pstex files during regular compilation, so long as the pstex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
278 # has been built at least once with make all-pstex.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
279 # Chris Monson (2009-03-27):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
280 # * Bumped version to 2.1.25
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
281 # * Cleaned up a bunch of variable setting stuff - more stuff is now
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
282 # settable from Makefile.ini
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
283 # * Cleaned up documentation for various features, especially settable
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
284 # variables.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
285 # * issue 28: support for png -> eps conversion (it even looks good!)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
286 # * issue 29: support for "neverclean" files in Makefile.ini
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
287 # * issue 30: make ps2pdf14 the default - fall back when not there
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
288 # Chris Monson (2009-03-09):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
289 # * Bumped version to 2.1.24
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
290 # * issue 27: xmgrace support (thanks to rolandschulzhd)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
291 # Chris Monson (2008-10-23):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
292 # * Bumped version to 2.1.23
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
293 # * issue 23: fixed _check_programs to not use bash string subs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
294 # Chris Monson (2008-09-02):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
295 # * Bumped version to 2.1.22
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
296 # * Appled patch from Holger <yllohy@googlemail.com> to add include
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
297 # sources and some documentation updates.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
298 # * Updated backup_patterns to be a bit more aggressive (also thanks to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
299 # Holger)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
300 # Chris Monson (2008-08-30):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
301 # * Bumped version to 2.1.21
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
302 # * Added ability to specify onlysources.* variables to indicate the only
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
303 # files that should *not* be considered includes. Thanks to Holger
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
304 # <yllohy@googlemail.com> for this patch.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
305 # * Added an automatic include of Makefile.ini if it exists. Allows
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
306 # settings to be made outside of this makefile.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
307 # Chris Monson (2008-05-21):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
308 # * Bumped version to 2.1.20
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
309 # * Added manual pstex compilation support (run make all-pstex first)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
310 # * Removed all automatic pstex support. It was totally breaking
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
311 # everything and is very hard to incorporate into the makefile
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
312 # concept because it requires LaTeX to *fail* before it can
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
313 # determine that it needs the files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
314 # Chris Monson (2008-04-17):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
315 # * Bumped version to 2.1.19
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
316 # * Changed the pstex build hack to be on by default
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
317 # Chris Monson (2008-04-09):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
318 # * Bumped version to 2.1.18
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
319 # * issue 16: fixed pstex build problems, seems nondeterministic. Added
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
320 # gratuitious hack for testing: set PSTEX_BUILD_ALL_HACK=1.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
321 # Chris Monson (2008-04-09):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
322 # * Bumped version to 2.1.17
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
323 # * issue 20: fixed accumulation of <pid>*.make files - wildcard was
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
324 # refusing to work on files that are very recently created.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
325 # Chris Monson (2008-04-02):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
326 # * Bumped version to 2.1.16
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
327 # * issue 19: Removed the use of "type" to fix broken "echo" settings
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
328 # Chris Monson (2008-03-27):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
329 # * Bumped version to 2.1.15
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
330 # * issue 18: Favors binary echo over builtin, as binary understands -n
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
331 # * issue 16: Fixed handling of missing pstex_t files in the log
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
332 # * issue 9: Added .SECONDARY target for .pstex files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
333 # Chris Monson (2008-03-21):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
334 # * Bumped version to 2.1.14
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
335 # * Fixed broken aux file flattening, which caused included bibs to be
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
336 # missed.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
337 # Chris Monson (2008-03-20):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
338 # * Bumped version to 2.1.13
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
339 # * Changed error output colorization to show errors for missing files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
340 # that are not graphics files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
341 # Chris Monson (2008-03-20):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
342 # * Bumped version to 2.1.12
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
343 # * Fixed a regression introduced in r28 that makes bibtex fail when
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
344 # there is no index file present
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
345 # Chris Monson (2008-03-03):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
346 # * Bumped version to 2.1.11
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
347 # * Fixed issue 11 (handle index files, reported by abachn)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
348 # * Cleaned up some comments and help text
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
349 # Chris Monson (2008-01-24):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
350 # * Bumped version to 2.1.10
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
351 # * Fixed to work when 'sh' is a POSIX shell like 'dash'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
352 # Chris Monson (2007-12-12):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
353 # * Bumped version to 2.1.9
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
354 # * Fixed documentation and dependency graph for pstex files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
355 # Chris Monson (2007-12-12):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
356 # * Bumped version to 2.1.8
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
357 # * Added basic pstex_t support for fig files (Issue 9 by favonia)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
358 # I still suggest that psfrag be used instead.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
359 # Chris Monson (2007-10-16):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
360 # * Bumped version to 2.1.7
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
361 # * Removed todo item: allow other comment directives for rst conversion
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
362 # * Added ability to use global rst style file _rststyle_._include_.tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
363 # * Added help text to that effect
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
364 # Chris Monson (2007-05-20):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
365 # * Bumped version to 2.1.6
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
366 # * Changed default paper size for rst files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
367 # * Added todo item: fix paper size for rst files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
368 # * Added todo item: allow other comment directives for rst conversion
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
369 # Chris Monson (2007-04-02):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
370 # * Bumped version to 2.1.5
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
371 # * Addressed Issue 7, incorrect .gpi.d generation in subdirectories
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
372 # Chris Monson (2007-03-28):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
373 # * Bumped version to 2.1.4
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
374 # * Fixed syntax error in dot output
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
375 # Chris Monson (2007-03-01):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
376 # * Bumped version to 2.1.3
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
377 # * Added reST to the included documentation
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
378 # * Fixed graphics and script generation to be settable in the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
379 # environment.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
380 # Chris Monson (2007-02-23):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
381 # * Bumped version to 2.1.2
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
382 # * Added the ability to generate .tex files from .rst files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
383 # Chris Monson (2006-10-17):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
384 # * Bumped version to 2.1.1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
385 # * Fixed includes from subdirectories (sed-to-sed slash escape problem)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
386 # Chris Monson (2006-10-05):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
387 # * Bumped version to 2.1.0 (pretty serious new feature added)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
388 # * New feature: bib files can now be anywhere on the BIBINPUTS path
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
389 # * New programs: kpsewhich (with tetex) and xargs (BSD)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
390 # Chris Monson (2006-09-28):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
391 # * Bumped version to 2.0.9
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
392 # * Added ability to parse more than one bibliography
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
393 # Chris Monson (2006-06-01):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
394 # * Bumped version to 2.0.8
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
395 # * Added .vrb to the list of cleaned files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
396 # Chris Monson (2006-04-26):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
397 # * Bumped version to 2.0.7
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
398 # * Fixed so that clean-nographics does not remove .gpi.d files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
399 # * Removed jpg -> eps hack (not working properly -- just pre-convert)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
400 # * Fixed so that postscript grayscale can be done with BSD sed
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
401 # Chris Monson (2006-04-25):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
402 # * Bumped version to 2.0.6
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
403 # * Fixed so that changed toc, lot, lof, or out causes a rebuild
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
404 # Chris Monson (2006-04-17):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
405 # * Bumped version to 2.0.5
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
406 # * Added jpg -> eps conversion target
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
407 # Chris Monson (2006-04-12):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
408 # * Bumped version to 2.0.4
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
409 # * Fixed BSD sed invocation to not use \| as a branch delimiter
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
410 # * Added a comment section on what is and is not allowed in BSD sed
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
411 # * Made paper size handling more robust while I was at it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
412 # * Fixed postscript RGB grayscale to use a weighted average
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
413 # * Fixed postscript HSB grayscale to convert to RGB first
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
414 # * Fixed a problem with rebuilding .bbl files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
415 # Chris Monson (2006-04-11):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
416 # * Bumped version to 2.0.3
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
417 # * Fixed some BSD sed problems: can't use \n in substitutions
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
418 # Chris Monson (2006-04-10):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
419 # * Bumped version to 2.0.2
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
420 # * Once again removed ability to create .tex files from scripts
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
421 # * \includeonly works again
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
422 # Chris Monson (2006-04-09):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
423 # * Bumped version to 2.0.1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
424 # * Fixed grayscale postscript handling to be more robust
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
425 # * Added ability to generate ._gray_. files from eps and eps.gz
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
426 # * Added ability to clean ._gray_.eps files created from .eps files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
427 # Chris Monson (2006-04-07):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
428 # * Bumped version to 2.0.0
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
429 # * Removed clunky ability to create included .tex files from scripts
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
430 # * Added note in the help about included tex scripting not working
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
431 # * Fixed the .eps generation to delete %.gpihead.make when finished
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
432 # * Abandoned designs to use shell variables to create sed scripts
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
433 # * Abandoned __default__.tex.sh idea: it causes recursion with %: .
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
434 # * Removed web page to-do. All items are now complete.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
435 # * Added better grayscale conversion for dot figures (direct ps fixup).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
436 # * Include files can now be scripted (at the expense of \includeonly).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
437 # * Updated dependency graph to contain better node names.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
438 # Chris Monson (2006-04-06):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
439 # * Bumped version to 2.0b3
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
440 # * Top level includes now fail if there is no rule to build them
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
441 # * A helpful message is printed when they do fail
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
442 # * Grayscale has been changed to be ._gray_, other phonies use _ now, too
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
443 # * Grayscale handling has been completed
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
444 # * Changed _include_stems target to _includes target.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
445 # * Fixed _includes target to be useful by itself.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
446 # * Removed the ability to specify clean and build targets at once
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
447 # * Verified that epsfig works fine with current code
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
448 # * Fixed included scripts so that they are added to the dep files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
449 # * Fixed so that graphics includes don't happen if they aren't for gpi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
450 # * Fixed dot output to allow grayscale.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
451 # Chris Monson (2006-04-05):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
452 # * Bumped version to 2.0b2
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
453 # * Removed automatic -gray output. It needs fixing in a bad way.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
454 # * Revamped dependency creation completely.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
455 # * Fixed conditional inclusion to actually work (test.nobuild.d, test.d).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
456 # * Fixed clean target to remove log targets
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
457 # * Added the 'monochrome' word for gray gpi output
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
458 # * Added a _check_gpi_files target that checks for common problems
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
459 # * Changed the _version target into the version target (no _)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
460 # * Added better handling of grayscale files. Use the .gray.pdf target.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
461 # * Fixed testing for rebuilds
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
462 # Chris Monson (2006-04-04):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
463 # * Bumped version to 2.0b1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
464 # * Changed colorization of output
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
465 # * Made .auxbbl and .auxtex .make files secondary targets
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
466 # * Shortened and simplified the final latex invocation loop
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
467 # * Added version-specific output ($$i vs. $$$$i) in latex loop
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
468 # * Added a build message for the first .dvi run (Building .dvi (0))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
469 # * Removed some build messages that most people don't care about.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
470 # * Simplified procedure for user-set colors -- simple text specification
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
471 # * Fixed diff output to...not output.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
472 # * Fixed rerun bug -- detect not only when preceded with LaTeX Warning
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
473 # * Sped up gpi plotting
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
474 # * Added error handling and colorized output for gpi failure
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
475 # * Documented color changing stuff.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
476 # * Now sort the flattened aux file to avoid false recompilation needs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
477 # * Added clean-nographics target
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
478 # * Don't remove self.dvi file if self.aux is missing in the log
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
479 # * Clarified some code. Did some very minor adjusting.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
480 # Chris Monson (2006-04-03):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
481 # * Bumped version to 2.0a7
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
482 # * Added .dvi and .ps files as secondary files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
483 # * Fixed handling of multiple run detection when includeonly is in use.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
484 # * Added code to flatten .aux files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
485 # * Added more files as .SECONDARY prerequisites to avoid recompilation.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
486 # * Fixed the inputs generation to be much simpler and to use pipes.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
487 # * Added the dependency graph directly into the makefile.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
488 # * Changed flatten-aux to remove \@writefile \relax \newlabel, etc.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
489 # * Undid pipe changes with sed usage (BSD sed doesn't know -f-).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
490 # * Added a _check_programs target that tells you what your system has.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
491 # * Fixed an error in colorization that made unnecessary errors appear
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
492 # * Added view targets.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
493 # * Updated help text.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
494 # * Augmented cookies so that .aux can trigger .bbl and .dvi rebuilds
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
495 # * Added more informative error handling for dvips and ps2pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
496 # Chris Monson (2006-04-02):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
497 # * Bumped version to 2.0a6
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
498 # * Added indirection to .bbl dependencies to avoid rebuilding .bbl files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
499 # * Streamlined the diff invocation to eliminate an existence test
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
500 # * Removed special shell quote escape variables
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
501 # * Moved includes to a more prominent location
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
502 # * Fixed .inputs.make to not contain .aux files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
503 # * Fixed embedding to use a file instead of always grepping.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
504 # * Added *.make.temp to the list of cleanable files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
505 # * Fixed Ruby. It should now be supported properly.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
506 # * Now differentiate between all, default, and buildable files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
507 # * Fixed to bail out on serious errors.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
508 # * Revised the handling of includable files. Still working on it.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
509 # Chris Monson (2006-03-31):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
510 # * Bumped version to 2.0a5
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
511 # * Fixed a bug with LaTeX error detection (there can be spaces)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
512 # * Added .bbl support, simplifying everything and making it more correct
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
513 # * Refactored some tests that muddy the code
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
514 # * Did a little cleanup of some shell loops that can safely be make loops
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
515 # * Added support for graphviz .dot files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
516 # * Made _all_programs output easier to read
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
517 # * Added the ruby support that has long been advertised
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
518 # * Font embedding was screwed up for PostScript -- now implicit
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
519 # * Changed the generation of -gray.gpi files to a single command
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
520 # * Changed any make-generated file that is not included from .d to .make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
521 # Chris Monson (2006-03-30):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
522 # * Bumped version to 2.0a4
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
523 # * Fixed a bug with very long graphics file names
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
524 # * Added a todo entry for epsfig support
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
525 # * Fixed a bug paper size bug: sometimes more than one entry appears
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
526 # * Fixed DVI build echoing to display the number instead of process ID
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
527 # * DVI files are now removed on first invocation if ANY file is missing
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
528 # * Added a simple grayscale approach: if a file ends with -gray.gpi, it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
529 # is created from the corresponding .gpi file with a special
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
530 # comment ##GRAY in its header, which causes coloring to be
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
531 # turned off.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
532 # * Fixed a bug in the handling of .tex.sh files. For some reason I had
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
533 # neglected to define file stems for scripted output.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
534 # * Removed a trailing ; from the %.graphics dependencies
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
535 # * Added dvips embedding (I think it works, anyway)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
536 # Chris Monson (2006-03-29):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
537 # * Bumped version to 2.0a3
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
538 # * Fixed error in make 3.79 with MAKEFILE_LIST usage
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
539 # * Added the presumed filename to the _version output
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
540 # * Added a vim macro for converting sed scripts to make commands
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
541 # * Added gpi dependency support (plotting external files and loading gpi)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
542 # * Allow .gpi files to be ignored if called .include.gpi or .nobuild.gpi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
543 # * Fixed sed invocations where \+ was used. BSD sed uses \{1,\}.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
544 # Chris Monson (2006-03-28):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
545 # * Bumped version to 2.0a2
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
546 # * Added SHELL_DEBUG and VERBOSE options
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
547 # * Changed the default shell back to /bin/sh (unset, in other words)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
548 # * Moved .PHONY declarations closer to their targets
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
549 # * Moved help text into its own define block to obtain better formatting
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
550 # * Removed need for double-entry when adding a new program invocation
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
551 # * Moved .SECONDARY declaration closer to its relevant occurrence
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
552 # * Commented things more heavily
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
553 # * Added help text about setting terminal and output in gnuplot
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
554 # * Created more fine-grained clean targets
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
555 # * Added a %.graphics target that generates all of %'s graphics
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
556 # * Killed backward-compatible graphics generation (e.g., eps.gpi=gpi.eps)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
557 # * For now, we're just GPL 2, not 3. Maybe it will change later
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
558 # * Made the version and svninfo into variables
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
559 # Chris Monson (2006-03-27):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
560 # * Bumped version to 2.0a1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
561 # * Huge, sweeping changes -- automatic dependencies
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
562
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
563 # IMPORTANT!
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
564 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
565 # When adding to the following list, do not introduce any blank lines. The
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
566 # list is extracted for documentation using sed and is terminated by a blank
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
567 # line.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
568 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
569 # EXTERNAL PROGRAMS:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
570 # = ESSENTIAL PROGRAMS =
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
571 # == Basic Shell Utilities ==
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
572 CAT ?= cat
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
573 CP ?= cp -f
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
574 DIFF ?= diff
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
575 ECHO ?= echo
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
576 EGREP ?= egrep
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
577 ENV ?= env
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
578 EXPR ?= expr
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
579 MV ?= mv -f
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
580 SED ?= sed
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
581 SORT ?= sort
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
582 TOUCH ?= touch
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
583 UNIQ ?= uniq
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
584 WHICH ?= which
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
585 XARGS ?= xargs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
586 SLEEP ?= sleep
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
587 # == LaTeX (tetex-provided) ==
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
588 BIBTEX ?= bibtex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
589 DVIPS ?= dvips
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
590 LATEX ?= latex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
591 PDFLATEX ?= pdflatex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
592 EPSTOPDF ?= epstopdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
593 MAKEINDEX ?= makeindex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
594 KPSEWHICH ?= kpsewhich
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
595 GS ?= gs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
596 # = OPTIONAL PROGRAMS =
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
597 # == Makefile Color Output ==
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
598 TPUT ?= tput
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
599 # == TeX Generation ==
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
600 PERL ?= perl
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
601 PYTHON ?= python
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
602 RST2LATEX ?= rst2latex.py
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
603 # == EPS Generation ==
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
604 CONVERT ?= convert # ImageMagick
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
605 DOT ?= dot # GraphViz
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
606 DOT2TEX ?= dot2tex # dot2tex - add options (not -o) as needed
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
607 FIG2DEV ?= fig2dev # XFig
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
608 GNUPLOT ?= gnuplot # GNUplot
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
609 INKSCAPE ?= inkscape # Inkscape (svg support)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
610 XMGRACE ?= xmgrace # XMgrace
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
611 PNGTOPNM ?= pngtopnm # From NetPBM - step 1 for png -> eps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
612 PPMTOPGM ?= ppmtopgm # From NetPBM - (gray) step 2 for png -> eps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
613 PNMTOPS ?= pnmtops # From NetPBM - step 3 for png -> eps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
614 GUNZIP ?= gunzip # GZipped EPS
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
615 # == Beamer Enlarged Output ==
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
616 PSNUP ?= psnup
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
617 # == Viewing Stuff ==
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
618 VIEW_POSTSCRIPT ?= gv
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
619 VIEW_PDF ?= xpdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
620 VIEW_GRAPHICS ?= display
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
621
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
622 # Command options for embedding fonts and postscript->pdf conversion
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
623 PS_EMBED_OPTIONS ?= -dPDFSETTINGS=/printer -dEmbedAllFonts=true -dSubsetFonts=true -dMaxSubsetPct=100
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
624 PS_COMPATIBILITY ?= 1.4
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
625
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
626 # Defaults for GPI
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
627 DEFAULT_GPI_EPS_FONTSIZE ?= 22
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
628 DEFAULT_GPI_PDF_FONTSIZE ?= 12
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
629
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
630 # Style file for ReST
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
631 RST_STYLE_FILE ?= $(wildcard _rststyle_._include_.tex)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
632
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
633 # This ensures that even when echo is a shell builtin, we still use the binary
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
634 # (the builtin doesn't always understand -n)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
635 FIXED_ECHO := $(if $(findstring -n,$(shell $(ECHO) -n)),$(shell which echo),$(ECHO))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
636 ECHO := $(if $(FIXED_ECHO),$(FIXED_ECHO),$(ECHO))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
637
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
638 define determine-gnuplot-output-extension
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
639 $(if $(shell $(WHICH) $(GNUPLOT)),
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
640 $(if $(findstring unknown or ambiguous, $(shell $(GNUPLOT) -e "set terminal pdf" 2>&1)),
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
641 eps, pdf),
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
642 none)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
643 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
644
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
645 GNUPLOT_OUTPUT_EXTENSION ?= $(strip $(call determine-gnuplot-output-extension))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
646
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
647 # Directory into which we place "binaries" if it exists.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
648 # Note that this can be changed on the commandline or in Makefile.ini:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
649 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
650 # Command line:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
651 # make BINARY_TARGET_DIR=$HOME/pdfs myfile.pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
652 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
653 # Also, you can specify a relative directory (relative to the Makefile):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
654 # make BINARY_TARGET_DIR=pdfs myfile.pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
655 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
656 # Or, you can use Makefile.ini:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
657 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
658 # BINARY_TARGET_DIR := $(HOME)/bin_out
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
659 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
660 BINARY_TARGET_DIR ?= _out_
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
661
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
662 RESTARTS := $(if $(MAKE_RESTARTS),$(MAKE_RESTARTS),0)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
663 # SH NOTES
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
664 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
665 # On some systems, /bin/sh, which is the default shell, is not linked to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
666 # /bin/bash. While bash is supposed to be sh-compatible when invoked as sh, it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
667 # just isn't. This section details some of the things you have to stay away
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
668 # from to remain sh-compatible.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
669 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
670 # * File pattern expansion does not work for {}
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
671 # * [ "$x" = "$y" ] has to be [ x"$x" x"$y" ]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
672 # * &> for stderr redirection doesn't work, use 2>&1 instead
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
673 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
674 # BSD SED NOTES
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
675 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
676 # BSD SED is not very nice compared to GNU sed, but it is the most
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
677 # commonly-invoked sed on Macs (being based on BSD), so we have to cater to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
678 # it or require people to install GNU sed. It seems like the GNU
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
679 # requirement isn't too bad since this makefile is really a GNU makefile,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
680 # but apparently GNU sed is much less common than GNU make in general, so
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
681 # I'm supporting it here.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
682 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
683 # Sad experience has taught me the following about BSD sed:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
684 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
685 # * \+ is not understood to mean \{1,\}
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
686 # * \| is meaningless (does not branch)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
687 # * \n cannot be used as a substitution character
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
688 # * ? does not mean \{0,1\}, but is literal
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
689 # * a\ works, but only reliably for a single line if subsequent lines
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
690 # have forward slashes in them (as is the case in postscript)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
691 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
692 # For more info (on the Mac) you can consult
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
693 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
694 # man -M /usr/share/man re_format
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
695 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
696 # And look for the word "Obsolete" near the bottom.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
697
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
698 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
699 # EXTERNAL PROGRAM DOCUMENTATION SCRIPT
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
700 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
701
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
702 # $(call output-all-programs,[<output file>])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
703 define output-all-programs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
704 [ -f '$(this_file)' ] && \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
705 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
706 -e '/^[[:space:]]*#[[:space:]]*EXTERNAL PROGRAMS:/,/^$$/!d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
707 -e '/EXTERNAL PROGRAMS/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
708 -e '/^$$/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
709 -e '/^[[:space:]]*#/i\ '\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
710 -e 's/^[[:space:]]*#[[:space:]][^=]*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
711 $(this_file) $(if $1,> '$1',) || \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
712 $(ECHO) "Cannot determine the name of this makefile."
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
713 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
714
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
715 # If they misspell gray, it should still work.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
716 GRAY ?= $(call get-default,$(GREY),)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
717
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
718 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
719 # Utility Functions and Definitions
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
720 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
721
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
722 # While not exactly a make function, this vim macro is useful. It takes a
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
723 # verbatim sed script and converts each line to something suitable in a command
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
724 # context. Just paste the script's contents into the editor, yank this into a
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
725 # register (starting at '0') and run the macro once for each line of the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
726 # original script:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
727 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
728 # 0i -e :s/\$/$$/eg
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
729 :s/'/'"'"'/eg
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
730 ^Ela'A' \:noh
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
731 j
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
732
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
733 # don't call this directly - it is here to avoid calling wildcard more than
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
734 # once in remove-files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
735 remove-files-helper = $(if $1,$(RM) $1,$(sh_true))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
736
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
737 # $(call remove-files,file1 file2)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
738 remove-files = $(call remove-files-helper,$(wildcard $1))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
739
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
740 # Removes all cleanable files in the given list
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
741 # $(call clean-files,file1 file2 file3 ...)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
742 # Works exactly like remove-files, but filters out files in $(neverclean)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
743 clean-files = \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
744 $(call remove-files-helper,$(call cleanable-files,$(wildcard $1)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
745
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
746 # Outputs all generated files to STDOUT, along with some others that are
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
747 # created by these (e.g., .idx files end up producing .ilg and .ind files).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
748 # Discovered by reading *.fls OUTPUT lines and producing corresponding .ind
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
749 # filenames as needed.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
750 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
751 # $(call get-generated-names,<source recorder file (*.fls)>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
752 define get-generated-names
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
753 [ -f '$1' ] && \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
754 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
755 -e '/^OUTPUT /{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
756 -e ' s///' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
757 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
758 -e ' s/\.idx/\.ind/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
759 -e ' s/\.ind/\.ilg/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
760 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
761 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
762 '$1' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
763 | $(SORT) | $(UNIQ)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
764 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
765
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
766 # This removes files without checking whether they are there or not. This
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
767 # sometimes has to be used when the file is created by a series of shell
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
768 # commands, but there ends up being a race condition: make doesn't know about
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
769 # the file generation as quickly as the system does, so $(wildcard ...) doesn't
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
770 # work right. Blech.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
771 # $(call remove-temporary-files,filenames)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
772 remove-temporary-files = $(if $1,$(RM) $1,:)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
773
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
774 # Create an identifier from a file name
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
775 # $(call cleanse-filename,filename)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
776 cleanse-filename = $(subst .,_,$(subst /,__,$1))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
777
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
778 # Escape dots
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
779 # $(call escape-dots,str)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
780 escape-dots = $(subst .,\\.,$1)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
781
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
782 # Test that a file exists
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
783 # $(call test-exists,file)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
784 test-exists = [ -e '$1' ]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
785
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
786 # $(call move-files,source,destination)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
787 move-if-exists = $(call test-exists,$1) && $(MV) '$1' '$2'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
788
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
789 # Copy file1 to file2 only if file2 doesn't exist or they are different
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
790 # $(call copy-if-different,sfile,dfile)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
791 copy-if-different = $(call test-different,$1,$2) && $(CP) '$1' '$2'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
792 copy-if-exists = $(call test-exists,$1) && $(CP) '$1' '$2'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
793 move-if-different = $(call test-different,$1,$2) && $(MV) '$1' '$2'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
794 replace-if-different-and-remove = \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
795 $(call test-different,$1,$2) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
796 && $(MV) '$1' '$2' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
797 || $(call remove-files,'$1')
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
798
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
799 # Note that $(DIFF) returns success when the files are the SAME....
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
800 # $(call test-different,sfile,dfile)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
801 test-different = ! $(DIFF) -q '$1' '$2' >/dev/null 2>&1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
802 test-exists-and-different = \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
803 $(call test-exists,$2) && $(call test-different,$1,$2)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
804
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
805 # Return value 1, or value 2 if value 1 is empty
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
806 # $(call get-default,<possibly empty arg>,<default value if empty>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
807 get-default = $(if $1,$1,$2)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
808
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
809 # Copy a file and log what's going on
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
810 # $(call copy-with-logging,<source>,<target>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
811 define copy-with-logging
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
812 if [ -d '$2/' ]; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
813 if $(CP) '$1' '$2/'; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
814 $(ECHO) "$(C_INFO)Copied '$1' to '$2/'$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
815 else \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
816 $(ECHO) "$(C_ERROR)Failed to copy '$1' to '$2/'$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
817 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
818 fi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
819 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
820
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
821 # Gives a reassuring message about the failure to find include files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
822 # $(call include-message,<list of include files>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
823 define include-message
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
824 $(strip \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
825 $(if $(filter-out $(wildcard $1),$1),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
826 $(shell $(ECHO) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
827 "$(C_INFO)NOTE: You may ignore warnings about the"\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
828 "following files:" >&2;\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
829 $(ECHO) >&2; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
830 $(foreach s,$(filter-out $(wildcard $1),$1),$(ECHO) ' $s' >&2;)\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
831 $(ECHO) "$(C_RESET)" >&2)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
832 ))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
833 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
834 # Characters that are hard to specify in certain places
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
835 space := $(empty) $(empty)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
836 colon := \:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
837 comma := ,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
838
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
839 # Useful shell definitions
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
840 sh_true := :
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
841 sh_false := ! :
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
842
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
843 # Clear out the standard interfering make suffixes
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
844 .SUFFIXES:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
845
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
846 # Turn off forceful rm (RM is usually mapped to rm -f)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
847 ifdef SAFE_RM
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
848 RM := rm
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
849 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
850
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
851 # Turn command echoing back on with VERBOSE=1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
852 ifndef VERBOSE
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
853 QUIET := @
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
854 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
855
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
856 # Turn on shell debugging with SHELL_DEBUG=1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
857 # (EVERYTHING is echoed, even $(shell ...) invocations)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
858 ifdef SHELL_DEBUG
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
859 SHELL += -x
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
860 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
861
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
862 # Get the name of this makefile (always right in 3.80, often right in 3.79)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
863 # This is only really used for documentation, so it isn't too serious.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
864 ifdef MAKEFILE_LIST
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
865 this_file := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
866 else
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
867 this_file := $(wildcard GNUmakefile makefile Makefile)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
868 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
869
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
870 # Terminal color definitions
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
871
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
872 REAL_TPUT := $(if $(NO_COLOR),,$(shell $(WHICH) $(TPUT)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
873
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
874 # $(call get-term-code,codeinfo)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
875 # e.g.,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
876 # $(call get-term-code,setaf 0)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
877 get-term-code = $(if $(REAL_TPUT),$(shell $(REAL_TPUT) $1),)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
878
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
879 black := $(call get-term-code,setaf 0)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
880 red := $(call get-term-code,setaf 1)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
881 green := $(call get-term-code,setaf 2)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
882 yellow := $(call get-term-code,setaf 3)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
883 blue := $(call get-term-code,setaf 4)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
884 magenta := $(call get-term-code,setaf 5)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
885 cyan := $(call get-term-code,setaf 6)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
886 white := $(call get-term-code,setaf 7)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
887 bold := $(call get-term-code,bold)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
888 uline := $(call get-term-code,smul)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
889 reset := $(call get-term-code,sgr0)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
890
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
891 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
892 # User-settable definitions
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
893 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
894 LATEX_COLOR_WARNING ?= magenta
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
895 LATEX_COLOR_ERROR ?= red
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
896 LATEX_COLOR_INFO ?= green
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
897 LATEX_COLOR_UNDERFULL ?= magenta
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
898 LATEX_COLOR_OVERFULL ?= red bold
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
899 LATEX_COLOR_PAGES ?= bold
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
900 LATEX_COLOR_BUILD ?= cyan
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
901 LATEX_COLOR_GRAPHIC ?= yellow
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
902 LATEX_COLOR_DEP ?= green
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
903 LATEX_COLOR_SUCCESS ?= green bold
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
904 LATEX_COLOR_FAILURE ?= red bold
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
905
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
906 # Gets the real color from a simple textual definition like those above
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
907 # $(call get-color,ALL_CAPS_COLOR_NAME)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
908 # e.g., $(call get-color,WARNING)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
909 get-color = $(subst $(space),,$(foreach c,$(LATEX_COLOR_$1),$($c)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
910
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
911 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
912 # STANDARD COLORS
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
913 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
914 C_WARNING := $(call get-color,WARNING)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
915 C_ERROR := $(call get-color,ERROR)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
916 C_INFO := $(call get-color,INFO)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
917 C_UNDERFULL := $(call get-color,UNDERFULL)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
918 C_OVERFULL := $(call get-color,OVERFULL)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
919 C_PAGES := $(call get-color,PAGES)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
920 C_BUILD := $(call get-color,BUILD)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
921 C_GRAPHIC := $(call get-color,GRAPHIC)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
922 C_DEP := $(call get-color,DEP)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
923 C_SUCCESS := $(call get-color,SUCCESS)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
924 C_FAILURE := $(call get-color,FAILURE)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
925 C_RESET := $(reset)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
926
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
927 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
928 # PRE-BUILD TESTS
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
929 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
930
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
931 # Check that clean targets are not combined with other targets (weird things
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
932 # happen, and it's not easy to fix them)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
933 hascleangoals := $(if $(sort $(filter clean clean-%,$(MAKECMDGOALS))),1)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
934 hasbuildgoals := $(if $(sort $(filter-out clean clean-%,$(MAKECMDGOALS))),1)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
935 ifneq "$(hasbuildgoals)" ""
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
936 ifneq "$(hascleangoals)" ""
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
937 $(error $(C_ERROR)Clean and build targets specified together$(C_RESET)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
938 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
939 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
940
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
941 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
942 # VARIABLE DECLARATIONS
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
943 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
944
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
945 # Names of sed scripts that morph gnuplot files -- only the first found is used
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
946 GNUPLOT_SED := global-gpi.sed gnuplot.sed
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
947 GNUPLOT_GLOBAL := global._include_.gpi gnuplot.global
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
948
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
949 ifneq "$(strip $(BUILD_STRATEGY))" "pdflatex"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
950 default_graphic_extension ?= eps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
951 latex_build_program ?= $(LATEX)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
952 build_target_extension ?= dvi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
953 hyperref_driver_pattern ?= hdvips
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
954 hyperref_driver_error ?= Using dvips: specify ps2pdf in the hyperref options.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
955 else
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
956 default_graphic_extension ?= pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
957 latex_build_program ?= $(PDFLATEX)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
958 build_target_extension ?= pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
959 hyperref_driver_pattern ?= hpdf.*
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
960 hyperref_driver_error ?= Using pdflatex: specify pdftex in the hyperref options (or leave it blank).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
961 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
962
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
963 # Files of interest
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
964 all_files.tex ?= $(wildcard *.tex)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
965 all_files.tex.sh ?= $(wildcard *.tex.sh)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
966 all_files.tex.pl ?= $(wildcard *.tex.pl)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
967 all_files.tex.py ?= $(wildcard *.tex.py)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
968 all_files.rst ?= $(wildcard *.rst)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
969 all_files.fig ?= $(wildcard *.fig)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
970 all_files.gpi ?= $(wildcard *.gpi)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
971 all_files.dot ?= $(wildcard *.dot)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
972 all_files.xvg ?= $(wildcard *.xvg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
973 all_files.svg ?= $(wildcard *.svg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
974 all_files.png ?= $(wildcard *.png)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
975 all_files.jpg ?= $(wildcard *.jpg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
976 all_files.eps.gz ?= $(wildcard *.eps.gz)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
977 all_files.eps ?= $(wildcard *.eps)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
978
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
979 # Utility function for obtaining all files not specified in $(neverclean)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
980 # $(call cleanable-files,file1 file2 file3 ...)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
981 # Returns the list of files that is not in $(wildcard $(neverclean))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
982 cleanable-files = $(filter-out $(wildcard $(neverclean)), $1)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
983
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
984 # Utility function for getting all .$1 files that are to be ignored
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
985 # * files listed in $(includes.$1)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
986 # * files not listed in $(onlysources.$1) if it is defined
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
987 ignore_files = \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
988 $(includes.$1) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
989 $(if $(onlysources.$1),$(filter-out $(onlysources.$1), $(all_files.$1)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
990
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
991 # Patterns to never be allowed as source targets
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
992 ignore_patterns := %._include_
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
993
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
994 # Patterns allowed as source targets but not included in 'all' builds
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
995 nodefault_patterns := %._nobuild_ $(ignore_patterns)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
996
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
997 # Utility function for getting targets suitable building
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
998 # $(call filter-buildable,suffix)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
999 filter-buildable = \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1000 $(filter-out $(call ignore_files,$1) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1001 $(addsuffix .$1,$(ignore_patterns)),$(all_files.$1))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1002
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1003 # Utility function for getting targets suitable for 'all' builds
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1004 # $(call filter-default,suffix)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1005 filter-default = \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1006 $(filter-out $(call ignore_files,$1) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1007 $(addsuffix .$1,$(nodefault_patterns)),$(all_files.$1))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1008
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1009 # Top level sources that can be built even when they are not by default
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1010 files.tex := $(call filter-buildable,tex)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1011 files.tex.sh := $(call filter-buildable,tex.sh)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1012 files.tex.pl := $(call filter-buildable,tex.pl)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1013 files.tex.py := $(call filter-buildable,tex.py)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1014 files.rst := $(call filter-buildable,rst)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1015 files.gpi := $(call filter-buildable,gpi)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1016 files.dot := $(call filter-buildable,dot)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1017 files.fig := $(call filter-buildable,fig)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1018 files.xvg := $(call filter-buildable,xvg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1019 files.svg := $(call filter-buildable,svg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1020 files.png := $(call filter-buildable,png)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1021 files.jpg := $(call filter-buildable,jpg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1022 files.eps.gz := $(call filter-buildable,eps.gz)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1023
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1024 # Make all pstex targets secondary. The pstex_t target requires the pstex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1025 # target, and nothing else really depends on it, so it often gets deleted.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1026 # This avoids that by allowing *all* fig files to be pstex targets, which is
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1027 # perfectly valid and causes no problems even if they're going to become eps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1028 # files in the end.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1029 .SECONDARY: $(patsubst %.fig,%.pstex,$(files.fig))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1030
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1031 # Top level sources that are built by default targets
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1032 default_files.tex := $(call filter-default,tex)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1033 default_files.tex.sh := $(call filter-default,tex.sh)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1034 default_files.tex.pl := $(call filter-default,tex.pl)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1035 default_files.tex.py := $(call filter-default,tex.py)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1036 default_files.rst := $(call filter-default,rst)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1037 default_files.gpi := $(call filter-default,gpi)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1038 default_files.dot := $(call filter-default,dot)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1039 default_files.fig := $(call filter-default,fig)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1040 default_files.xvg := $(call filter-default,xvg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1041 default_files.svg := $(call filter-default,svg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1042 default_files.png := $(call filter-default,png)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1043 default_files.jpg := $(call filter-default,jpg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1044 default_files.eps.gz := $(call filter-default,eps.gz)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1045
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1046 # Utility function for creating larger lists of files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1047 # $(call concat-files,suffixes,[prefix])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1048 concat-files = $(foreach s,$1,$($(if $2,$2_,)files.$s))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1049
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1050 # Useful file groupings
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1051 all_files_source := $(call concat-files,tex,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1052 all_files_scripts := $(call concat-files,tex.sh tex.pl tex.py rst,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1053
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1054 .PHONY: $(all_files_scripts)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1055
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1056 default_files_source := $(call concat-files,tex,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1057 default_files_scripts := $(call concat-files,tex.sh tex.pl tex.py rst,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1058
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1059 files_source := $(call concat-files,tex)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1060 files_scripts := $(call concat-files,tex.sh tex.pl tex.py rst)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1061
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1062 # Utility function for obtaining stems
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1063 # $(call get-stems,suffix,[prefix])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1064 get-stems = $(sort $($(if $2,$2_,)files.$1:%.$1=%))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1065
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1066 # List of all stems (including ._include_ and ._nobuild_ file stems)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1067 all_stems.tex := $(call get-stems,tex,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1068 all_stems.tex.sh := $(call get-stems,tex.sh,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1069 all_stems.tex.pl := $(call get-stems,tex.pl,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1070 all_stems.tex.py := $(call get-stems,tex.py,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1071 all_stems.rst := $(call get-stems,rst,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1072 all_stems.fig := $(call get-stems,fig,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1073 all_stems.gpi := $(call get-stems,gpi,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1074 all_stems.dot := $(call get-stems,dot,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1075 all_stems.xvg := $(call get-stems,xvg,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1076 all_stems.svg := $(call get-stems,svg,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1077 all_stems.png := $(call get-stems,png,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1078 all_stems.jpg := $(call get-stems,jpg,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1079 all_stems.eps.gz := $(call get-stems,eps.gz,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1080 all_stems.eps := $(call get-stems,eps,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1081
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1082 # List of all default stems (all default PDF targets):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1083 default_stems.tex := $(call get-stems,tex,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1084 default_stems.tex.sh := $(call get-stems,tex.sh,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1085 default_stems.tex.pl := $(call get-stems,tex.pl,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1086 default_stems.tex.py := $(call get-stems,tex.py,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1087 default_stems.rst := $(call get-stems,rst,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1088 default_stems.fig := $(call get-stems,fig,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1089 default_stems.gpi := $(call get-stems,gpi,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1090 default_stems.dot := $(call get-stems,dot,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1091 default_stems.xvg := $(call get-stems,xvg,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1092 default_stems.svg := $(call get-stems,svg,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1093 default_stems.png := $(call get-stems,png,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1094 default_stems.jpg := $(call get-stems,jpg,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1095 default_stems.eps.gz := $(call get-stems,eps.gz,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1096
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1097 # List of all stems (all possible bare PDF targets created here):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1098 stems.tex := $(call get-stems,tex)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1099 stems.tex.sh := $(call get-stems,tex.sh)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1100 stems.tex.pl := $(call get-stems,tex.pl)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1101 stems.tex.py := $(call get-stems,tex.py)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1102 stems.rst := $(call get-stems,rst)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1103 stems.fig := $(call get-stems,fig)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1104 stems.gpi := $(call get-stems,gpi)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1105 stems.dot := $(call get-stems,dot)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1106 stems.xvg := $(call get-stems,xvg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1107 stems.svg := $(call get-stems,svg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1108 stems.png := $(call get-stems,png)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1109 stems.jpg := $(call get-stems,jpg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1110 stems.eps.gz := $(call get-stems,eps.gz)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1111
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1112 # Utility function for creating larger lists of stems
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1113 # $(call concat-stems,suffixes,[prefix])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1114 concat-stems = $(sort $(foreach s,$1,$($(if $2,$2_,)stems.$s)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1115
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1116 # The most likely to be source but not finished product go first
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1117 graphic_source_extensions := fig \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1118 gpi \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1119 xvg \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1120 svg \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1121 dot \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1122 eps.gz
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1123
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1124 ifneq "$(strip $(BUILD_STRATEGY))" "pdflatex"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1125 graphic_source_extensions += png jpg
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1126 graphic_target_extensions := eps ps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1127 else
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1128 graphic_source_extensions += eps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1129 graphic_target_extensions := pdf png jpg mps tif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1130 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1131
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1132 all_stems_source := $(call concat-stems,tex,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1133 all_stems_script := $(call concat-stems,tex.sh tex.pl tex.py rst,all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1134 all_stems_graphic := $(call concat-stems,$(graphic_source_extensions),all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1135 all_stems_ss := $(sort $(all_stems_source) $(all_stems_script))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1136 all_stems_sg := $(sort $(all_stems_script))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1137 all_stems_ssg := $(sort $(all_stems_ss))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1138
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1139 default_stems_source := $(call concat-stems,tex,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1140 default_stems_script := $(call concat-stems,tex.sh tex.pl tex.py rst,default)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1141 default_stems_ss := $(sort $(default_stems_source) $(default_stems_script))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1142 default_stems_sg := $(sort $(default_stems_script))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1143 default_stems_ssg := $(sort $(default_stems_ss))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1144
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1145 stems_source := $(call concat-stems,tex)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1146 stems_script := $(call concat-stems,tex.sh tex.pl tex.py rst)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1147 stems_graphic := $(call concat-stems,$(graphic_source_extensions))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1148 stems_gg := $(sort $(stems_graphic))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1149 stems_ss := $(sort $(stems_source) $(stems_script))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1150 stems_sg := $(sort $(stems_script))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1151 stems_ssg := $(sort $(stems_ss))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1152
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1153 # Calculate names that can generate the need for an include file. We can't
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1154 # really do this with patterns because it's too easy to screw up, so we create
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1155 # an exhaustive list.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1156 allowed_source_suffixes := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1157 pdf \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1158 ps \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1159 dvi \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1160 ind \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1161 nls \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1162 bbl \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1163 aux \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1164 aux.make \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1165 d \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1166 auxbbl.make \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1167 _graphics \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1168 _show
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1169 allowed_source_patterns := $(addprefix %.,$(allowed_source_suffixes))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1170
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1171 allowed_graphic_suffixes := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1172 pdf \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1173 eps \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1174 gpihead.make \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1175 gpi.d
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1176 allowed_graphic_patterns := $(addprefix %.,$(allowed_graphic_suffixes))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1177
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1178 # All targets allowed to build documents
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1179 allowed_source_targets := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1180 $(foreach suff,$(allowed_source_suffixes),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1181 $(addsuffix .$(suff),$(stems_ssg)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1182
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1183 # All targets allowed to build graphics
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1184 allowed_graphic_targets := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1185 $(foreach suff,$(allowed_graphic_suffixes),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1186 $(addsuffix .$(suff),$(stems_gg)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1187
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1188 # All targets that build multiple documents (like 'all')
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1189 allowed_batch_source_targets := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1190 all \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1191 all-pdf \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1192 all-ps \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1193 all-dvi \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1194 all-bbl \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1195 all-ind \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1196 all-gls \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1197 all-nls \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1198 show
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1199
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1200 # All targets that build multiple graphics (independent of document)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1201 allowed_batch_graphic_targets := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1202 all-graphics \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1203 all-pstex \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1204 all-dot2tex \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1205 show-graphics
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1206
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1207 # Now we figure out which stuff is available as a make target for THIS RUN.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1208 real_goals := $(call get-default,$(filter-out _includes,$(MAKECMDGOALS)),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1209 all)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1210
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1211 specified_source_targets := $(strip \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1212 $(filter $(allowed_source_targets) $(stems_ssg),$(real_goals)) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1213 )
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1214
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1215 specified_batch_source_targets := $(strip \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1216 $(filter $(allowed_batch_source_targets),$(real_goals)) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1217 )
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1218
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1219 specified_graphic_targets := $(strip \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1220 $(filter $(allowed_graphic_targets),$(real_goals)) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1221 )
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1222
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1223 specified_batch_graphic_targets := $(strip \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1224 $(filter $(allowed_batch_graphic_targets),$(real_goals)) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1225 )
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1226
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1227 specified_gpi_targets := $(patsubst %.gpi,%.$(default_graphic_extension),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1228 $(filter $(patsubst %.$(default_graphic_extension),%.gpi,$(specified_graphic_targets)),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1229 $(all_files.gpi)) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1230 )
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1231
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1232 # Determine which .d files need including from the information gained above.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1233 # This is done by first checking whether a batch target exists. If it does,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1234 # then all *default* stems are used to create possible includes (nobuild need
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1235 # not apply for batch status). If no batch targets exist, then the individual
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1236 # targets are considered and appropriate includes are taken from them.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1237 source_stems_to_include := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1238 $(sort\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1239 $(if $(specified_batch_source_targets),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1240 $(default_stems_ss),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1241 $(foreach t,$(specified_source_targets),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1242 $(foreach p,$(allowed_source_patterns),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1243 $(patsubst $p,%,$(filter $p $(stems_ssg),$t)) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1244 )) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1245 ))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1246
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1247 # Determine which .gpi.d files are needed using the above information. We
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1248 # first check whether a batch target is specified, then check individual
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1249 # graphics that may have been specified.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1250 graphic_stems_to_include := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1251 $(sort\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1252 $(if $(specified_batch_graphic_targets),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1253 $(default_stems.gpi),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1254 $(foreach t,$(specified_gpi_targets),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1255 $(foreach p,$(allowed_graphic_patterns),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1256 $(patsubst $p,%,$(filter $p,$t)) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1257 )) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1258 ))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1259
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1260 # All dependencies for the 'all' targets
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1261 all_pdf_targets := $(addsuffix .pdf,$(stems_ssg))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1262 all_ps_targets := $(addsuffix .ps,$(stems_ssg))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1263 all_dvi_targets := $(addsuffix .dvi,$(stems_ssg))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1264 all_tex_targets := $(addsuffix .tex,$(stems_sg))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1265 all_d_targets := $(addsuffix .d,$(stems_ssg))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1266 all_graphics_targets := $(addsuffix .$(default_graphic_extension),$(stems_gg))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1267 intermediate_graphics_targets := $(if $(filter pdf,$(default_graphic_extension)),$(addsuffix .eps,$(stems_gg)),)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1268 all_pstex_targets := $(addsuffix .pstex_t,$(stems.fig))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1269 all_dot2tex_targets := $(addsuffix .dot_t,$(stems.dot))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1270
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1271 all_known_graphics := $(sort $(all_graphics_targets) $(wildcard *.$(default_graphic_extension)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1272
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1273 default_pdf_targets := $(addsuffix .pdf,$(default_stems_ss))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1274 ifneq "$(strip $(BUILD_STRATEGY))" "pdflatex"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1275 default_ps_targets := $(addsuffix .ps,$(default_stems_ss))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1276 default_dvi_targets := $(addsuffix .dvi,$(default_stems_ss))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1277 pre_pdf_extensions := dvi ps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1278 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1279
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1280 # Extensions generated by LaTeX invocation that can be removed when complete
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1281 rm_ext := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1282 log *.log aux $(pre_pdf_extensions) pdf blg bbl out nav snm toc lof lot lol pfg \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1283 fls vrb idx ind ilg glg glo gls lox nls nlo nlg brf mtc maf brf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1284 backup_patterns := *~ *.bak *.backup body.tmp head.tmp
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1285
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1286 graph_stem := _graph
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1287
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1288 # All LaTeX-generated files that can be safely removed
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1289
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1290 rm_tex := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1291 $(foreach e,$(rm_ext),$(addsuffix .$e,$(all_stems_source))) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1292 $(foreach e,$(rm_ext) tex,$(addsuffix .$e,$(all_stems_sg))) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1293 $(addsuffix .log,$(all_ps_targets) $(all_pdf_targets)) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1294 $(addsuffix .*.log,$(stems_graphic))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1295
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1296 # These are the files that will affect .gpi transformation for all .gpi files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1297 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1298 # Use only the first one found. Backward compatible values are at the end.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1299 # Note that we use foreach, even though wildcard also returns a list, to ensure
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1300 # that the order in the uppercase variables is preserved. Directory listings
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1301 # provide no such guarantee, so we avoid relying on them.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1302 gpi_sed := $(strip \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1303 $(firstword $(foreach f,$(GNUPLOT_SED),$(wildcard $f))))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1304 gpi_global := $(strip \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1305 $(firstword $(foreach f,$(GNUPLOT_GLOBAL),$(wildcard $f))))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1306
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1307 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1308 # Functions used in generating output
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1309 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1310
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1311 # Outputs all source dependencies to stdout. The first argument is the file to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1312 # be parsed, the second is a list of files that will show up as dependencies in
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1313 # the new .d file created here.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1314 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1315 # NOTE: BSD sed does not understand \|, so we have to do something more
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1316 # clunky to extract suitable extensions.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1317 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1318 # Also, we do a little bit of funny rewriting up front (TARGETS=) to make sure
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1319 # that we can properly backslash-escape spaces in file names (e.g, on Cygwin
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1320 # for tex distributions that have "Program Files" in their name).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1321 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1322 # $(call get-inputs,<parsed file>,<target files>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1323 define get-inputs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1324 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1325 -e '/^INPUT/!d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1326 -e 's!^INPUT \(\./\)\{0,1\}!!' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1327 -e 's/[[:space:]]/\\ /g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1328 -e 's/\(.*\)\.aux$$/\1.tex/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1329 -e '/\.tex$$/b addtargets' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1330 -e '/\.cls$$/b addtargets' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1331 -e '/\.sty$$/b addtargets' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1332 -e '/\.pstex_t$$/b addtargets' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1333 -e '/\.dot_t$$/b addtargets' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1334 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1335 -e ':addtargets' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1336 -e 's/^/$2: /' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1337 $1 | $(SORT) | $(UNIQ)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1338 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1339
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1340 # $(call get-missing-inputs,<log file>,<target files>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1341 define get-missing-inputs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1342 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1343 -e '$$ b para' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1344 -e '/^$$/b para' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1345 -e 'H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1346 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1347 -e ':para' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1348 -e 'x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1349 -e '/^$$/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1350 -e 's/^\n*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1351 -e '/^! LaTeX Error: File /{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1352 -e ' s/^/::DOUBLE_PARAGRAPH::/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1353 -e ' h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1354 -e ' d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1355 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1356 -e 's/^::DOUBLE_PARAGRAPH:://' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1357 -e '/Default extension: /!d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1358 -e 's/[[:space:]]\{1,\}/ /g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1359 -e 's/\n\{1,\}/ /g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1360 -e 's/^.*File `//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1361 -e 's/'"'"' not found\..*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1362 -e '/\.tex/!s/$$/.tex/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1363 -e 's/[[:space:]]/\\ /g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1364 -e 'h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1365 -e 's/.*/# MISSING input "&" - (presence of comment affects build)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1366 -e 'p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1367 -e 's/.*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1368 -e 'x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1369 -e 's/^/$2: /' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1370 $1 | $(SORT) | $(UNIQ)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1371 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1372
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1373 # Get source file for specified graphics stem.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1374 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1375 # $(call graphics-source,<stem>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1376 define graphics-source
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1377 $(strip $(firstword \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1378 $(wildcard \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1379 $(addprefix $1.,\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1380 $(graphic_source_extensions))) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1381 $1 \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1382 ))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1383 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1384
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1385 # Get the target file for the specified graphics file/stem
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1386 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1387 # $(call graphics-target,<stem>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1388 define graphics-target
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1389 $(strip $(if $(filter $(addprefix %.,$(graphic_target_extensions)),$1), $1,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1390 $(firstword $(patsubst $(addprefix %.,$(graphic_source_extensions) $(graphic_target_extensions)), %, $1).$(default_graphic_extension) $1.$(default_graphic_extension))))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1391 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1392
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1393 # Outputs all of the graphical dependencies to stdout. The first argument is
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1394 # the stem of the source file being built, the second is a list of suffixes
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1395 # that will show up as dependencies in the generated .d file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1396 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1397 # Note that we try to escape spaces in filenames where possible. We have to do
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1398 # it with three backslashes so that as the name percolates through the makefile
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1399 # it eventually ends up with the proper escaping when the build rule is found.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1400 # Ugly, but it appears to work. Note that graphicx doesn't allow filenames
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1401 # with spaces, so this could in many ways be moot unless you're using something
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1402 # like grffile.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1403 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1404 # For pdflatex, we really need the missing file to be specified without an
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1405 # extension, otherwise compilation barfs on the first missing file. Truly
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1406 # annoying, but there you have it.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1407 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1408 # It turns out that the graphics errors, although they have lines with empty
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1409 # space, are only made of two paragraphs. So, we just use some sed magic to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1410 # get everything into paragraphs, detect when it's a paragraph that interests
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1411 # us, and double it up. Then we get the filename only if we're missing
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1412 # extensions (a sign that it's graphicx complaining).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1413 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1414 # $(call get-graphics,<target file stem>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1415 #.log,$(addprefix $*.,d $(build_target_extension) _graphics)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1416 define get-graphics
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1417 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1418 -e '$$ b para' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1419 -e '/^$$/b para' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1420 -e 'H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1421 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1422 -e ':para' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1423 -e 'x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1424 -e '/^$$/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1425 -e 's/^\n*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1426 -e '/^! LaTeX Error: File `/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1427 -e ' s/^/::DOUBLE_PARAGRAPH::/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1428 -e ' h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1429 -e ' d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1430 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1431 -e 's/^::DOUBLE_PARAGRAPH:://' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1432 -e '/could not locate the file with any of these extensions:/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1433 -e ' s/\n\{1,\}/ /g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1434 -e ' s/[[:space:]]\{1,\}/ /g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1435 -e ' s/^.*File `//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1436 -e ' s/'"'"' not found\..*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1437 -e ' h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1438 -e ' s/.*/# MISSING stem "&" - (presence of comment affects build)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1439 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1440 -e ' g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1441 -e ' b addtargets' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1442 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1443 -e '/.*File: \(.*\) Graphic file (type [^)]*).*/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1444 -e ' s//\1/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1445 -e ' b addtargets' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1446 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1447 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1448 -e ':addtargets' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1449 -e 's/[[:space:]]/\\\\\\&/g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1450 -e 'h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1451 -e 's/.*/-include &.gpi.d/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1452 -e 'p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1453 -e 'g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1454 -e 's/.*/$(addprefix $1,.d): $$$$(call graphics-source,&)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1455 -e 'p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1456 -e 's/.*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1457 -e 'x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1458 -e 's/.*/$(addprefix $1.,$(build_target_extension) _graphics): $$$$(call graphics-target,&)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1459 -e 'p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1460 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1461 $*.log
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1462 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1463
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1464 # Checks for build failure due to pstex inclusion, and gives instructions.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1465 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1466 # $(call die-on-pstexs,<parsed file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1467 define die-on-pstexs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1468 if $(EGREP) -q '^! LaTeX Error: File .*\.pstex.* not found' $1; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1469 $(ECHO) "$(C_ERROR)Missing pstex_t file(s)$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1470 $(ECHO) "$(C_ERROR)Please run$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1471 $(ECHO) "$(C_ERROR) make all-pstex$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1472 $(ECHO) "$(C_ERROR)before proceeding.$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1473 exit 1; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1474 fi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1475 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1476
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1477 # Checks for build failure due to dot2tex, and gives instructions.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1478 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1479 # $(call die-on-dot2tex,<parsed file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1480 define die-on-dot2tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1481 if $(EGREP) -q ' LaTeX Error: File .*\.dot_t.* not found' $1; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1482 $(ECHO) "$(C_ERROR)Missing dot_t file(s)$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1483 $(ECHO) "$(C_ERROR)Please run$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1484 $(ECHO) "$(C_ERROR) make all-dot2tex$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1485 $(ECHO) "$(C_ERROR)before proceeding.$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1486 exit 1; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1487 fi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1488 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1489
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1490 # Checks for the existence of a .aux file, and dies with an error message if it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1491 # isn't there. Note that we pass the file stem in, not the full filename,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1492 # e.g., to check for foo.aux, we call it thus: $(call die-on-no-aux,foo)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1493 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1494 # $(call die-on-no-aux,<aux stem>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1495 define die-on-no-aux
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1496 if [ ! -e '$1.aux' ]; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1497 $(call colorize-latex-errors,$1.log); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1498 exit 1; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1499 fi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1500 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1501
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1502 # Outputs all index files to stdout. Arg 1 is the source file stem, arg 2 is
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1503 # the list of targets for the discovered dependency.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1504 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1505 # $(call get-log-index,<log file stem>,<target files>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1506 define get-log-index
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1507 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1508 -e 's/^No file \(.*\.ind\)\.$$/TARGETS=\1/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1509 -e 's/^No file \(.*\.[gn]ls\)\.$$/TARGETS=\1/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1510 -e 's/[[:space:]]/\\&/g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1511 -e '/^TARGETS=/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1512 -e ' h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1513 -e ' s/^TARGETS=/$2: /p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1514 -e ' g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1515 -e ' s/^TARGETS=\(.*\)/\1: $1.tex/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1516 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1517 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1518 '$1.log' | $(SORT) | $(UNIQ)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1519 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1520
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1521
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1522 # Outputs all bibliography files to stdout. Arg 1 is the source stem, arg 2 is
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1523 # a list of targets for each dependency found.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1524 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1525 # The script kills all lines that do not contain bibdata. Remaining lines have
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1526 # the \bibdata macro and delimiters removed to create a dependency list. A
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1527 # trailing comma is added, then all adjacent commas are collapsed into a single
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1528 # comma. Then commas are replaced with the string .bib[space], and the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1529 # trailing space is killed off. Finally, all filename spaces are escaped.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1530 # This produces a list of space-delimited .bib filenames, which is what the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1531 # make dep file expects to see.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1532 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1533 # Note that we give kpsewhich a bogus argument so that a failure of sed to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1534 # produce output will not cause an error.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1535 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1536 # $(call get-bibs,<aux file>,<targets>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1537 define get-bibs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1538 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1539 -e '/^\\bibdata/!d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1540 -e 's/\\bibdata{\([^}]*\)}/\1,/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1541 -e 's/,\{2,\}/,/g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1542 -e 's/[[:space:]]/\\&/g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1543 -e 's/,/.bib /g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1544 -e 's/ \{1,\}$$//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1545 $1 | $(XARGS) $(KPSEWHICH) '#######' | \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1546 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1547 -e 's/^/$2: /' | \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1548 \$(SORT) | $(UNIQ)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1549 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1550
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1551 # Makes a an aux file that only has stuff relevant to the target in it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1552 # $(call make-auxtarget-file,<flattened-aux>,<new-aux>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1553 define make-auxtarget-file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1554 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1555 -e '/^\\newlabel/!d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1556 $1 > $2
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1557 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1558
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1559 # Makes an aux file that only has stuff relevant to the bbl in it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1560 # $(call make-auxbbl-file,<flattened-aux>,<new-aux>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1561 define make-auxbbl-file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1562 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1563 -e '/^\\newlabel/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1564 $1 > $2
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1565 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1566
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1567 # Makes a .gpi.d file from a .gpi file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1568 # $(call make-gpi-d,<.gpi>,<.gpi.d>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1569 define make-gpi-d
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1570 $(ECHO) '# vim: ft=make' > $2; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1571 $(ECHO) 'ifndef INCLUDED_$(call cleanse-filename,$2)' >> $2; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1572 $(ECHO) 'INCLUDED_$(call cleanse-filename,$2) := 1' >> $2; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1573 $(call get-gpi-deps,$1,$(addprefix $(2:%.gpi.d=%).,$(GNUPLOT_OUTPUT_EXTENSION) gpi.d)) >> $2; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1574 $(ECHO) 'endif' >> $2;
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1575 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1576
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1577 # Parse .gpi files for data and loaded dependencies, output to stdout
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1578 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1579 # The sed script here tries to be clever about obtaining valid
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1580 # filenames from the gpi file. It assumes that the plot command starts its own
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1581 # line, which is not too difficult a constraint to satisfy.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1582 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1583 # This command script also generates 'include' directives for every 'load'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1584 # command in the .gpi file. The load command must appear on a line by itself
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1585 # and the file it loads must have the suffix .gpi. If you don't want it to be
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1586 # compiled when running make graphics, then give it a suffix of ._include_.gpi.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1587 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1588 # $(call get-gpi-deps,<gpi file>,<targets>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1589 define get-gpi-deps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1590 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1591 -e '/^[[:space:]]*s\{0,1\}plot/,/[^\\]$$/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1592 -e ' H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1593 -e ' /[^\\]$$/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1594 -e ' s/.*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1595 -e ' x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1596 -e ' s/\\\{0,1\}\n//g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1597 -e ' s/^[[:space:]]*s\{0,1\}plot[[:space:]]*\(\[[^]]*\][[:space:]]*\)*/,/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1598 -e ' s/[[:space:]]*\(['\''"][^'\''"]*['\''"]\)\{0,1\}[^,]*/\1/g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1599 -e ' s/,['\''"]-\{0,1\}['\''"]//g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1600 -e ' s/[,'\''"]\{1,\}/ /g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1601 -e ' s!.*!$2: &!' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1602 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1603 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1604 -e ' d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1605 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1606 -e 's/^[[:space:]]*load[[:space:]]*['\''"]\([^'\''"]*\.gpi\)['\''"].*$$/-include \1.d/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1607 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1608 $1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1609 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1610
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1611 # Colorizes real, honest-to-goodness LaTeX errors that can't be overcome with
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1612 # recompilation.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1613 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1614 # Note that we only ignore file not found errors for things that we know how to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1615 # build, like graphics files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1616 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1617 # $(call colorize-latex-errors,<log file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1618 define colorize-latex-errors
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1619 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1620 -e '$$ b para' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1621 -e '/^$$/b para' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1622 -e 'H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1623 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1624 -e ':para' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1625 -e 'x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1626 -e '/^$$/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1627 -e 's/^\n*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1628 -e '/^! LaTeX Error: File /{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1629 -e ' s/^/::DOUBLE_PARAGRAPH::/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1630 -e ' h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1631 -e ' d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1632 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1633 -e 's/^::DOUBLE_PARAGRAPH:://' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1634 -e '/could not locate the file with any of these extensions:/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1635 -e '/Missing .begin.document/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1636 -e ' h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1637 -e ' s/.*/Are you trying to build an include file?/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1638 -e ' x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1639 -e ' G' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1640 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1641 -e '/ LaTeX Error: Cannot determine size/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1642 -e 's/.* LaTeX Error .*/$(C_ERROR)&$(C_RESET)/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1643 -e 's/Error: pdflatex (file .*/$(C_ERROR)& - try specifying it without an extension$(C_RESET)/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1644 -e '/.*\*hyperref using.*driver \(.*\)\*.*/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1645 -e ' s//\1/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1646 -e ' /^$(hyperref_driver_pattern)$$/!{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1647 -e ' s/.*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1648 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1649 -e ' s/.*/$(C_ERROR)--- Using incorrect driver for hyperref! ---$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1650 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1651 -e ' s/.*/$(C_ERROR)$(hyperref_driver_error)$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1652 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1653 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1654 -e ' d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1655 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1656 -e '/ LaTeX Error: Unknown graphics extension/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1657 -e ' s/^/ /' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1658 -e ' h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1659 -e ' s/.*/--- Graphics extension error:/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1660 -e ' G' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1661 -e ' h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1662 -e ' s/.*/--- If you specified the extension explicitly in your .tex file, try removing it./' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1663 -e ' H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1664 -e ' g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1665 -e ' s/.*/$(C_ERROR)&$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1666 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1667 -e ' s/.*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1668 -e ' h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1669 -e ' b' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1670 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1671 -e 's/.*\(\n\{0,\}! .*\)/$(C_ERROR)\1$(C_RESET)/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1672 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1673 $1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1674 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1675
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1676 # Colorize Makeindex errors
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1677 define colorize-makeindex-errors
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1678 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1679 -e '/^!! /{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1680 -e ' N' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1681 -e ' s/^.*$$/$(C_ERROR)&$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1682 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1683 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1684 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1685 $1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1686 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1687
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1688 # Colorize epstopdf errors
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1689 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1690 # $(call colorize-epstopdf-errors,<log file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1691 define colorize-epstopdf-errors
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1692 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1693 -e '/^Error:/,/^Execution stack:/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1694 -e ' /^Execution stack:/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1695 -e ' s/.*/$(C_ERROR)&$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1696 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1697 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1698 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1699 $1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1700 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1701
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1702 # Colorize GNUplot errors
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1703 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1704 # $(call colorize-gnuplot-errors,<log file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1705 define colorize-gnuplot-errors
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1706 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1707 -e '/, line [0-9]*:/!{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1708 -e ' H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1709 -e ' x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1710 -e ' s/.*\n\(.*\n.*\)$$/\1/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1711 -e ' x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1712 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1713 -e '/, line [0-9]*:/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1714 -e ' H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1715 -e ' /unknown.*terminal type/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1716 -e ' s/.*/--- Try changing the GNUPLOT_OUTPUT_EXTENSION variable to 'eps'./' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1717 -e ' H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1718 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1719 -e ' /gpihead/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1720 -e ' s/.*/--- This could be a Makefile bug - contact the maintainer./' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1721 -e ' H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1722 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1723 -e ' g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1724 -e ' s/.*/$(C_ERROR)&$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1725 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1726 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1727 -e '/^gnuplot>/,/^$$/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1728 -e ' s/^gnuplot.*/$(C_ERROR)&/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1729 -e ' s/^$$/$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1730 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1731 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1732 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1733 $1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1734 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1735
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1736 # Colorize GraphViz errors
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1737 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1738 # $(call colorize-dot-errors,<log file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1739 define colorize-dot-errors
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1740 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1741 -e '/^Error:/,/context:/s/.*/$(C_ERROR)&$(C_RESET)/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1742 -e 's/^Warning:.*/$(C_WARNING)&$(C_RESET)/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1743 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1744 '$1'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1745 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1746
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1747 # Get all important .aux files from the top-level .aux file and merges them all
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1748 # into a single file, which it outputs to stdout.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1749 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1750 # $(call flatten-aux,<toplevel aux>,<output file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1751 define flatten-aux
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1752 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1753 -e '/\\@input{\(.*\)}/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1754 -e 's//\1/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1755 -e 's![.:]!\\&!g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1756 -e 'h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1757 -e 's!.*!\\:\\\\@input{&}:{!' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1758 -e 'p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1759 -e 'x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1760 -e 's/\\././g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1761 -e 's/.*/r &/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1762 -e 's/.*/d/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1763 -e 's/.*/}/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1764 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1765 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1766 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1767 '$1' > "$1.$$$$.sed.make"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1768 $(SED) -f "$1.$$$$.sed.make" '$1' > "$1.$$$$.make"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1769 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1770 -e '/^\\relax/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1771 -e '/^\\bibcite/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1772 -e 's/^\(\\newlabel{[^}]\{1,\}}\).*/\1/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1773 "$1.$$$$.make" | $(SORT) > '$2'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1774 $(call remove-temporary-files,$1.$$$$.make $1.$$$$.sed.make)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1775 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1776
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1777 # Generate pdf from postscript
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1778 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1779 # Note that we don't just call ps2pdf, since there are so many versions of that
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1780 # script on various systems. Instead, we call the postscript interpreter
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1781 # directly.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1782 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1783 # $(call ps2pdf,infile,outfile,[embed fonts])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1784 define ps2pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1785 $(GS) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1786 -dSAFER -dCompatibilityLevel=$(PS_COMPATIBILITY) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1787 $(if $3,$(PS_EMBED_OPTIONS)) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1788 -q -dNOPAUSE -dBATCH \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1789 -sDEVICE=pdfwrite -sstdout=%stderr \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1790 '-sOutputFile=$2' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1791 -dSAFER -dCompatibilityLevel=$(PS_COMPATIBILITY) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1792 $(if $3,$(PS_EMBED_OPTIONS)) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1793 -c .setpdfwrite \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1794 -f '$1'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1795 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1796
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1797 # Colorize LaTeX output.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1798 # This uses a neat trick from the Sed & Awk Book from O'Reilly:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1799 # 1) If a line has a single ending paren, delete it to make a blank line (so
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1800 # that we catch the first error, which is not always preceded by a blank
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1801 # line).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1802 # 2) Ensure that the last line of the file gets appended to the hold buffer,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1803 # and blank it out to trigger end-of-paragraph logic below.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1804 # 3) When encountering a blank line (LaTeX output helpfully breaks output on
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1805 # newlines)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1806 # a) swap the hold buffer (containing the paragraph) into the pattern buffer (putting a blank line into the hold buffer),
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1807 # b) remove the newline at the beginning (don't ask),
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1808 # c) apply any colorizing substitutions necessary to ensure happiness.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1809 # d) get the newline out of the hold buffer and append it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1810 # e) profit! (print)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1811 # 4) Anything not colorized is deleted, unless in verbose mode.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1812 color_tex := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1813 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1814 -e '$${' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1815 -e ' /^$$/!{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1816 -e ' H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1817 -e ' s/.*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1818 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1819 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1820 -e '/^$$/!{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1821 -e ' H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1822 -e ' d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1823 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1824 -e '/^$$/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1825 -e ' x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1826 -e ' s/^\n//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1827 -e ' /Output written on /{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1828 -e ' s/.*Output written on \([^(]*\) (\([^)]\{1,\}\)).*/Success! Wrote \2 to \1/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1829 -e ' s/[[:digit:]]\{1,\}/$(C_PAGES)&$(C_RESET)/g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1830 -e ' s/Success!/$(C_SUCCESS)&$(C_RESET)/g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1831 -e ' s/to \(.*\)$$/to $(C_SUCCESS)\1$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1832 -e ' b end' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1833 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1834 -e ' / *LaTeX Error:.*/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1835 -e ' s/.*\( *LaTeX Error:.*\)/$(C_ERROR)\1$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1836 -e ' b end' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1837 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1838 -e ' /.*Warning:.*/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1839 -e ' s//$(C_WARNING)&$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1840 -e ' b end' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1841 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1842 -e ' /Underfull.*/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1843 -e ' s/.*\(Underfull.*\)/$(C_UNDERFULL)\1$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1844 -e ' b end' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1845 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1846 -e ' /Overfull.*/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1847 -e ' s/.*\(Overfull.*\)/$(C_OVERFULL)\1$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1848 -e ' b end' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1849 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1850 $(if $(VERBOSE),,-e ' d') \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1851 -e ' :end' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1852 -e ' G' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1853 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1854
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1855 # Colorize BibTeX output.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1856 color_bib := \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1857 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1858 -e 's/^Warning--.*/$(C_WARNING)&$(C_RESET)/' -e 't' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1859 -e '/---/,/^.[^:]/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1860 -e ' H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1861 -e ' /^.[^:]/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1862 -e ' x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1863 -e ' s/\n\(.*\)/$(C_ERROR)\1$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1864 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1865 -e ' s/.*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1866 -e ' h' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1867 -e ' d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1868 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1869 -e ' d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1870 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1871 -e '/(.*error.*)/s//$(C_ERROR)&$(C_RESET)/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1872 $(if $(VERBOSE),,-e 'd')
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1873
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1874
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1875 # Make beamer output big enough to print on a full page. Landscape doesn't
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1876 # seem to work correctly.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1877 enlarge_beamer = $(PSNUP) -l -1 -W128mm -H96mm -pletter
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1878
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1879 # $(call test-run-again,<source stem>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1880 test-run-again = $(EGREP) -q '^(.*Rerun .*|No file $1\.[^.]+\.)$$' $1.log
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1881
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1882 # This tests whether the build target commands should be run at all, from
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1883 # viewing the log file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1884 # $(call test-log-for-need-to-run,<source stem>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1885 define test-log-for-need-to-run
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1886 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1887 -e '/^No file $(call escape-dots,$1)\.aux\./d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1888 $1.log \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1889 | $(EGREP) -q '^(.*Rerun .*|No file $1\.[^.]+\.|No file .+\.tex\.|LaTeX Warning: File.*)$$'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1890 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1891
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1892 # LaTeX invocations
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1893 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1894 # $(call latex,<tex file>,[<extra LaTeX args>])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1895 run-latex = $(latex_build_program) --interaction=batchmode $(if $2,$2,) $1 > /dev/null
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1896
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1897 # $(call latex-color-log,<LaTeX stem>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1898 latex-color-log = $(color_tex) $1.log
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1899
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1900 # $(call run-makeindex,<input>,<output>,<log>,<extra flags>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1901 define run-makeindex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1902 success=1; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1903 if ! $(MAKEINDEX) -q $1 -t $3 -o $2 $4 > /dev/null || $(EGREP) -q '^!!' $3; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1904 $(call colorize-makeindex-errors,$3); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1905 $(RM) -f '$2'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1906 success=0; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1907 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1908 [ "$$success" = "1" ] && $(sh_true) || $(sh_false);
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1909 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1910
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1911 # This runs the given script to generate output, and it uses MAKE_RESTARTS to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1912 # ensure that it never runs it more than once for a particular root make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1913 # invocation.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1914 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1915 # $(call run-script,<interpreter>,<input>,<output>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1916 define run-script
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1917 [ ! -e '$2.cookie' ] && $(ECHO) "restarts=$(RESTARTS)" > $2.cookie && $(ECHO) "level=$(MAKELEVEL)" >> $2.cookie; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1918 restarts=`$(SED) -n -e 's/^restarts=//p' $2.cookie`; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1919 level=`$(SED) -n -e 's/^level=//p' $2.cookie`; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1920 if $(EXPR) $(MAKELEVEL) '<=' $$level '&' $(RESTARTS) '<=' $$restarts >/dev/null; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1921 $(call echo-build,$2,$3,$(RESTARTS)-$(MAKELEVEL)); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1922 $1 '$2' '$3'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1923 $(ECHO) "restarts=$(RESTARTS)" > '$2.cookie'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1924 $(ECHO) "level=$(MAKELEVEL)" >> '$2.cookie'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1925 fi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1926 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1927
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1928 # BibTeX invocations
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1929 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1930 # $(call run-bibtex,<tex stem>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1931 run-bibtex = $(BIBTEX) $1 | $(color_bib)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1932
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1933
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1934 # $(call convert-eps-to-pdf,<eps file>,<pdf file>,[gray])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1935 # Note that we don't use the --filter flag because it has trouble with bounding boxes that way.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1936 define convert-eps-to-pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1937 $(if $3,$(CAT) '$1' | $(call kill-ps-color) > '$1.cookie',$(CP) '$1' '$1.cookie'); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1938 $(EPSTOPDF) '$1.cookie' --outfile='$2' > $1.log; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1939 $(call colorize-epstopdf-errors,$1.log);
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1940 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1941
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1942 # $(call convert-gpi,<gpi file>,<output file>,[gray])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1943 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1944 define convert-gpi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1945 $(ECHO) 'set terminal $(if $(filter %.pdf,$2),pdf enhanced,postscript enhanced eps)' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1946 $(if $(filter %.pdf,$2),fsize ,)$(call get-default,$(strip \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1947 $(firstword \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1948 $(shell \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1949 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1950 -e 's/^\#\#FONTSIZE=\([[:digit:]]\{1,\}\)/\1/p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1951 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1952 $1 $(strip $(gpi_global)) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1953 ) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1954 ) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1955 ),$(if $(filter %.pdf,$2),$(DEFAULT_GPI_PDF_FONTSIZE),$(DEFAULT_GPI_EPS_FONTSIZE))) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1956 $(strip $(if $3,monochrome,$(if \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1957 $(shell $(EGREP) '^\#\#[[:space:]]*GRAY[[:space:]]*$$' $< $(gpi_global)),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1958 ,color))) > $1head.make; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1959 $(ECHO) 'set output "$2"' >> $1head.make; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1960 $(if $(gpi_global),$(CAT) $(gpi_global) >> $1head.make;,) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1961 fnames='$1head.make $1';\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1962 $(if $(gpi_sed),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1963 $(SED) -f '$(gpi_sed)' $$fnames > $1.temp.make; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1964 fnames=$1.temp.make;,\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1965 ) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1966 success=1; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1967 if ! $(GNUPLOT) $$fnames 2>$1.log; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1968 $(call colorize-gnuplot-errors,$1.log); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1969 success=0; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1970 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1971 $(if $(gpi_sed),$(call remove-temporary-files,$1.temp.make);,) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1972 $(call remove-temporary-files,$1head.make); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1973 [ "$$success" = "1" ] && $(sh_true) || $(sh_false);
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1974 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1975
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1976 # Creation of .eps files from .png files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1977 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1978 # The intermediate step of PNM (using NetPBM) produces much nicer output than
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1979 # ImageMagick's "convert" binary. I couldn't get the right combination of
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1980 # flags to make it look nice, anyway.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1981 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1982 # To handle gray scale conversion, we pipe things through ppmtopgm in the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1983 # middle.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1984 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1985 # $(call convert-png,<png file>,<eps file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1986 define convert-png
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1987 $(PNGTOPNM) "$1" \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1988 $(if $3,| $(PPMTOPGM),) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1989 | $(PNMTOPS) -noturn \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1990 > "$2"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1991 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1992
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1993 # Creation of .eps files from .jpg files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1994 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1995 # Thanks to brubakee for this solution.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1996 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1997 # Uses Postscript level 2 to avoid file size bloat
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1998 # $(call convert-jpg,<jpg file>,<eps file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
1999 define convert-jpg
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2000 $(CONVERT) $(if $3,-type Grayscale,) '$1' eps2:'$2'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2001 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2002
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2003 # Creation of .eps files from .fig files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2004 # $(call convert-fig,<fig file>,<output file>,[gray])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2005 convert-fig = $(FIG2DEV) -L $(if $(filter %.pdf,$2),pdf,eps) $(if $3,-N,) $1 $2
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2006
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2007 # Creation of .pstex files from .fig files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2008 # $(call convert-fig-pstex,<fig file>,<pstex file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2009 convert-fig-pstex = $(FIG2DEV) -L pstex $1 $2 > /dev/null 2>&1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2010
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2011 # Creation of .pstex_t files from .fig files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2012 # $(call convert-fig-pstex-t,<fig file>,<pstex file>,<pstex_t file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2013 convert-fig-pstex-t = $(FIG2DEV) -L pstex_t -p $3 $1 $2 > /dev/null 2>&1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2014
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2015 # Creation of .dot_t files from .dot files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2016 # #(call convert-dot-tex,<dot file>,<dot_t file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2017 convert-dot-tex = $(DOT2TEX) '$1' > '$2'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2018
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2019 # Converts svg files into .eps files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2020 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2021 # $(call convert-svg,<svg file>,<eps file>,[gray])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2022 convert-svg = $(INKSCAPE) --export-eps='$2' '$1'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2023
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2024 # Converts xvg files into .eps files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2025 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2026 # $(call convert-xvg,<xvg file>,<eps file>,[gray])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2027 convert-xvg = $(XMGRACE) '$1' -printfile - -hardcopy -hdevice $(if $3,-mono,) EPS > '$2'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2028
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2029 # Converts .eps.gz files into .eps files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2030 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2031 # $(call convert-epsgz,<eps.gz file>,<eps file>,[gray])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2032 convert-epsgz = $(GUNZIP) -c '$1' $(if $3,| $(call kill-ps-color)) > '$2'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2033
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2034 # Converts .eps files into .eps files (usually a no-op, but can make grayscale)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2035 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2036 # $(call convert-eps,<in file>,<out file>,[gray])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2037 convert-eps = $(if $3,$(call kill-ps-color) $1 > $2)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2038
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2039 # The name of the file containing special postscript commands for grayscale
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2040 gray_eps_file := gray.eps.make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2041
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2042 # Changes sethsbcolor and setrgbcolor calls in postscript to always produce
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2043 # grayscale. In general, this is accomplished by writing new versions of those
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2044 # functions into the user dictionary space, which is looked up before the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2045 # global or system dictionaries (userdict is one of the permanent dictionaries
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2046 # in postscript and is not read-only like systemdict).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2047 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2048 # For setrgbcolor, the weighted average of the triple is computed and the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2049 # triple is replaced with three copies of that average before the original
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2050 # procedure is called: .299R + .587G + .114B
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2051 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2052 # For sethsbcolor, the color is first converted to RGB, then to grayscale by
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2053 # the new setrgbcolor operator as described above. Why is this done?
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2054 # Because simply using the value component will tend to make pure colors
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2055 # white, a very undesirable thing. Pure blue should not translate to white,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2056 # but to some level of gray. Conversion to RGB does the right thing. It's
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2057 # messy, but it works.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2058 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2059 # From
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2060 # http://en.wikipedia.org/wiki/HSV_color_space#Transformation_from_HSV_to_RGB,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2061 # HSB = HSV (Value = Brightness), and the formula used to convert to RGB is
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2062 # as follows:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2063 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2064 # Hi = int(floor(6 * H)) mod 6
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2065 # f = 6 * H - Hi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2066 # p = V(1-S)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2067 # q = V(1-fS)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2068 # t = V(1-(1-f)S)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2069 # if Hi = 0: R G B <-- V t p
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2070 # if Hi = 1: R G B <-- q V p
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2071 # if Hi = 2: R G B <-- p V t
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2072 # if Hi = 3: R G B <-- p q V
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2073 # if Hi = 4: R G B <-- t p V
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2074 # if Hi = 5: R G B <-- V p q
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2075 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2076 # The messy stack-based implementation is below
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2077 # $(call create-gray-eps-file,filename)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2078 define create-gray-eps-file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2079 $(ECHO) -n -e '\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2080 /OLDRGB /setrgbcolor load def\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2081 /setrgbcolor {\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2082 .114 mul exch\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2083 .587 mul add exch\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2084 .299 mul add\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2085 dup dup\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2086 OLDRGB\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2087 } bind def\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2088 /OLDHSB /sethsbcolor load def\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2089 /sethsbcolor {\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2090 2 index % H V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2091 6 mul floor cvi 6 mod % Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2092 3 index % H Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2093 6 mul % 6H Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2094 1 index % Hi 6H Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2095 sub % f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2096 2 index 1 % 1 V f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2097 4 index % S 1 V f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2098 sub mul % p f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2099 3 index 1 % 1 V p f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2100 6 index % S 1 V p f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2101 4 index % f S 1 V p f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2102 mul sub mul % q p f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2103 4 index 1 1 % 1 1 V q p f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2104 5 index % f 1 1 V q p f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2105 sub % (1-f) 1 V q p f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2106 8 index % S (1-f) 1 V q p f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2107 mul sub mul % t q p f Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2108 4 -1 roll pop % t q p Hi V S H\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2109 7 -2 roll pop pop % t q p Hi V\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2110 5 -2 roll % Hi V t q p\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2111 dup 0 eq\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2112 {1 index 3 index 6 index}\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2113 {\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2114 dup 1 eq\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2115 {3 index 2 index 6 index}\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2116 {\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2117 dup 2 eq\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2118 {4 index 2 index 4 index}\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2119 {\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2120 dup 3 eq\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2121 {4 index 4 index 3 index}\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2122 {\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2123 dup 4 eq\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2124 {2 index 5 index 3 index}\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2125 {\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2126 dup 5 eq\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2127 {1 index 5 index 5 index}\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2128 {0 0 0}\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2129 ifelse\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2130 }\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2131 ifelse\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2132 }\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2133 ifelse\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2134 }\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2135 ifelse\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2136 }\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2137 ifelse\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2138 }\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2139 ifelse % B G R Hi V t q p\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2140 setrgbcolor\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2141 5 {pop} repeat\n\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2142 } bind def\n'\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2143 > $1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2144 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2145
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2146 # This actually inserts the color-killing code into a postscript file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2147 # $(call kill-ps-color)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2148 define kill-ps-color
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2149 $(SED) -e '/%%EndComments/r $(gray_eps_file)'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2150 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2151
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2152 # Converts graphviz .dot files into .eps files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2153 # Grayscale is not directly supported by dot, so we pipe it through fig2dev in
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2154 # that case.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2155 # $(call convert-dot,<dot file>,<eps file>,<log file>,[gray])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2156 define convert-dot
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2157 $(DOT) -Tps '$1' 2>'$3' $(if $4,| $(call kill-ps-color)) > $2; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2158 $(call colorize-dot-errors,$3)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2159 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2160
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2161 # Convert DVI to Postscript
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2162 # $(call make-ps,<dvi file>,<ps file>,<log file>,[<paper size>])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2163 make-ps = \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2164 $(DVIPS) -o '$2' $(if $(filter-out BEAMER,$4),-t$(firstword $4),) '$1' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2165 $(if $(filter BEAMER,$4),| $(enlarge_beamer)) > $3 2>&1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2166
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2167 # Convert Postscript to PDF
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2168 # $(call make-pdf,<ps file>,<pdf file>,<log file>,<embed file>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2169 make-pdf = \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2170 $(call ps2pdf,$1,$2,$(filter 1,$(shell $(CAT) '$4'))) > '$3' 2>&1
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2171
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2172 # Display information about what is being done
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2173 # $(call echo-build,<input file>,<output file>,[<run number>])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2174 echo-build = $(ECHO) "$(C_BUILD)= $1 --> $2$(if $3, ($3),) =$(C_RESET)"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2175 echo-graphic = $(ECHO) "$(C_GRAPHIC)= $1 --> $2 =$(C_RESET)"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2176 echo-dep = $(ECHO) "$(C_DEP)= $1 --> $2 =$(C_RESET)"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2177
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2178 # Display a list of something
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2179 # $(call echo-list,<values>)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2180 echo-list = for x in $1; do $(ECHO) "$$x"; done
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2181
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2182 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2183 # DEFAULT TARGET
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2184 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2185
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2186 .PHONY: all
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2187 all: $(default_pdf_targets) ;
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2188
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2189 .PHONY: all-pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2190 all-pdf: $(default_pdf_targets) ;
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2191
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2192 ifneq "$(strip $(BUILD_STRATEGY))" "pdflatex"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2193 .PHONY: all-ps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2194 all-ps: $(default_ps_targets) ;
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2195
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2196 .PHONY: all-dvi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2197 all-dvi: $(default_dvi_targets) ;
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2198 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2199
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2200 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2201 # VIEWING TARGET
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2202 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2203 .PHONY: show
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2204 show: all
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2205 $(QUIET)for x in $(default_pdf_targets); do \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2206 [ -e "$$x" ] && $(VIEW_PDF) $$x & \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2207 done
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2208
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2209 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2210 # INCLUDES
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2211 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2212 source_includes := $(addsuffix .d,$(source_stems_to_include))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2213 graphic_includes := $(addsuffix .gpi.d,$(graphic_stems_to_include))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2214
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2215 # Include only the dependencies used
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2216 ifneq "" "$(source_includes)"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2217 include $(source_includes)$(call include-message,$(source_includes))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2218 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2219 ifneq "" "$(graphic_includes)"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2220 include $(graphic_includes)$(call include-message,$(graphic_includes))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2221 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2222
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2223 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2224 # MAIN TARGETS
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2225 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2226
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2227 # Note that we don't just say %: %.pdf here - this can tend to mess up our
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2228 # includes, which detect what kind of file we are asking for. For example,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2229 # asking to build foo.pdf is much different than asking to build foo when
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2230 # foo.gpi exists, because we look through all of the goals for *.pdf that
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2231 # matches *.gpi, then use that to determine which include files we need to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2232 # build.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2233 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2234 # Thus, we invoke make recursively with better arugments instead, restarting
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2235 # all of the appropriate machinery.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2236 .PHONY: $(default_stems_ss)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2237 $(default_stems_ss): %: %.pdf ;
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2238
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2239 # This builds and displays the wanted file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2240 .PHONY: $(addsuffix ._show,$(stems_ssg))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2241 %._show: %.pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2242 $(QUIET)$(VIEW_PDF) $< &
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2243
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2244 ifneq "$(strip $(BUILD_STRATEGY))" "pdflatex"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2245 .SECONDARY: $(all_pdf_targets)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2246 %.pdf: %.ps %.embed.make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2247 $(QUIET)$(call echo-build,$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2248 $(QUIET)$(call make-pdf,$<,$@.temp,$@.log,$*.embed.make); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2249 if [ x"$$?" = x"0" ]; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2250 $(if $(VERBOSE),$(CAT) $@.log,:); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2251 $(RM) -f '$@'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2252 $(MV) '$@.temp' '$@'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2253 $(TOUCH) '$@'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2254 $(call copy-with-logging,$@,$(BINARY_TARGET_DIR)); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2255 else \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2256 $(CAT) $@.log; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2257 $(call remove-temporary-files,'$@.temp'); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2258 $(sh_false); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2259 fi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2260
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2261 .SECONDARY: $(all_ps_targets)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2262 %.ps: %.dvi %.paper.make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2263 $(QUIET)$(call echo-build,$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2264 $(QUIET)$(call make-ps,$<,$@.temp,$@.log,\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2265 $(firstword $(shell $(CAT) $*.paper.make))); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2266 if [ x"$$?" = x"0" ]; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2267 $(if $(VERBOSE),$(CAT) $@.log,:); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2268 $(RM) -f '$@'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2269 $(MV) '$@.temp' '$@'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2270 $(TOUCH) '$@'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2271 $(call copy-with-logging,$@,$(BINARY_TARGET_DIR)); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2272 else \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2273 $(CAT) $@.log; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2274 $(call remove-temporary-files,'$@.temp'); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2275 $(sh_false); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2276 fi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2277 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2278
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2279 # Build the final target (dvi or pdf) file. This is a very tricky rule because
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2280 # of the way that latex runs multiple times, needs graphics after the first run
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2281 # (or maybe already has them), and relies on bibliographies or indices that may
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2282 # not exist.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2283 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2284 # Check the log for fatal errors. If they exist, colorize and bail.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2285 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2286 # Create the .auxtarget.cookie file. (Needed for next time if not present)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2287 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2288 # If any of the following are true, we must rebuild at least one time:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2289 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2290 # * the .bbl was recently rebuilt
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2291 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2292 # check a cookie, then delete it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2293 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2294 # * any of several output files was created or changed:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2295 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2296 # check $*.run.cookie, then delete it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2297 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2298 # * the .aux file changed in a way that necessitates attention
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2299 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2300 # Note that if the .auxtarget.make file doesn't exist, this means
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2301 # that we are doing a clean build, so it doesn't figure into the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2302 # test for running again.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2303 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2304 # compare against .auxtarget.make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2305 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2306 # move if different, remove if not
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2307 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2308 # * the .log file has errors or warnings requiring at least one more run
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2309 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2310 # We use a loop over a single item to simplify the process of breaking
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2311 # out when we find one of the conditions to be true.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2312 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2313 # If we do NOT need to run latex here, then we move the $@.1st.make file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2314 # over to $@ because the target file has already been built by the first
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2315 # dependency run and is valid.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2316 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2317 # If we do, we delete that cookie file and do the normal multiple-runs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2318 # routine.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2319 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2320 ifneq "$(strip $(BUILD_STRATEGY))" "pdflatex"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2321 .SECONDARY: $(all_dvi_targets)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2322 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2323 %.$(build_target_extension): %.bbl %.aux %.$(build_target_extension).1st.make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2324 $(QUIET)\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2325 fatal=`$(call colorize-latex-errors,$*.log)`; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2326 if [ x"$$fatal" != x"" ]; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2327 $(ECHO) "$$fatal"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2328 exit 1; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2329 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2330 $(call make-auxtarget-file,$*.aux.make,$*.auxtarget.cookie); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2331 run=0; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2332 for i in 1; do \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2333 if $(call test-exists,$*.bbl.cookie); then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2334 run=1; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2335 break; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2336 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2337 if $(call test-exists,$*.run.cookie); then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2338 run=1; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2339 break; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2340 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2341 if $(call \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2342 test-exists-and-different,$*.auxtarget.cookie,$*.auxtarget.make);\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2343 then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2344 run=1; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2345 break; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2346 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2347 if $(call test-log-for-need-to-run,$*); then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2348 run=1; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2349 break; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2350 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2351 done; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2352 $(call remove-temporary-files,$*.bbl.cookie $*.run.cookie); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2353 $(MV) $*.auxtarget.cookie $*.auxtarget.make; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2354 if [ x"$$run" = x"1" ]; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2355 $(call remove-files,$@.1st.make); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2356 for i in 2 3 4 5; do \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2357 $(if $(findstring 3.79,$(MAKE_VERSION)),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2358 $(call echo-build,$*.tex,$@,$(RESTARTS)-$$$$i),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2359 $(call echo-build,$*.tex,$@,$(RESTARTS)-$$i)\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2360 ); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2361 $(call run-latex,$*); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2362 $(CP) '$*.log' '$*.'$(RESTARTS)-$$i'.log'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2363 $(call test-run-again,$*) || break; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2364 done; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2365 else \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2366 $(MV) '$@.1st.make' '$@'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2367 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2368 $(call copy-with-logging,$@,$(BINARY_TARGET_DIR)); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2369 $(call latex-color-log,$*)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2370
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2371 # Build the .bbl file. When dependencies are included, this will (or will
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2372 # not!) depend on something.bib, which we detect, acting accordingly. The
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2373 # dependency creation also produces the %.auxbbl.make file. BibTeX is a bit
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2374 # finicky about what you call the actual files, but we can rest assured that if
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2375 # a .auxbbl.make file exists, then the .aux file does, as well. The
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2376 # .auxbbl.make file is a cookie indicating whether the .bbl needs to be
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2377 # rewritten. It only changes if the .aux file changes in ways relevant to .bbl
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2378 # creation.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2379 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2380 # Note that we do NOT touch the .bbl file if there is no need to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2381 # create/recreate it. We would like to leave existing files alone if they
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2382 # don't need to be changed, thus possibly avoiding a rebuild trigger.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2383 %.bbl: %.auxbbl.make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2384 $(QUIET)\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2385 $(if $(filter %.bib,$^),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2386 $(call echo-build,$(filter %.bib,$?) $*.aux,$@); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2387 $(call run-bibtex,$*); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2388 $(TOUCH) $@.cookie; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2389 ) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2390 if $(EGREP) -q 'bibstyle.(apacann|chcagoa|[^}]*annot)' '$*.aux'; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2391 $(call echo-build,** annotated extra latex **,output ignored,$(RESTARTS)-1); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2392 $(call run-latex,$*); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2393 $(CP) '$*.log' '$*.$(RESTARTS)-annotated.log'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2394 $(if $(filter %.bib,$^),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2395 $(call echo-build,** annotated extra bibtex ** $(filter %.bib,$?) $*.aux,$@); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2396 $(call run-bibtex,$*); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2397 $(TOUCH) $@.cookie; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2398 ) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2399 $(call echo-build,** annotated extra latex **,output ignored,$(RESTARTS)-2); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2400 $(call run-latex,$*); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2401 fi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2402
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2403 # Create the index file - note that we do *not* depend on %.tex here, since
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2404 # that unnecessarily restricts the kinds of indices that we can build to those
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2405 # with exactly the same stem as the source file. Things like splitidx create
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2406 # idx files with other names.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2407 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2408 # Therefore, we add the .tex dependency in the sourcestem.d file in the call to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2409 # get index file dependencies from the logs.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2410 %.ind: %.idx
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2411 $(QUIET)$(call echo-build,$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2412 $(QUIET)$(call run-makeindex,$<,$@,$*.ilg)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2413
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2414 # Create the glossary file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2415 %.gls: %.glo %.tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2416 $(QUIET)$(call echo-build,$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2417 $(QUIET)$(call run-makeindex,$<,$@,$*.glg,-s nomencl.ist)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2418
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2419 # Create the nomenclature file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2420 %.nls: %.nlo %.tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2421 $(QUIET)$(call echo-build,$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2422 $(QUIET)$(call run-makeindex,$<,$@,$*.nlg,-s nomencl.ist)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2423
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2424 # SCRIPTED LaTeX TARGETS
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2425 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2426 # Keep the generated .tex files around for debugging if needed.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2427 .SECONDARY: $(all_tex_targets)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2428
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2429 %.tex:: %.tex.sh
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2430 $(QUIET)$(call run-script,$(SHELL),$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2431
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2432 %.tex:: %.tex.py
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2433 $(QUIET)$(call run-script,$(PYTHON),$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2434
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2435 %.tex:: %.tex.pl
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2436 $(QUIET)$(call run-script,$(PERL),$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2437
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2438 %.tex:: %.rst $(RST_STYLE_FILE)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2439 $(QUIET)\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2440 $(call run-script,$(RST2LATEX)\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2441 --documentoptions=letterpaper\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2442 $(if $(RST_STYLE_FILE),--stylesheet=$(RST_STYLE_FILE),),$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2443
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2444 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2445 # GRAPHICS TARGETS
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2446 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2447 .PHONY: all-graphics
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2448 all-graphics: $(all_graphics_targets);
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2449
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2450 ifneq "$(strip $(BUILD_STRATEGY))" "pdflatex"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2451 .PHONY: all-pstex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2452 all-pstex: $(all_pstex_targets);
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2453 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2454
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2455 .PHONY: all-dot2tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2456 all-dot2tex: $(all_dot2tex_targets);
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2457
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2458 .PHONY: show-graphics
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2459 show-graphics: all-graphics
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2460 $(VIEW_GRAPHICS) $(all_known_graphics)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2461
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2462 $(gray_eps_file):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2463 $(QUIET)$(call echo-build,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2464 $(QUIET)$(call create-gray-eps-file,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2465
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2466 ifeq "$(strip $(BUILD_STRATEGY))" "pdflatex"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2467 %.pdf: %.eps $(if $(GRAY),$(gray_eps_file))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2468 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2469 $(QUIET)$(call convert-eps-to-pdf,$<,$@,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2470
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2471 ifeq "$(strip $(GNUPLOT_OUTPUT_EXTENSION))" "pdf"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2472 %.pdf: %.gpi %.gpi.d $(gpi_sed)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2473 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2474 $(QUIET)$(call convert-gpi,$<,$@,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2475 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2476
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2477 %.pdf: %.fig
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2478 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2479 $(QUIET)$(call convert-fig,$<,$@,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2480
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2481 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2482
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2483 %.eps: %.gpi %.gpi.d $(gpi_sed)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2484 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2485 $(QUIET)$(call convert-gpi,$<,$@,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2486
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2487 %.eps: %.fig
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2488 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2489 $(QUIET)$(call convert-fig,$<,$@,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2490
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2491 %.eps: %.dot $(if $(GRAY),$(gray_eps_file))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2492 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2493 $(QUIET)$(call convert-dot,$<,$@,$<.log,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2494
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2495 %.eps: %.xvg $(if $(GRAY),$(gray_eps_file))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2496 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2497 $(QUIET)$(call convert-xvg,$<,$@,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2498
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2499 %.eps: %.svg $(if $(GRAY),$(gray_eps_file))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2500 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2501 $(QUIET)$(call convert-svg,$<,$@,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2502
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2503 %.eps: %.jpg $(if $(GRAY),$(gray_eps_file))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2504 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2505 $(QUIET)$(call convert-jpg,$<,$@,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2506
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2507 %.eps: %.png $(if $(GRAY),$(gray_eps_file))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2508 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2509 $(QUIET)$(call convert-png,$<,$@,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2510
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2511 %.eps: %.eps.gz $(if $(GRAY),$(gray_eps_file))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2512 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2513 $(QUIET)$(call convert-epsgz,$<,$@,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2514
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2515 %.pstex: %.fig
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2516 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2517 $(QUIET)$(call convert-fig-pstex,$<,$@,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2518
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2519 %.pstex_t: %.fig %.pstex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2520 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2521 $(QUIET)$(call convert-fig-pstex-t,$<,$@,$*.pstex,$(GRAY))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2522
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2523 %.dot_t: %.dot
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2524 $(QUIET)$(call echo-graphic,$^,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2525 $(QUIET)$(call convert-dot-tex,$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2526
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2527 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2528 # DEPENDENCY-RELATED TARGETS.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2529 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2530
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2531 # Generate all of the information needed to get dependencies
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2532 # As a side effect, this creates a .dvi or .pdf file (depending on the build
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2533 # strategy). We need to be sure to remove it if there are errors. Errors can
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2534 # take several forms and all of them are found within the log file:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2535 # * There was a LaTeX error
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2536 # * A needed file was not found
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2537 # * Cross references need adjustment
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2538 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2539 # Behavior:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2540 # This rule is responsible for generating the following:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2541 # %.aux
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2542 # %.d
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2543 # %.aux.make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2544 # %.(pdf|dvi).1st.make (the .pdf or .dvi output file, moved)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2545 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2546 # Steps:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2547 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2548 # Run latex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2549 # Move .pdf or .dvi somewhere else (make no judgements about success)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2550 # Flatten the .aux file into another file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2551 # Add source dependencies
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2552 # Add graphic dependencies
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2553 # Add bib dependencies
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2554 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2555 # Create cookies for various suffixes that may represent files that
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2556 # need to be read by LaTeX in order for it to function properly.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2557 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2558 # Note that if some of the dependencies are discovered because they turn
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2559 # up missing in the log file, we really need the .d file to be reloaded.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2560 # Adding a sleep command helps with this. Otherwise make is extremely
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2561 # nondeterministic, sometimes working, sometimes not.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2562 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2563 # Usually we can force this by simply removing the generated pdf file and
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2564 # not creating a .1st.make file..
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2565 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2566 %.$(build_target_extension).1st.make %.d %.aux %.aux.make %.fls: %.tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2567 $(QUIET)$(call echo-build,$<,$*.d $*.$(build_target_extension).1st.make,$(RESTARTS)-1)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2568 $(QUIET)\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2569 $(call run-latex,$<,--recorder) || $(sh_true); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2570 $(CP) '$*.log' '$*.$(RESTARTS)-1.log'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2571 $(call die-on-dot2tex,$*.log); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2572 $(call die-on-no-aux,$*); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2573 $(call flatten-aux,$*.aux,$*.aux.make); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2574 $(ECHO) "# vim: ft=make" > $*.d; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2575 $(ECHO) ".PHONY: $*._graphics" >> $*.d; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2576 $(call get-inputs,$*.fls,$(addprefix $*.,aux aux.make d $(build_target_extension))) >> $*.d; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2577 $(call get-missing-inputs,$*.log,$(addprefix $*.,aux aux.make d $(build_target_extension))) >> $*.d; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2578 $(ECHO) ".SECONDEXPANSION:" >> $*.d; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2579 $(call get-graphics,$*) >> $*.d; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2580 $(call get-log-index,$*,$(addprefix $*.,d aux aux.make)) >> $*.d; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2581 $(call get-bibs,$*.aux.make,$(addprefix $*.,bbl aux aux.make)) >> $*.d; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2582 $(EGREP) -q "# MISSING" $*.d && $(SLEEP) 1 && $(RM) $*.pdf; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2583 $(call move-if-exists,$*.$(build_target_extension),$*.$(build_target_extension).1st.make); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2584 for s in toc out lot lof lol nav; do \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2585 if [ -e "$*.$$s" ]; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2586 if ! $(DIFF) -q $*.$$s $*.$$s.make >/dev/null 2>&1; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2587 $(TOUCH) $*.run.cookie; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2588 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2589 $(CP) $*.$$s $*.$$s.make; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2590 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2591 done
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2592
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2593 # This is a cookie that is updated if the flattened aux file has changed in a
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2594 # way that affects the bibliography generation.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2595 .SECONDARY: $(addsuffix .auxbbl.make,$(stems_ssg))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2596 %.auxbbl.make: %.aux.make
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2597 $(QUIET)\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2598 $(call make-auxbbl-file,$<,$@.temp); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2599 $(call replace-if-different-and-remove,$@.temp,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2600
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2601 # Build a dependency file for .gpi files. These often plot data files that
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2602 # also reside in the directory, so if a data file changes, it's nice to know
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2603 # about it. This also handles loaded .gpi files, whose filename should have
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2604 # _include_. in it.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2605 %.gpi.d: %.gpi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2606 $(QUIET)$(call echo-build,$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2607 $(QUIET)$(call make-gpi-d,$<,$@)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2608
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2609 # Store the paper size for this document -- note that if beamer is used we set
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2610 # it to the special BEAMER paper size. We only do this, however, if the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2611 # special comment exists, in which case we enlarge the output with psnup.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2612 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2613 # The paper size is extracted from a documentclass attribute.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2614 %.paper.make: %.tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2615 $(QUIET)$(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2616 -e '/\\documentclass/,/}/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2617 -e ' s/%.*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2618 -e ' H' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2619 -e ' /}/{' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2620 -e ' s/.*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2621 -e ' x' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2622 -e ' /\\documentclass/!d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2623 -e ' s/[\n[:space:]]*//g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2624 -e ' s/\([,{[]\)\([[:alnum:]]\{1,\}\)paper\([],}]\)/\1%-\2-%\3/g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2625 -e ' s/\([,{[]\)\(landscape\)\([],}]\)/\1%-\2-%\3/g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2626 -e ' s/^[^%]*%-//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2627 -e ' s/-%[^%]*$$//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2628 -e ' s/-%[^%]%-/ /g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2629 -e ' p' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2630 -e ' }' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2631 -e ' d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2632 -e '}' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2633 -e 'd' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2634 $< > $@; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2635 $(EGREP) -q '^[^%]*\\documentclass[^{]*{beamer}' $< && \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2636 (\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2637 $(EGREP) -q '^%%[[:space:]]*BEAMER[[:space:]]*LARGE$$' $< && \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2638 $(ECHO) "BEAMER" > $@ || \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2639 : > $@ \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2640 ) || $(sh_true)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2641
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2642 # Store embedding instructions for this document using a special comment
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2643 %.embed.make: %.tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2644 $(QUIET)$(EGREP) '^%%[[:space:]]*NO[[:space:]]*EMBED[[:space:]]*$$' $< \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2645 && $(ECHO) '' > $@ \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2646 || $(ECHO) '1' > $@;
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2647
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2648 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2649 # HELPFUL PHONY TARGETS
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2650 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2651
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2652 .PHONY: _all_programs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2653 _all_programs:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2654 $(QUIET)$(ECHO) "== All External Programs Used =="
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2655 $(QUIET)$(call output-all-programs)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2656
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2657 .PHONY: _check_programs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2658 _check_programs:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2659 $(QUIET)$(ECHO) "== Checking Makefile Dependencies =="; $(ECHO)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2660 $(QUIET) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2661 $(ECHO) hi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2662 allprogs=`\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2663 ($(call output-all-programs)) | \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2664 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2665 -e 's/^[[:space:]]*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2666 -e '/^#/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2667 -e 's/[[:space:]]*#.*//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2668 -e '/^=/s/[[:space:]]/_/g' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2669 -e '/^[[:space:]]*$$/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2670 -e 's/^[^=].*=[[:space:]]*\([^[:space:]]\{1,\}\).*$$/\\1/' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2671 `; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2672 spaces=' '; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2673 for p in $${allprogs}; do \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2674 case $$p in \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2675 =*) $(ECHO); $(ECHO) "$$p";; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2676 *) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2677 $(ECHO) -n "$$p:$$spaces" | $(SED) -e 's/^\(.\{0,20\}\).*$$/\1/'; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2678 loc=`$(WHICH) $$p`; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2679 if [ x"$$?" = x"0" ]; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2680 $(ECHO) "$(C_SUCCESS)Found:$(C_RESET) $$loc"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2681 else \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2682 $(ECHO) "$(C_FAILURE)Not Found$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2683 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2684 ;; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2685 esac; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2686 done
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2687
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2688 .PHONY: _check_gpi_files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2689 _check_gpi_files:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2690 $(QUIET)$(ECHO) "== Checking all .gpi files for common errors =="; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2691 $(ECHO); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2692 for f in $(files.gpi); do \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2693 result=`$(EGREP) '^([^#]*set terminal |set output )' $$f`; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2694 $(ECHO) -n "$$f: "; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2695 if [ x"$$result" = x"" ]; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2696 $(ECHO) "$(C_SUCCESS)Okay$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2697 else \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2698 $(ECHO) "$(C_FAILURE)Warning: Problematic commands:$(C_RESET)";\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2699 $(ECHO) "$(C_ERROR)$$result$(C_RESET)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2700 fi; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2701 done; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2702 $(ECHO)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2703
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2704 .PHONY: _all_stems
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2705 _all_stems:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2706 $(QUIET)$(ECHO) "== All Stems =="
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2707 $(QUIET)$(call echo-list,$(sort $(default_stems_ss)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2708
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2709 .PHONY: _includes
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2710 _includes:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2711 $(QUIET)$(ECHO) "== Include Stems =="
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2712 $(QUIET)$(ECHO) "=== Sources ==="
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2713 $(QUIET)$(call echo-list,$(sort $(source_includes)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2714 $(QUIET)$(ECHO) "=== Graphics ==="
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2715 $(QUIET)$(call echo-list,$(sort $(graphic_includes)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2716
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2717 .PHONY: _all_sources
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2718 _all_sources:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2719 $(QUIET)$(ECHO) "== All Sources =="
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2720 $(QUIET)$(call echo-list,$(sort $(all_files.tex)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2721
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2722 .PHONY: _dependency_graph
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2723 _dependency_graph:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2724 $(QUIET)$(ECHO) "/* LaTeX Dependency Graph */"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2725 $(QUIET)$(call output-dependency-graph)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2726
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2727 .PHONY: _show_dependency_graph
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2728 _show_dependency_graph:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2729 $(QUIET)$(call output-dependency-graph,$(graph_stem).dot)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2730 $(QUIET)$(DOT) -Tps -o $(graph_stem).eps $(graph_stem).dot
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2731 $(QUIET)$(VIEW_POSTSCRIPT) $(graph_stem).eps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2732 $(QUIET)$(call remove-temporary-files,$(graph_stem).*)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2733
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2734 .PHONY: _sources
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2735 _sources:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2736 $(QUIET)$(ECHO) "== Sources =="
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2737 $(QUIET)$(call echo-list,$(sort $(files.tex)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2738
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2739 .PHONY: _scripts
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2740 _scripts:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2741 $(QUIET)$(ECHO) "== Scripts =="
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2742 $(QUIET)$(call echo-list,$(sort $(files_scripts)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2743
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2744 .PHONY: _graphic_outputs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2745 _graphic_outputs:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2746 $(QUIET)$(ECHO) "== Graphic Outputs =="
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2747 $(QUIET)$(call echo-list,$(sort $(all_graphics_targets)))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2748
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2749 .PHONY: _env
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2750 _env:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2751 ifdef .VARIABLES
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2752 $(QUIET)$(ECHO) "== MAKE VARIABLES =="
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2753 $(QUIET)$(call echo-list,$(foreach var,$(sort $(.VARIABLES)),'$(var)'))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2754 endif
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2755 $(QUIET)$(ECHO) "== ENVIRONMENT =="
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2756 $(QUIET)$(ENV)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2757
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2758 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2759 # CLEAN TARGETS
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2760 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2761 # clean-generated is somewhat unique - it relies on the .fls file being
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2762 # properly built so that it can determine which of the files was generated, and
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2763 # which was not. Expect it to silently fail if the .fls file is missing.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2764 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2765 # This is used to, e.g., clean up index files that are generated by the LaTeX.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2766 .PHONY: clean-generated
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2767 clean-generated:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2768 $(QUIET)$(call clean-files,$(foreach e,$(addsuffix .fls,$(all_stems_source)),\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2769 $(shell $(call get-generated-names,$e))))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2770
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2771 .PHONY: clean-deps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2772 clean-deps:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2773 $(QUIET)$(call clean-files,$(all_d_targets) *.make *.make.temp *.cookie)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2774
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2775 .PHONY: clean-tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2776 clean-tex: clean-deps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2777 $(QUIET)$(call clean-files,$(rm_tex))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2778
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2779 .PHONY: clean-graphics
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2780 # TODO: This *always* deletes pstex files, even if they were not generated by
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2781 # anything.... In other words, if you create a pstex and pstex_t pair by hand
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2782 # an drop them in here without the generating fig file, they will be deleted
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2783 # and you won't get them back. It's a hack put in here because I'm not sure we
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2784 # even want to keep pstex functionality, so my motivation is not terribly high
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2785 # for doing it right.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2786 clean-graphics:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2787 $(QUIET)$(call clean-files,$(all_graphics_targets) $(intermediate_graphics_targets) *.gpi.d *.pstex *.pstex_t *.dot_t)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2788
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2789 .PHONY: clean-backups
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2790 clean-backups:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2791 $(QUIET)$(call clean-files,$(backup_patterns) *.temp)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2792
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2793 .PHONY: clean-auxiliary
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2794 clean-auxiliary:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2795 $(QUIET)$(call clean-files,$(graph_stem).*)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2796
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2797 .PHONY: clean-nographics
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2798 clean-nographics: clean-tex clean-deps clean-backups clean-auxiliary ;
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2799
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2800 .PHONY: clean
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2801 clean: clean-generated clean-tex clean-graphics clean-deps clean-backups clean-auxiliary
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2802
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2803 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2804 # HELP TARGETS
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2805 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2806
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2807 .PHONY: help
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2808 help:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2809 $(help_text)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2810
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2811 .PHONY: version
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2812 version:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2813 $(QUIET)\
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2814 $(ECHO) "$(fileinfo) Version $(version)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2815 $(ECHO) "by $(author)"; \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2816
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2817 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2818 # HELP TEXT
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2819 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2820
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2821 define help_text
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2822 # $(fileinfo) Version $(version)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2823 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2824 # by $(author)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2825 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2826 # Generates a number of possible output files from a LaTeX document and its
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2827 # various dependencies. Handles .bib files, \include and \input, and .eps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2828 # graphics. All dependencies are handled automatically by running LaTeX over
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2829 # the source.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2830 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2831 # USAGE:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2832 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2833 # make [GRAY=1] [VERBOSE=1] [SHELL_DEBUG=1] <target(s)>
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2834 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2835 # STANDARD OPTIONS:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2836 # GRAY:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2837 # Setting this variable forces all recompiled graphics to be grayscale.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2838 # It is useful when creating a document for printing. The default is
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2839 # to allow colors. Note that it only changes graphics that need to be
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2840 # rebuilt! It is usually a good idea to do a 'make clean' first.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2841 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2842 # VERBOSE:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2843 # This turns off all @ prefixes for commands invoked by make. Thus,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2844 # you get to see all of the gory details of what is going on.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2845 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2846 # SHELL_DEBUG:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2847 # This enables the -x option for sh, meaning that everything it does is
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2848 # echoed to stderr. This is particularly useful for debugging
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2849 # what is going on in $$(shell ...) invocations. One of my favorite
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2850 # debugging tricks is to do this:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2851 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2852 # make -d SHELL_DEBUG=1 VERBOSE=1 2>&1 | less
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2853 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2854 # STANDARD AUXILIARY FILES:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2855 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2856 # Makefile.ini
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2857 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2858 # This file can contain variable declarations that override various
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2859 # aspects of the makefile. For example, one might specify
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2860 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2861 # neverclean := *.pdf *.ps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2862 # onlysources.tex := main.tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2863 # LATEX_COLOR_WARNING := 'bold red uline'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2864 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2865 # And this would override the neverclean setting to ensure that pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2866 # and ps files always remain behind, set the makefile to treat all
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2867 # .tex files that are not "main.tex" as includes (and therefore not
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2868 # default targets). It also changes the LaTeX warning output to be
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2869 # red, bold, and underlined.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2870 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2871 # There are numerous variables in this file that can be overridden in
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2872 # this way. Search for '?=' to find them all.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2873 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2874 # Also, you can put arbitrary targets into it if, for example, you
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2875 # want your source built from something else, e.g.:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2876 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2877 # generated.tex: generating_script.weird_lang depA depB
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2878 # ./generating_script.weird_lang > $$@
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2879 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2880 # Note that if you are not careful, you can override the default
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2881 # target (what happens when you type "make" without arguments), so if
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2882 # you do use Makefile.ini, you probably want to start it with
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2883 # something like the following line:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2884 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2885 # default: all
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2886 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2887 # Since the first target in any makefile is automatically the default,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2888 # and the makefile already has a sensible "all" target, this will do
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2889 # what you want.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2890 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2891 # The Makefile.ini is imported before *anything else* is done, so go
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2892 # wild with your ideas for changes to this makefile in there. It
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2893 # makes it easy to test them before submitting patches.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2894 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2895 # STANDARD ENVIRONMENT VARIABLES:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2896 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2897 # LATEX_COLOR_WARNING '$(LATEX_COLOR_WARNING)'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2898 # LATEX_COLOR_ERROR '$(LATEX_COLOR_ERROR)'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2899 # LATEX_COLOR_UNDERFULL '$(LATEX_COLOR_UNDERFULL)'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2900 # LATEX_COLOR_OVERFULL '$(LATEX_COLOR_OVERFULL)'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2901 # LATEX_COLOR_PAGES '$(LATEX_COLOR_PAGES)'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2902 # LATEX_COLOR_BUILD '$(LATEX_COLOR_BUILD)'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2903 # LATEX_COLOR_GRAPHIC '$(LATEX_COLOR_GRAPHIC)'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2904 # LATEX_COLOR_DEP '$(LATEX_COLOR_DEP)'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2905 # LATEX_COLOR_SUCCESS '$(LATEX_COLOR_SUCCESS)'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2906 # LATEX_COLOR_FAILURE '$(LATEX_COLOR_FAILURE)'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2907 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2908 # These may be redefined in your environment to be any of the following:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2909 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2910 # black
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2911 # red
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2912 # green
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2913 # yellow
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2914 # blue
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2915 # magenta
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2916 # cyan
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2917 # white
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2918 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2919 # Bold or underline may be used, as well, either alone or in combination
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2920 # with colors:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2921 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2922 # bold
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2923 # uline
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2924 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2925 # Order is not important. You may want, for example, to specify:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2926 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2927 # export LATEX_COLOR_SUCCESS='bold blue uline'
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2928 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2929 # in your .bashrc file. I don't know why, but you may want to.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2930 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2931 # STANDARD TARGETS:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2932 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2933 # all:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2934 # Make all possible documents in this directory. The documents are
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2935 # determined by scanning for .tex and .tex.sh (described in more detail
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2936 # later) and omitting any file that ends in ._include_.tex or
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2937 # ._nobuild_.tex. The output is a set of .pdf files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2938 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2939 # If you wish to omit files without naming them with the special
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2940 # underscore names, set the following near the top of the Makefile,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2941 # or (this is recommended) within a Makefile.ini in the same directory:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2942 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2943 # includes.tex := file1.tex file2.tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2944 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2945 # This will cause the files listed to be considered as include files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2946 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2947 # If you have only few source files, you can set
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2948 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2949 # onlysources.tex := main.tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2950 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2951 # This will cause only the source files listed to be considered in
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2952 # dependency detection. All other .tex files will be considered as
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2953 # include files. Note that these options work for *any* source type,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2954 # so you could do something similar with includes.gpi, for example.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2955 # Note that this works for *any valid source* target. All of the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2956 # onlysources.* variables are commented out in the shipping version of
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2957 # this file, so it does the right thing when they simply don't exist.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2958 # The comments are purely documentation. If you know, for example, that
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2959 # file.mycoolformat is supported by this Makefile, but don't see the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2960 # "onlysources.mycoolformat" declared in the comments, that doesn't mean
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2961 # you can't use it. Go ahead and set "onlysources.mycoolformat" and it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2962 # should do the right thing.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2963 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2964 # show:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2965 # Builds and displays all documents in this directory. It uses the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2966 # environment-overridable value of VIEW_PDF (currently $(VIEW_PDF)) to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2967 # do its work.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2968 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2969 # all-graphics:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2970 # Make all of the graphics in this directory.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2971 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2972 # all-pstex (only for BUILD_STRATEGY=latex):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2973 # Build all fig files into pstex and pstex_t files. Gray DOES NOT WORK.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2974 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2975 # all-gray-pstex (only for BUILD_STRATEGY=latex):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2976 # Build all fig files into grayscale pstex and pstex_t files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2977 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2978 # all-dot2tex:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2979 # Build all dot files into tex files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2980 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2981 # show-graphics:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2982 # Builds and displays all graphics in this directory. Uses the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2983 # environment-overridable value of VIEW_GRAPHICS (currently
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2984 # $(VIEW_GRAPHICS)) to do its work.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2985 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2986 # clean:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2987 # Remove ALL generated files, leaving only source intact.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2988 # This will *always* skip files mentioned in the "neverclean" variable,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2989 # either in this file or specified in Makefile.ini:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2990 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2991 # neverclean := *.pdf *.ps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2992 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2993 # The neverclean variable works on all "clean" targets below, as well.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2994 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2995 # clean-graphics:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2996 # Remove all generated graphics files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2997 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2998 # clean-backups:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
2999 # Remove all backup files: $(backup_patterns)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3000 # (XFig and other editors have a nasty habit of leaving them around)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3001 # Also removes Makefile-generated .temp files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3002 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3003 # clean-tex:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3004 # Remove all files generated from LaTeX invocations except dependency
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3005 # information. Leaves graphics alone.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3006 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3007 # clean-deps:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3008 # Removes all auto-generated dependency information.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3009 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3010 # clean-auxiliary:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3011 # Removes extra files created by various targets (like the dependency
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3012 # graph output).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3013 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3014 # clean-nographics:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3015 # Cleans everything *except* the graphics files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3016 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3017 # help:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3018 # This help text.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3019 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3020 # version:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3021 # Version information about this LaTeX makefile.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3022 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3023 # DEBUG TARGETS:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3024 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3025 # _all_programs:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3026 # A list of the programs used by this makefile.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3027 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3028 # _check_programs:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3029 # Checks your system for the needed software and reports what it finds.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3030 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3031 # _check_gpi_files:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3032 # Checks the .gpi files in the current directory for common errors, such
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3033 # as specification of the terminal or output file inside of the gpi file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3034 # itself.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3035 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3036 # _dependency_graph:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3037 # Outputs a .dot file to stdout that represents a graph of LaTeX
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3038 # dependencies. To see it, use the _show_dependency_graph target or
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3039 # direct the output to a file, run dot on it, and view the output, e.g.:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3040 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3041 # make _dependency_graph > graph.dot
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3042 # dot -T ps -o graph.eps graph.dot
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3043 # gv graph.eps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3044 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3045 # _show_dependency_graph:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3046 # Makes viewing the graph simple: extracts, builds and displays the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3047 # dependency graph given in the _dependency_graph target using the value
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3048 # of the environment-overridable VIEW_POSTSCRIPT variable (currently set
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3049 # to $(VIEW_POSTSCRIPT)). The postscript viewer is used because it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3050 # makes it easier to zoom in on the graph, a critical ability for
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3051 # something so dense and mysterious.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3052 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3053 # _all_sources:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3054 # List all .tex files in this directory.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3055 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3056 # _sources:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3057 # Print out a list of all compilable sources in this directory. This is
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3058 # useful for determining what make thinks it will be using as the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3059 # primary source for 'make all'.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3060 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3061 # _scripts:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3062 # Print out a list of scripts that make knows can be used to generate
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3063 # .tex files (described later).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3064 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3065 # _all_stems:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3066 # Print a list of stems. These represent bare targets that can be
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3067 # executed. Listing <stem> as a bare target will produce <stem>.pdf.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3068 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3069 # _includes:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3070 # A list of .d files that would be included in this run if _includes
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3071 # weren't specified. This target may be used alone or in conjunction
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3072 # with other targets.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3073 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3074 # _graphic_outputs:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3075 # A list of all generated .eps files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3076 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3077 # _env:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3078 # A list of environment variables and their values. If supported by
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3079 # your version of make, also a list of variables known to make.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3080 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3081 # FILE TARGETS:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3082 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3083 # %, %.pdf:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3084 # Build a PDF file from the corresponding %.tex file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3085 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3086 # If BUILD_STRATEGY=pdflatex, then this builds the pdf directly.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3087 # Otherwise, it uses this old-school but effective approach:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3088 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3089 # latex -> dvips -> ps2pdf
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3090 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3091 # The BUILD_STRATEGY can be overridden in Makefile.ini in the same
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3092 # directory. The default is pdflatex.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3093 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3094 # Reasons for using latex -> dvips include the "psfrag" package, and the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3095 # generation of postscript instead of PDF. Arguments for using pdflatex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3096 # include "new and shiny" and "better supported." I can't argue with
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3097 # either of those, and supporting them both didn't turn out to be that
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3098 # difficult, so there you have it. Choices.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3099 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3100 # %._show:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3101 # A phony target that builds the pdf file and then displays it using the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3102 # environment-overridable value of VIEW_PDF ($(VIEW_PDF)).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3103 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3104 # %._graphics:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3105 # A phony target that generates all graphics on which %.pdf (or %.dvi)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3106 # depends.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3107 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3108 # %.ps (only for BUILD_STRATEGY=latex):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3109 # Build a Postscript file from the corresponding %.tex file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3110 # This is done using dvips. Paper size is automatically
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3111 # extracted from the declaration
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3112 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3113 # \documentclass[<something>paper]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3114 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3115 # or it is the system default.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3116 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3117 # If using beamer (an excellent presentation class), the paper
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3118 # size is ignored. More on this later.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3119 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3120 # %.dvi (only for BUILD_STRATEGY=latex):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3121 # Build the DVI file from the corresponding %.tex file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3122 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3123 # %.ind:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3124 # Build the index for this %.tex file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3125 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3126 # %.gls:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3127 # Build the nomenclature glossary for this %.tex file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3128 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3129 # %.nls:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3130 # Build the (newer) nomenclature file for this %.tex file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3131 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3132 # %.eps:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3133 # Build an eps file from one of the following file types:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3134 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3135 # .dot : graphviz
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3136 # .gpi : gnuplot
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3137 # .fig : xfig
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3138 # .xvg : xmgrace
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3139 # .svg : scalable vector graphics (goes through inkscape)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3140 # .png : png (goes through NetPBM)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3141 # .jpg : jpeg (goes through ImageMagick)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3142 # .eps.gz : gzipped eps
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3143 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3144 # The behavior of this makefile with each type is described in
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3145 # its own section below.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3146 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3147 # %.pstex{,_t} (only for BUILD_STRATEGY=latex):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3148 # Build a .pstex_t file from a .fig file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3149 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3150 # FEATURES:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3151 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3152 # Optional Binary Directory:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3153 # If you create the _out_ directory in the same place as the makefile,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3154 # it will automatically be used as a dumping ground for .pdf (or .dvi,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3155 # .ps, and .pdf) output files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3156 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3157 # Alternatively, you can set the BINARY_TARGET_DIR variable, either as a
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3158 # make argument or in Makefile.ini, to point to your directory of
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3159 # choice. Note that no pathname wildcard expansion is done in the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3160 # makefile, so make sure that the path is complete before going in
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3161 # there. E.g., if you want to specify something in your home directory,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3162 # use $$HOME/ instead of ~/ so that the shell expands it before it gets
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3163 # to the makefile.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3164 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3165 # External Program Dependencies:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3166 # Every external program used by the makefile is represented by an
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3167 # ALLCAPS variable at the top of this file. This should allow you to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3168 # make judgments about whether your system supports the use of this
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3169 # makefile. The list is available in the ALL_PROGRAMS variable and,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3170 # provided that you are using GNU make 3.80 or later (or you haven't
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3171 # renamed this file to something weird like "mylatexmakefile" and like
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3172 # invoking it with make -f) can be viewed using
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3173 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3174 # make _all_programs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3175 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3176 # Additionally, the availability of these programs can be checked
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3177 # automatically for you by running
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3178 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3179 # make _check_programs
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3180 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3181 # The programs are categorized according to how important they are and
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3182 # what function they perform to help you decide which ones you really
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3183 # need.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3184 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3185 # Colorized Output:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3186 # The output of commands is colorized to highlight things that are often
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3187 # important to developers. This includes {underfull,overfull}
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3188 # {h,v}boxes, general LaTeX Errors, each stage of document building, and
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3189 # the number of pages in the final document. The colors are obtained
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3190 # using 'tput', so colorization should work pretty well on any terminal.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3191 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3192 # The colors can be customized very simply by setting any of the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3193 # LATEX_COLOR_<CONTEXT> variables in your environment (see above).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3194 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3195 # Predecessors to TeX Files:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3196 # Given a target <target>, if no <target>.tex file exists but a
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3197 # corresponding script or predecessor file exists, then appropriate
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3198 # action will be taken to generate the tex file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3199 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3200 # Currently supported script or predecessor languages are:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3201 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3202 # sh: %.tex.sh
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3203 # perl: %.tex.pl
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3204 # python: %.tex.py
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3205 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3206 # Calls the script using the appropriate interpreter, assuming that
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3207 # its output is a .tex file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3208 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3209 # The script is called thus:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3210 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3211 # <interpreter> <script file name> <target tex file>
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3212 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3213 # and therefore sees exactly one parameter: the name of the .tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3214 # file that it is to create.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3215 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3216 # Why does this feature exist? I ran into this while working on
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3217 # my paper dissertation. I wrote a huge bash script that used a
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3218 # lot of sed to bring together existing papers in LaTeX. It
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3219 # would have been nice had I had something like this to make my
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3220 # life easier, since as it stands I have to run the script and
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3221 # then build the document with make. This feature provides hooks
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3222 # for complicated stuff that you may want to do, but that I have
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3223 # not considered. It should work fine with included dependencies,
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3224 # too.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3225 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3226 # Scripts are run every time make is invoked. Some trickery is
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3227 # employed to make sure that multiple restarts of make don't cause
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3228 # them to be run again.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3229 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3230 # reST: %.rst
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3231 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3232 # Runs the reST to LaTeX converter to generate a .tex file
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3233 # If it finds a file names _rststyle_._include_.tex, uses it as
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3234 # the "stylesheet" option to rst2latex.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3235 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3236 # Note that this does not track sub-dependencies in rst files. It
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3237 # assumes that the top-level rst file will change if you want a
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3238 # rebuild.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3239 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3240 # Dependencies:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3241 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3242 # In general, dependencies are extracted directly from LaTeX output on
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3243 # your document. This includes
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3244 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3245 # * Bibliography information
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3246 # * \include or \input files (honoring \includeonly, too)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3247 # * Graphics files inserted by the graphicx package
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3248 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3249 # Where possible, all of these are built correctly and automatically.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3250 # In the case of graphics files, these are generated from the following
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3251 # file types:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3252 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3253 # GraphViz: .dot
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3254 # GNUPlot: .gpi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3255 # XFig: .fig
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3256 # XMgrace: .xvg
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3257 # SVG: .svg
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3258 # PNG: .png
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3259 # JPEG: .jpg
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3260 # GZipped EPS: .eps.gz
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3261 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3262 # If the file exists as a .eps already, it is merely used (and will not
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3263 # be deleted by 'clean'!).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3264 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3265 # LaTeX and BibTeX are invoked correctly and the "Rerun to get
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3266 # cross-references right" warning is heeded a reasonable number of
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3267 # times. In my experience this is enough for even the most troublesome
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3268 # documents, but it can be easily changed (if LaTeX has to be run after
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3269 # BibTeX more than three times, it is likely that something is moving
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3270 # back and forth between pages, and no amount of LaTeXing will fix
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3271 # that).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3272 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3273 # \includeonly is honored by this system, so files that are not
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3274 # specified there will not trigger a rebuild when changed.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3275 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3276 # Beamer:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3277 # A special TeX source comment is recognized by this makefile (only when
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3278 # BUILD_STRATEGY=latex, since this invokes psnup):
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3279 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3280 # %%[[:space:]]*BEAMER[[:space:]]*LARGE
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3281 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3282 # The presence of this comment forces the output of dvips through psnup
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3283 # to enlarge beamer slides to take up an entire letter-sized page. This
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3284 # is particularly useful when printing transparencies or paper versions
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3285 # of the slides. For some reason landscape orientation doesn't appear
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3286 # to work, though.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3287 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3288 # If you want to put multiple slides on a page, use this option and then
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3289 # print using mpage, a2ps, or psnup to consolidate slides. My personal
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3290 # favorite is a2ps, but your mileage may vary.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3291 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3292 # When beamer is the document class, dvips does NOT receive a paper size
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3293 # command line attribute, since beamer does special things with sizes.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3294 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3295 # GNUPlot Graphics:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3296 # When creating a .gpi file, DO NOT INCLUDE the "set terminal" or "set
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3297 # output" commands! The makefile will include terminal information for
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3298 # you. Besides being unnecessary and potentially harmful, including the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3299 # terminal definition in the .gpi file makes it harder for you, the one
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3300 # writing the document, to preview your graphics, e.g., with
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3301 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3302 # gnuplot -persist myfile.gpi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3303 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3304 # so don't do specify a terminal or an output file in your .gpi files.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3305 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3306 # When building a gpi file into an eps file, there are several features
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3307 # available to the document designer:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3308 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3309 # Global Header:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3310 # The makefile searches for the files in the variable GNUPLOT_GLOBAL
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3311 # in order:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3312 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3313 # ($(GNUPLOT_GLOBAL))
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3314 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3315 # Only the first found is used. All .gpi files in the directory are
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3316 # treated as though the contents of GNUPLOT_GLOBAL were directly
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3317 # included at the top of the file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3318 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3319 # NOTE: This includes special comments! (see below)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3320 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3321 # Font Size:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3322 # A special comment in a .gpi file (or a globally included file) of
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3323 # the form
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3324 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3325 # ## FONTSIZE=<number>
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3326 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3327 # will change the font size of the GPI output. If font size is
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3328 # specified in both the global file and the GPI file, the
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3329 # specification in the individual GPI file is used.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3330 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3331 # Grayscale Output:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3332 # GNUplot files also support a special comment to force them to be
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3333 # output in grayscale *no matter what*:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3334 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3335 # ## GRAY
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3336 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3337 # This is not generally advisable, since you can always create a
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3338 # grayscale document using the forms mentioned above. But, if your
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3339 # plot simply must be grayscale even in a document that allows
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3340 # colors, this is how you do it.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3341 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3342 # XFig Graphics:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3343 # No special handling is done with XFig, except when a global
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3344 # grayscale method is used, e.g.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3345 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3346 # make GRAY=1 document
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3347 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3348 # In these cases the .eps files is created using the -N switch to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3349 # fig2dev to turn off color output. (Only works with eps, not pstex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3350 # output)
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3351 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3352 # GraphVis Graphics:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3353 # Color settings are simply ignored here. The 'dot' program is used
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3354 # to transform a .dot file into a .eps file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3355 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3356 # If you want, you can use the dot2tex program to convert dot files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3357 # to tex graphics. The default is to just call dot2tex with no
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3358 # arguments, but you can change the DOT2TEX definition to include
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3359 # options as needed (in your Makefile.ini).
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3360 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3361 # Note that, as with pstex, the makefile cannot use latex's own
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3362 # output to discover all missing dot_t (output) files, since anytime
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3363 # TeX includes TeX, it has to bail when it can't find the include
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3364 # file. It can therefore only stop on the first missing file it
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3365 # discovers, and we can't get a large list of them out easily.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3366 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3367 # So, the makefile errors out if it's missing an included dot_t
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3368 # file, then prompts the user to run this command manually:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3369 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3370 # make all-dot2tex
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3371 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3372 # GZipped EPS Graphics:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3373 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3374 # A .eps.gz file is sometimes a nice thing to have. EPS files can get
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3375 # very large, especially when created from bitmaps (don't do this if you
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3376 # don't have to). This makefile will unzip them (not in place) to
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3377 # create the appropriate EPS file.
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3378 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3379 endef
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3380
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3381 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3382 # DEPENDENCY CHART:
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3383 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3384 #digraph "g" {
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3385 # rankdir=TB
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3386 # size="9,9"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3387 # edge [fontsize=12 weight=10]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3388 # node [shape=box fontsize=14 style=rounded]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3389 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3390 # eps [
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3391 # shape=Mrecord
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3392 # label="{{<gpi> GNUplot|<epsgz> GZip|<dot> Dot|<fig> XFig}|<eps> eps}"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3393 # ]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3394 # pstex [label="%.pstex"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3395 # pstex_t [label="%.pstex_t"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3396 # tex_outputs [shape=point]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3397 # extra_tex_files [shape=point]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3398 # gpi_data [label="<data>"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3399 # gpi_includes [label="_include_.gpi"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3400 # aux [label="%.aux"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3401 # fls [label="%.fls"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3402 # idx [label="%.idx"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3403 # glo [label="%.glo"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3404 # ind [label="%.ind"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3405 # log [label="%.log"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3406 # tex_sh [label="%.tex.sh"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3407 # rst [label="%.rst"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3408 # tex [
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3409 # shape=record
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3410 # label="<tex> %.tex|<include> _include_.tex"
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3411 # ]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3412 # include_aux [label="_include_.aux"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3413 # file_bib [label=".bib"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3414 # bbl [label="%.bbl"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3415 # dvi [label="%.dvi"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3416 # ps [label="%.ps"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3417 # pdf [label="%.pdf"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3418 # fig [label=".fig"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3419 # dot [label=".dot"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3420 # gpi [label=".gpi"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3421 # eps_gz [label=".eps.gz"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3422 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3423 # gpi_files [shape=point]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3424 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3425 # rst -> tex:tex [label="reST"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3426 # tex_sh -> tex:tex [label="sh"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3427 # tex_pl -> tex:tex [label="perl"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3428 # tex_py -> tex:tex [label="python"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3429 # tex -> tex_outputs [label="latex"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3430 # tex_outputs -> dvi
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3431 # tex_outputs -> aux
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3432 # tex_outputs -> log
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3433 # tex_outputs -> fls
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3434 # tex_outputs -> idx
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3435 # tex_outputs -> include_aux
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3436 # aux -> bbl [label="bibtex"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3437 # file_bib -> bbl [label="bibtex"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3438 # idx -> ind [label="makeindex"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3439 # glo -> gls [label="makeindex"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3440 # nlo -> nls [label="makeindex"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3441 # gls -> extra_tex_files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3442 # nls -> extra_tex_files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3443 # ind -> extra_tex_files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3444 # bbl -> extra_tex_files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3445 # eps -> extra_tex_files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3446 # extra_tex_files -> dvi [label="latex"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3447 # gpi_files -> eps:gpi [label="gnuplot"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3448 # gpi -> gpi_files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3449 # gpi_data -> gpi_files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3450 # gpi_includes -> gpi_files
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3451 # eps_gz -> eps:epsgz [label="gunzip"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3452 # fig -> eps:fig [label="fig2dev"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3453 # fig -> pstex [label="fig2dev"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3454 # fig -> pstex_t [label="fig2dev"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3455 # pstex -> pstex_t [label="fig2dev"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3456 # dot -> eps:dot [label="dot"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3457 # dvi -> ps [label="dvips"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3458 # include_aux -> bbl [label="bibtex"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3459 # ps -> pdf [label="ps2pdf"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3460 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3461 # edge [ color=blue label="" style=dotted weight=1 fontcolor=blue]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3462 # fls -> tex:include [label="INPUT: *.tex"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3463 # fls -> file_bib [label="INPUT: *.aux"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3464 # aux -> file_bib [label="\\bibdata{...}"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3465 # include_aux -> file_bib [label="\\bibdata{...}"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3466 # log -> gpi [label="Graphic file"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3467 # log -> fig [label="Graphic file"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3468 # log -> eps_gz [label="Graphic file"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3469 # log -> dot [label="Graphic file"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3470 # log -> idx [label="No file *.ind"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3471 # log -> glo [label="No file *.gls"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3472 # log -> nlo [label="No file *.nls"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3473 # gpi -> gpi_data [label="plot '...'"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3474 # gpi -> gpi_includes [label="load '...'"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3475 # tex:tex -> ps [label="paper"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3476 # tex:tex -> pdf [label="embedding"]
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3477 #}
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3478
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3479 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3480 # DEPENDENCY CHART SCRIPT
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3481 #
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3482 # $(call output_dependency_graph,[<output file>])
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3483 define output-dependency-graph
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3484 if [ -f '$(this_file)' ]; then \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3485 $(SED) \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3486 -e '/^[[:space:]]*#[[:space:]]*DEPENDENCY CHART:/,/^$$/!d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3487 -e '/DEPENDENCY CHART/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3488 -e '/^$$/d' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3489 -e 's/^[[:space:]]*#//' \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3490 $(this_file) $(if $1,> '$1',); \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3491 else \
6df869086544 Moved content to trunk
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
3492 $(ECHO) "Cannot determine the name of this makefile."; \

http://dive4elements.wald.intevation.org