File: Makefile.am

package info (click to toggle)
gnuplot 6.0.3%2Bdfsg1-1~exp2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 14,960 kB
  • sloc: ansic: 95,874; cpp: 7,199; makefile: 2,470; javascript: 2,339; sh: 1,531; lisp: 664; perl: 304; pascal: 191; tcl: 88; python: 46
file content (405 lines) | stat: -rw-r--r-- 14,150 bytes parent folder | download | duplicates (3)
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# Makefile.am for GNUPLOT documentation directory
#
# Note that the master file for generating documentation is gnuplot.doc.
# See README.
#
# To print manual:
#
#   For LaTeX
#       make dvi
#     or
#       make pdf
#	(requires pdflatex and also graphicx and picins packages)
#     or
#       make tikz 
#	(requires pdflatex and also lua/tikz and wrapfig package)
#     or
#       make pdf_nofig
#       (PDF without figures)
#     or
#       make ps
#
#   For HTML
#	make wxhelp/wgnuplot.html (windows / wxt help system)
#     or
#	make html (HTML for web site)
#
#   For GNU info (texinfo)
#	make info
#

# default is what is needed for interactive gnuplot
gih_DATA = gnuplot.gih
gihdir = @GIHDIR@

noinst_PROGRAMS = checkdoc doc2ipf doc2tex doc2gih doc2hlp \
                  doc2rtf alldoc2gih doc2wxhtml doc2web

AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/term \
              -I./ja/term

# Documentation will be prepared for all terminals in CORETERM
# even if the terminal itself is not included in the build.

T = $(top_srcdir)/term/
CORETERM = $(T)ai.trm $(T)aquaterm.trm $(T)be.trm $(T)block.trm $(T)caca.trm \
$(T)cairo.trm $(T)canvas.trm $(T)cgm.trm $(T)context.trm \
$(T)debug.trm $(T)djsvga.trm $(T)dumb.trm $(T)dxf.trm \
$(T)emf.trm $(T)epson.trm \
$(T)estimate.trm $(T)fig.trm $(T)gd.trm \
$(T)gpic.trm $(T)grass.trm $(T)hpgeneric.h $(T)hpgl.trm $(T)imagen.trm \
$(T)linux-vgagl.trm $(T)latex_old.h \
$(T)lua.trm $(T)pbm.trm $(T)pict2e.trm \
$(T)pm.trm $(T)post.trm $(T)pslatex.trm \
$(T)pstricks.trm $(T)qt.trm $(T)regis.trm \
$(T)svg.trm $(T)t410x.trm $(T)tek.trm $(T)texdraw.trm $(T)tgif.trm \
$(T)tkcanvas.trm $(T)webp.trm $(T)win.trm $(T)wxt.trm $(T)x11.trm $(T)xlib.trm 

LEGACYTERM = $(T)latex.trm $(T)emtex.trm $(T)eepic.trm $(T)tpic.trm \
$(T)corel.trm $(T)dxy.trm $(T)excl.trm $(T)kyo.trm $(T)mif.trm \
$(T)metafont.trm $(T)metapost.trm $(T)ggi.trm\
$(T)hp2648.trm $(T)hp26.trm $(T)hp500c.trm $(T)hpljii.trm $(T)hppj.trm \
$(T)pc.trm $(T)pdf.trm $(T)qms.trm $(T)vws.trm

# Same thing for the subset of terminals for which we have
# Japanese documentation
TJ = ja/term/
JATERM = $(TJ)ai.trm $(TJ)aquaterm.trm $(TJ)be.trm $(TJ)block.trm $(TJ)caca.trm \
$(TJ)cairo.trm $(TJ)canvas.trm $(TJ)cgm.trm $(TJ)context.trm \
$(TJ)debug.trm $(TJ)djsvga.trm $(TJ)dumb.trm $(TJ)dxf.trm \
$(TJ)emf.trm $(TJ)epson.trm \
$(TJ)estimate.trm $(TJ)fig.trm $(TJ)gd.trm \
$(TJ)gpic.trm $(TJ)grass.trm $(TJ)hpgeneric.h $(TJ)hpgl.trm $(TJ)imagen.trm \
$(TJ)linux-vgagl.trm $(TJ)latex_old.h \
$(TJ)lua.trm $(TJ)pbm.trm $(TJ)pict2e.trm \
$(TJ)pm.trm $(TJ)post.trm $(TJ)pslatex.trm \
$(TJ)pstricks.trm $(TJ)qt.trm $(TJ)regis.trm \
$(TJ)svg.trm $(TJ)t410x.trm $(TJ)tek.trm $(TJ)texdraw.trm $(TJ)tgif.trm \
$(TJ)tkcanvas.trm $(TJ)webp.trm $(TJ)win.trm $(TJ)wxt.trm $(TJ)x11.trm $(TJ)xlib.trm


# DIST_COMMON = README

SOURCES = checkdoc.c doc2gih.c doc2hlp.c doc2ipf.c \
doc2rtf.c doc2tex.c windows/doc2html.c doc2web.c termdoc.c xref.c

TERM_H = $(top_srcdir)/src/term.h

DOCHEADERS = doc2x.h xref.h

EXTRA_DIST = Makefile.in doc2texi.el gnuplot.doc \
titlepag.ipf titlepag.tex title-ja.tex \
toc_entr.sty psdoc gnuplot-ja.doc README.ja \
term-ja.diff plotstyles.gnu gnuplot.pdf webp_figures.gnu \
windows/wgnuplot.hhk windows/wgnuplot.hhp windows/wgnuplot.stp windows/doc2html.c \
html/gnuplot_docs.css

ELCS = gnuplot-eldoc.elc

MOSTLYCLEANFILES = gnuplot.aux gnuplot.log gnuplot.out gnuplot.toc	\
gnuplot.ind gpinsetfigure.aux gpinsetfigure.tex figurestyle \
no_figures tikz_figures pdf_figures \
wxhelp/doc2html.o

CLEANFILES = gnuplot.dvi gnuplot.tex gnuplot.idx gnuplot.ilg		\
gnuplot.ps gnuplot.gih gnuplot.hlp gnuplot.info* gnuplot.ipf 		\
gnuplot.rtf gnuplot.tmp VERSION gnuplot.4tc gnuplot.4ct			\
gnuplot.idv gnuplot.xref gnuplot.lg gnuplot.pdf				\
ja.doc gnuplot-ja.ind gnuplot-ja.ilg gnuplot-ja.aux gnuplot-ja.toc	\
gnuplot-ja.log gnuplot-ja.idx gnuplot-ja.out gnuplot-ja.tex		\
wxhelp_figures wxhelp/*.html wxhelp/wgnuplot.hhc wxhelp/wgnuplot.hhk	\
wxhelp/wgnuplot.htc wxhelp/doc2html$(EXEEXT) windows/wgnuplot.htk	\
svg_figures html/*.html html/*.svg html/*.hhc html/*.hhk                \
html/*.webp html/figure_mask.png                           \
psdoc/*.aux psdoc/*.dvi psdoc/*.log                                     \
psdoc/ps_fontfile_doc.pdf psdoc/ps_fontfile_doc.ps psdoc/ps_symbols.ps  \
windows/*.png gnuplot.htb gnuplot.texi gnuplot-eldoc.el $(ELCS)

DISTFILES = $(DIST_COMMON) $(SOURCES) $(DOCHEADERS) $(EXTRA_DIST)

BUILT_SOURCES = allterm.h allterm-ja.h

GNUPLOT_EXE = ../src/gnuplot$(EXEEXT)

$(GNUPLOT_EXE):
	( cd ../src ; $(MAKE) gnuplot$(EXEEXT) )

if BUILD_LUA
LUA_HELP = gnuplot-tikz.help
$(LUA_HELP): $(top_srcdir)/term/lua/gnuplot-tikz.lua
	$(AM_V_GEN) $(LUA) $< termhelp > $@
else
LUA_HELP = 
endif

allterm.h: $(CORETERM) $(LUA_HELP)
	$(AM_V_GEN) for e in `grep -E "^[ 	]*START_HELP" $(CORETERM) |\
	     LC_ALL=C sort -f -t':' -k2` ; do \
	  f=`echo $$e |cut -d\: -f1` ; s=`echo $$e | cut -d\: -f2` ;\
	  sed -n "/^[ 	]*$$s/,/^[ 	]*END_HELP/p" $$f ; \
	done >$@


### PDF documentation can inset figures using either tikz+wrapfig or pdf+picins
pdf_figures: $(GNUPLOT_EXE) $(srcdir)/plotstyles.gnu
	$(AM_V_at)GNUPLOT_LIB=$(top_srcdir)/demo $(GNUPLOT_EXE) $(srcdir)/plotstyles.gnu
	rm -f gpinsetfigure.tex
	printf '%s\n' '\usepackage{graphicx}' \
		'\newcommand{\gpinsetfigure}[1]{' \
		'  \parpic[r][rt]{\includegraphics[width=3in,keepaspectratio]{#1}}' \
		'}' > gpinsetfigure.tex
	$(AM_V_GEN)touch $@
	$(AM_V_at)touch figurestyle

tikz_figures: $(GNUPLOT_EXE) $(srcdir)/plotstyles.gnu
	$(AM_V_at)GNUPLOT_LIB=$(top_srcdir)/demo GNUTERM=tikz $(GNUPLOT_EXE) $(srcdir)/plotstyles.gnu
	rm -f gpinsetfigure.tex
	printf '%s\n' '\usepackage{gnuplot-lua-tikz}' \
		'\usepackage{wrapfig}' \
		'\newcommand{\gpinsetfigure}[1]{' \
		'    \begin{wrapfigure}[10]{r}{3.0in}' \
		'    \vspace{-20pt} \input{#1} \vspace{-20pt}' \
		'    \end{wrapfigure}' \
		'}' > gpinsetfigure.tex
	$(AM_V_GEN)touch $@
	$(AM_V_at)touch figurestyle

no_figures:
	rm -f gpinsetfigure.tex
	printf '%s\n' '\newcommand{\gpinsetfigure}[1]{}' > gpinsetfigure.tex
	$(AM_V_GEN)touch $@
	$(AM_V_at)touch figurestyle

gpinsetfigure.tex: no_figures
	$(AM_V_GEN) touch $@

gnuplot.tex: allterm.h doc2tex$(EXEEXT) $(srcdir)/gnuplot.doc
	$(AM_V_GEN)./doc2tex$(EXEEXT) -figures $(srcdir)/gnuplot.doc $@

pdf: pdf_figures
	$(MAKE) gnuplot.pdf
	rm -f tikz_figures no_figures
tikz: tikz_figures gnuplot.pdf figurestyle
	rm -f pdf_figures no_figures
pdf_nofig: no_figures gnuplot.pdf figurestyle
	rm -f tikz_figures pdf_figures

gnuplot.pdf: gnuplot.tex $(srcdir)/titlepag.tex $(srcdir)/toc_entr.sty pdf_figures
	$(AM_V_GEN)if test $(PDFLATEX) != no ; then \
	  TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: xelatex $< ; \
	  TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: xelatex $< ; \
	  TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: xelatex $< ; \
	  makeindex gnuplot ; \
	  TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: xelatex $< ; \
	  rm -f gnuplot.idx gnuplot.ilg gnuplot.ind ; \
	else \
	  echo pdflatex not found - cannot build pdf file ; \
	fi

### LaTeX documentation
tex: gnuplot.tex

doc2tex_SOURCES = doc2tex.c termdoc.c
doc2tex_CPPFLAGS = -DALL_TERM_DOC $(AM_CPPFLAGS)

dvi: no_figures gnuplot.dvi
gnuplot.dvi: gnuplot.tex $(srcdir)/titlepag.tex $(srcdir)/toc_entr.sty
	$(AM_V_GEN)if test $(LATEX) != no ; then \
	  TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) $< ; \
	  TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) $< ; \
	  TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) $< ; \
	  makeindex gnuplot ; \
	  TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) $< ; \
	else \
	  echo "latex not found - cannot build dvi file" ; \
	fi

### Postscript format
# if pslatex has been installed, add "times" to titlepage.tex
ps: gnuplot.ps

gnuplot.ps: gnuplot.dvi
	$(AM_V_GEN)if test $(DVIPS) != no ; then \
	   $(DVIPS) gnuplot.dvi -o gnuplot.ps ; \
	else \
	   echo "dvips not found - cannot build PS file" ; \
	fi

# Prepare PDF copy of User Manual in Japanese
#
# This procedure assumes use of luatex with package luatexja
# Tested with TeX Live 2020
# Known limitations:
# - The title page is not completely translated.
# - Only the original English keywords appear in the index and hyperlinks.
# - gnuplot-tikz.help not included in the resulting *.tex file because
#   translation and conversion to utf8 would happen too late
#   for this build recipe.
allterm-ja.h: $(CORETERM) $(LUA_HELP)
	-mkdir ja
	-mkdir ja/docs;
	cp $(top_srcdir)/docs/doc2rtf.c ja/docs
	cp $(top_srcdir)/docs/term-ja.diff ja
	cp -r $(top_srcdir)/term $(TJ)
	-( cd ja ; patch -p0 < term-ja.diff )
	$(AM_V_GEN) for e in `grep -E "^[ 	]*START_HELP" $(JATERM) |\
	     LC_ALL=C sort -f -t':' -k2` ; do \
	  f=`echo $$e |cut -d\: -f1` ; s=`echo $$e | cut -d\: -f2` ;\
	  LC_ALL=C sed -n "/^[ 	]*$$s/,/^[ 	]*END_HELP/p" $$f ; \
	done >allterm.tmp
	iconv -f EUC-JP -t UTF-8 < allterm.tmp >$@
	rm allterm.tmp
	-chmod -R +w $(TJ)
	rm -rf $(TJ)

gnuplot-ja.pdf: gnuplot-ja.doc title-ja.tex pdf_figures allterm-ja.h doc2tex$(EXEEXT)
	iconv -f EUC-JP -t UTF-8 gnuplot-ja.doc > ja.doc
	./doc2tex$(EXEEXT) -figures -japanese ja.doc | sed 's/titlepag.tex/title-ja.tex/' > gnuplot-ja.tex
	lualatex gnuplot-ja
	lualatex gnuplot-ja
	makeindex gnuplot-ja
	lualatex gnuplot-ja
	rm -f gnuplot-ja.ind gnuplot-ja.ilg gnuplot-ja.aux gnuplot-ja.toc
	rm -f gnuplot-ja.idx gnuplot-ja.out
	rm -f ja.doc gnuplot-ja.tex

# this is how to make gnuplot.hlp
hlp: gnuplot.hlp

gnuplot.hlp: doc2hlp$(EXEEXT) $(srcdir)/gnuplot.doc
	$(AM_V_GEN)./doc2hlp$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.hlp

doc2hlp_SOURCES = doc2hlp.c termdoc.c

### gnuplot interactive help format
gih: gnuplot.gih

gnuplot.gih: doc2gih$(EXEEXT) $(srcdir)/gnuplot.doc
	$(AM_V_GEN)./doc2gih$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.gih

doc2gih_SOURCES = doc2gih.c termdoc.c

# To include all terminals in the .gih file
allgih: alldoc2gih$(EXEEXT) $(srcdir)/gnuplot.doc
	@echo "generate gnuplot.gih with all terminals"
	$(AM_V_at)./alldoc2gih$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.gih

alldoc2gih_SOURCES = doc2gih.c termdoc.c
alldoc2gih_CPPFLAGS = -DALL_TERM_DOC $(AM_CPPFLAGS)

### wxhelp format
htb: gnuplot.htb

gnuplot.htb: wxhelp/wgnuplot.html wxhelp_figures	\
$(srcdir)/windows/wgnuplot.hhp wxhelp/wgnuplot.hhc	\
$(srcdir)/windows/wgnuplot.hhk
	$(AM_V_GEN) zip -j9 gnuplot.htb windows/wgnuplot.hhp		\
wxhelp/wgnuplot.hhc wxhelp/wgnuplot.hhk wxhelp/*.html windows/*.png

wxhelp/wgnuplot.html: doc2wxhtml$(EXEEXT) $(srcdir)/gnuplot.doc 
	$(AM_V_GEN) ./doc2wxhtml$(EXEEXT) $(srcdir)/gnuplot.doc wxhelp/

doc2wxhtml_SOURCES = windows/doc2html.c termdoc.c xref.c allterm.h
doc2wxhtml_CPPFLAGS = -DALL_TERM_DOC -DWXHELP -I../src $(AM_CPPFLAGS)

wxhelp_figures: $(GNUPLOT_EXE) $(srcdir)/plotstyles.gnu
	$(AM_V_at) [ -d windows ] || mkdir -p windows
	$(AM_V_at) GNUPLOT_LIB=$(top_srcdir)/demo $(GNUPLOT_EXE) -e "winhelp=1;" $(srcdir)/plotstyles.gnu
	$(AM_V_GEN)touch $@

### HTML documentation for web site
##  I gave up on doc -> tex -> html 
#
doc2web_SOURCES = doc2web.c termdoc.c xref.c allterm.h
doc2web_CPPFLAGS = -DALL_TERM_DOC -I../src $(AM_CPPFLAGS)

html: allterm.h doc2web$(EXEEXT) $(srcdir)/gnuplot.doc svg_figures
	$(AM_V_at) [ -d html ] || mkdir -p html
	$(AM_V_at) rm -f html/Overview.html html/Plotting_Styles.html html/Commands.html html/Terminals.html
	$(AM_V_at) rm -f html/NewFeatures.html
	$(AM_V_GEN)./doc2web$(EXEEXT) $(srcdir)/gnuplot.doc html
	$(AM_V_GEN) sort -k 3 html/index.hhk > html/index.html

svg_figures: $(GNUPLOT_EXE) $(srcdir)/plotstyles.gnu
	$(AM_V_at) [ -d html ] || mkdir -p html
	$(AM_V_at) GNUPLOT_LIB=$(top_srcdir)/demo GNUTERM=svg $(GNUPLOT_EXE) $(srcdir)/plotstyles.gnu
	$(AM_V_GEN)touch $@

### GNU info format
info: gnuplot.info

# Thanks to Bruce Ravel for doc2texi.el!
gnuplot.texi gnuplot-eldoc.el: $(srcdir)/doc2texi.el $(srcdir)/gnuplot.doc
	$(AM_V_GEN) if test "$(EMACS)" != no; then \
	   test "$(top_srcdir)" = "$(top_builddir)" || cp $(srcdir)/gnuplot.doc . ; \
	   $(EMACS) -batch -q --no-site-file -l $< -f d2t-doc-to-texi ; \
	   test "$(top_srcdir)" = "$(top_builddir)" || rm -f ./gnuplot.doc ; \
	else \
	   echo "No emacs found - cannot create texinfo file" ; \
	fi

${ELCS}: gnuplot-eldoc.el
	$(AM_V_GEN) if test "$(EMACS)" != no; then \
	   echo "Compiling gnuplot-eldoc.el" ; \
	   $(EMACS) -batch -q --no-site-file -f batch-byte-compile $* ; \
	else \
	   echo "No emacs found - cannot create gnuplot-eldoc.elc file" ; \
	fi

# Rules processing texinfo could be provided by automake
# automatically, using a line like info_TEXINFOS = gnuplot.texi.  But
# that only appears to work with a non-generated texi file for input.

gnuplot.info: gnuplot.texi
	$(AM_V_GEN) $(MAKEINFO) -I$(srcdir) $< --no-split  --force --output=$@

install-info: gnuplot.info
	$(AM_V_at) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
	$(AM_V_at) $(INSTALL_DATA) gnuplot.info $(DESTDIR)$(infodir)/gnuplot.info
	$(AM_V_at) if (install-info --version && \
	     install-info --version | grep -F -i -v debian) >/dev/null 2>&1; then \
	  install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnuplot.info || : ;\
	else : ; fi

# this is how to make OS/2 ipfc documentation
ipf: gnuplot.ipf

gnuplot.ipf: doc2ipf$(EXEEXT) $(srcdir)/gnuplot.doc
	$(AM_V_GEN) ./doc2ipf$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.ipf

doc2ipf_SOURCES = doc2ipf.c termdoc.c xref.c

### Rich Text Format
rtf: gnuplot.rtf

gnuplot.rtf: doc2rtf$(EXEEXT) $(srcdir)/gnuplot.doc
	$(AM_V_GEN) ./doc2rtf$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.rtf

doc2rtf_SOURCES = doc2rtf.c termdoc.c xref.c

# this is how to check the gnuplot.doc file
check-local: checkdoc$(EXEEXT)
	$(AM_V_at)./checkdoc$(EXEEXT) < $(srcdir)/gnuplot.doc; \
	if test $$? -eq 0; then \
	  echo "PASS: gnuplot.doc"; \
	else \
	  :; \
	fi

checkdoc_SOURCES = checkdoc.c termdoc.c gnuplot.doc

clean-local:
	$(AM_V_at)for f in figure*.pdf figure*.tex $(LUA_HELP); do \
	   if [ "$$f" != "figure_missing.pdf" ]; then \
	     rm -f $$f ; \
	   else \
	     :; \
	   fi \
	 done
	$(AM_V_at)rm -f pdf_figures
	$(AM_V_at)rm -rf ja

distclean-local:
	-rm -f $(BUILT_SOURCES)

#the end