File: Makefile.am

package info (click to toggle)
lcmaps 1.6.6-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,020 kB
  • sloc: sh: 11,191; ansic: 9,519; makefile: 533; lex: 184; perl: 92; yacc: 60
file content (214 lines) | stat: -rw-r--r-- 5,439 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
#       Copyright (c) Members of the EGEE Collaboration. 2004.
#       See http://eu-egee.org/partners/ for details on the copyright holders.
#       For license conditions see the license file or
#       http://eu-egee.org/license.html
#
#       Authors: Martijn Steenbakkers <martijn@nikhef.nl>
#
#       $Id: Makefile.am 14868 2011-03-04 20:55:13Z dennisvd $
#       Define the targets to be built here

SUFFIXES = .tex .aux .dvi .log .ps .bbl .pdf .html .eps

LATEX		= PATH=/usr/local/bin:$$PATH latex
PDFLATEX	= PATH=/usr/local/bin:$$PATH pdflatex
LATEXHTML	= PATH=/usr/local/bin:$$PATH latex2html
BIBTEX		= PATH=/usr/local/bin:$$PATH bibtex
LATEX_ARGS	= --interaction=nonstopmode
LATEXHTML_ARGS	= -no_footnode \
	          -link 1 \
		  -split 4 \
		  -t "PDL requirements" -address "Gerben Venekamp, `date +"%A %b %d %Y"`" \
		  -local_icons
DVIPS		= PATH=/usr/local/bin:$$PATH dvips
EPSTOPDF	= PATH=/usr/local/bin:$$PATH epstopdf

PREVIEWER	= xdvi -s 8 -paper a4 -expert
PS_PREVIEWER	= gv -scale -1 
PDF_PREVIEWER	= xpdf
HTML_PREVIEWER	= netscape

##
## Definitions for current job
##

EX		= example1.eps  example2.eps  example3.eps  example4.eps  example_real.eps \
		datagrid.eps  nikhef.eps

EXAMPLES	= $(EX:%=figures/%)

PDFEXAMPLES    = $(EXAMPLES:%.eps=%.pdf)

TEXS		= pdl_requirements.tex

AUXS            = pdl_requirements.aux

DVIS		= pdl_requirements.dvi

LOGS		= pdl_requirements.log

BIBS		= pdl_requirements.bib

BBLS		= pdl_requirements.bbl

BLGS            = pdl_requirements.blg

TOCS		= pdl_requirements.toc

PSS		= pdl_requirements.ps 

PDFS		= pdl_requirements.pdf

HTMLS		= pdl_requirements.html

userdocdir      = $(prefix)/share/doc/@PACKAGE@-@VERSION@

userdoc_DATA    = $(DVIS) $(PSS) $(PDFS) $(HTMLS)

EXTRA_DIST      = pdl_requirements.tex pdl_requirements.bib

##
## teach 'make' how to convert LaTeX to dvi, and dvi to postscript
##
.tex.dvi : 
	@echo LaTeXing $(<:%.tex=%)
	TEXINPUTS=:./style: $(LATEX) $(LATEX_ARGS) $<
	-@while [ `grep -c 'Rerun to get' $(<:%.tex=%.log)` -ne 0 ]; do \
		echo Rerunning to get cross references right ; \
		TEXINPUTS=:./style: $(LATEX) $(LATEX_ARGS) $< ; \
	done
	$(BIBTEX) $(BIBTEX_ARGS) $(<:%.tex=%)
	TEXINPUTS=:./style: $(LATEX) $(LATEX_ARGS) $<
	-@while [ `grep -c 'Rerun to get' $(<:%.tex=%.log)` -ne 0 ]; do \
		echo Rerunning to get cross references right ; \
		TEXINPUTS=:./style: $(LATEX) $(LATEX_ARGS) $< ; \
	done

.tex.pdf : 
	@echo PDF-LaTeXing $(<:%.tex=%)
	rm -f $(<:%.tex=%.aux)
	TEXINPUTS=:./style: $(PDFLATEX) $(LATEX_ARGS) $<
	-@while [ `grep -c 'Rerun to get' $(<:%.tex=%.log)` -ne 0 ]; do \
		echo Rerunning to get cross references right ; \
		TEXINPUTS=:./style: $(PDFLATEX) $(LATEX_ARGS) $< ; \
	done
	$(BIBTEX) $(BIBTEX_ARGS) $(<:%.tex=%)
	TEXINPUTS=:./style: $(PDFLATEX) $(LATEX_ARGS) $<
	-@while [ `grep -c 'Rerun to get' $(<:%.tex=%.log)` -ne 0 ]; do \
		echo Rerunning to get cross references right ; \
		TEXINPUTS=:./style: $(PDFLATEX) $(LATEX_ARGS) $< ; \
	done

.tex.html : 
	@echo LaTeX2html-ing $(<:%.tex=%)
	TEXINPUTS=:./style: $(LATEXHTML) $(LATEXHTML_ARGS) $< > /dev/null 2>&1
	@if [ -e $(<:%.tex=%.html) ]; then \
		if [ -L $(<:%.tex=%.html) ]; then \
			rm $(<:%.tex=%.html); \
			ln -s $(<:%.tex=%)/$(<:%.tex=%.html) $(<:%.tex=%.html); \
		fi; \
	else \
		ln -s $(<:%.tex=%)/$(<:%.tex=%.html) $(<:%.tex=%.html); \
	fi

.dvi.ps : 
	$(DVIPS) $(DVIPS_ARGS) -o $(<:%.dvi=%.ps) $<

.eps.pdf : 
	$(EPSTOPDF) --outfile=$(<:%.eps=%.pdf) $<

##
## possible targets; e.g. do 'make ps_preview' to preview the PostScript file
##
#apidoc:		apidoc/html/index.html apilatexdoc
#
#apidoc/html/index.html:
#		make -C ../../ apidoc
#
#apilatexdoc:	apidoc/html/index.html
#		make -C apidoc/latex ps
#		make -C apidoc/latex pdf
#
#userdoc:	$(apidoc_DATA) $(userdoc_DATA)

dvi:		$(DVIS)

ps:		$(PSS)

html:		$(HTMLS)

pdf:		$(PDFS)

pdfex:		$(PDFEXAMPLES)

$(DVIS):	$(BIBS) $(TEXS) $(EXAMPLES)

$(AUXS):	$(DVIS)

$(PSS):		$(BBLS) $(DVIS) 

$(PDFS):	$(TEXS) $(PDFEXAMPLES)

$(HTMLS):	$(TEXS) $(AUXS)

$(PDFEXAMPLES):	$(EXAMPLES)

#$(PLUGINEXAMPLES):	../plugin_example
#		@echo "Copying $(PLUGINEXAMPLES)"
#		@for example in $(PLUGINEXAMPLES); do \
#			cp ../plugin_example/$$example .; \
#	 	done

#$(PACKAGEFILES):
#		echo "Copying $(PACKAGEFILES)"
#		@for packagefile in $(PACKAGEFILES); do \
#			cp ../$$packagefile . ; \
#		done

clean:; 
		rm -f $(DVIS) $(LOGS) $(AUXS) $(PSS) $(TOCS) $(BBLS) $(BLGS) $(PDFEXAMPLES) \
		A4pdl_requirements.ps pdl_requirements.pdf pdl_requirements.html pdl_requirements.out
		rm -rf pdl_requirements

preview:	$(DVIS) 
		@echo "Starting DVI previewer."
		@for i in $(DVIS) ; do \
			$(PREVIEWER) $$i > /dev/null 2>&1 & \
		done

ps_preview:	$(PSS)
		@echo
		@echo "Starting postscript previewer."
		@for i in $(PSS) ; do \
			$(PS_PREVIEWER) $$i > /dev/null & \
		done

pdf_preview:	$(PDFS)
		@echo
		@echo "Starting pdf previewer."
		@for i in $(PDFS) ; do \
			$(PDF_PREVIEWER) $$i > /dev/null & \
		done
hard:;		@touch $(TEXS)

##

dist-hook:
	mkdir $(distdir)/figures
	( \
	for example in $(EX) ; do \
	    cp -p $(srcdir)/figures/$$example $(distdir)/figures; \
	done \
	)


install-data-hook:
	@echo Installing html files of latex2html documentation
	@echo Creating pdl_requirements html directory
	$(INSTALL) -d $(DESTDIR)$(userdocdir)/pdl_requirements
	@( \
	cd pdl_requirements; \
	for htmlfile in * ; do \
	    $(INSTALL_DATA) $$htmlfile $(DESTDIR)$(userdocdir)/pdl_requirements/$$htmlfile; \
	done \
	)