1 # Makefile.in for GNUPLOT documentation
3 # Note that the top-level file for documentation is gnuplot.doc.
10 # (print or view gnuplot.dvi)
11 # or (requires pdflatex)
13 # (print or view gnuplot.pdf)
16 # (print or view gnuplot.ps)
18 # For groff (GNU troff}
20 # (print or view gnuplot.txt)
23 # (print or view gnuplot.dvi)
26 # (print or view gnuplot.ps)
30 # (print or view gnuplot.nroff)
33 # make "TROFF=itroff" troff (use your troff here)
35 # For GNU info (texinfo)
39 # default is what is needed for interactive gnuplot
42 # this tells GNU make not to export variables into the environment
43 # But other makes dont understand its significance, so it must
44 # not be the first target in the file. So it is here, before
45 # any variables are created, but after the default target
51 exec_prefix = @exec_prefix@
54 datarootdir = @datarootdir@
58 top_srcdir = @top_srcdir@
62 INSTALL_PROGRAM = @INSTALL_PROGRAM@
63 INSTALL_DATA = @INSTALL_DATA@
71 INFO_DEPS = $(srcdir)/gnuplot.info
76 DEFAULT_INCLUDES = -I. -I$(srcdir) -I.. -I$(top_builddir)
80 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/term
84 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
86 LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
91 # The makeinfo command from GNU texinfo
94 # Required for the temporary .info file fix
97 # substitute your troff command (and any flags) for this one
100 # LaTeX command, either latex or latex2e or no
104 PLAINTEX = @PLAINTEX@
107 PDFLATEX = @PDFLATEX@
109 # substitute your DVI to PostScript conversion program here
112 T = $(top_srcdir)/term/
113 CORETERM = $(T)aed.trm $(T)ai.trm $(T)amiga.trm $(T)apollo.trm \
114 $(T)aquaterm.trm $(T)atariaes.trm $(T)atarivdi.trm $(T)be.trm $(T)cgi.trm \
115 $(T)cgm.trm $(T)corel.trm $(T)debug.trm $(T)djsvga.trm $(T)dumb.trm \
116 $(T)dxf.trm $(T)dxy.trm $(T)eepic.trm $(T)emf.trm $(T)emxvga.trm \
117 $(T)epson.trm $(T)excl.trm $(T)fg.trm $(T)fig.trm $(T)gd.trm \
118 $(T)ggi.trm $(T)gnugraph.trm $(T)gpic.trm $(T)gpr.trm \
119 $(T)grass.trm $(T)hp26.trm $(T)hp2648.trm $(T)hp500c.trm $(T)hpgl.trm \
120 $(T)hpljii.trm $(T)hppj.trm $(T)imagen.trm $(T)iris4d.trm $(T)kyo.trm \
121 $(T)latex.trm $(T)linux.trm $(T)mac.trm $(T)metafont.trm $(T)metapost.trm \
122 $(T)mgr.trm $(T)mif.trm $(T)multitos.trm $(T)next.trm $(T)openstep.trm \
123 $(T)pbm.trm $(T)pc.trm $(T)pdf.trm $(T)pm.trm $(T)post.trm \
124 $(T)pslatex.trm $(T)pstricks.trm $(T)qms.trm $(T)regis.trm $(T)rgip.trm \
125 $(T)sun.trm $(T)svg.trm $(T)t410x.trm $(T)tek.trm \
126 $(T)texdraw.trm $(T)tgif.trm $(T)tkcanvas.trm $(T)tpic.trm $(T)unixpc.trm \
127 $(T)unixplot.trm $(T)v384.trm $(T)vgagl.trm $(T)vws.trm $(T)win.trm \
128 $(T)wxt.trm $(T)x11.trm $(T)xlib.trm
130 DIST_COMMON = README Makefile.in
132 SOURCES = checkdoc.c doc2gih.c doc2hlp.c doc2ipf.c doc2ms.c doc2rnh.c \
133 doc2rtf.c doc2tex.c termdoc.c xref.c
135 TERM_H = $(top_srcdir)/src/term.h
137 BUILT_SOURCES = allterm.h
139 HEADERS = doc2x.h xref.h
141 EXTRA_DIST = doc2texi.el gnuplot.doc gnuplot.texi gpcard.tex makefile.ami \
142 makefile.dst titlepag.ipf titlepag.ms titlepag.tex toc_entr.sty old psdoc \
143 faq-ja.tex gnuplot-ja.doc README.ja term-ja.diff
145 CLEANFILES = doc2tex gnuplot.tex gnuplot.dvi gnuplot.aux gnuplot.log \
146 gnuplot.toc gnuplot.pdf gnuplot.ps gpcard.dvi gpcard.log gpcard.ps alldoc2gih \
147 doc2gih gnuplot.gih doc2hlp gnuplot.hlp gnuplot.idx gnuplot.ilg gnuplot.ind \
148 gnuplot.info* gnuplot.out doc2ipf gnuplot.ipf doc2ms gnuplot.ms doc2rnh \
149 gnuplot.rnh doc2rtf gnuplot.rtf gnuplot.nroff checkdoc gnuplot.txt
151 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(EXTRA_DIST)
153 allterm.h: $(CORETERM)
154 @echo "Building allterm.h"
155 @for e in `egrep "^[ ]*START_HELP" $(CORETERM) |\
156 LC_ALL=C sort -f -t':' -k2` ; do \
157 f=`echo $$e |cut -d\: -f1` ; s=`echo $$e | cut -d\: -f2` ;\
158 sed -n "/^[ ]*$$s/,/^[ ]*END_HELP/p" $$f ; \
161 # HBB 20041111: commented out, since it's no longer used.
163 # @echo "Building term.h"
164 # @cat ../config.h $(CORETERM) > term.c
165 # $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -DTERM_DRIVER_H -DTERM_HELP term.c | \
166 # sed '/^ *$$/d;/^#/d' >$@
170 alldoc: check dvi gih hlp html info ipf ms nroff pdf ps rnh rtf
172 ### [tn]roff documentation
173 troff: gnuplot.ms titlepag.ms
174 @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \
175 tbl gnuplot.ms | eqn | $(TROFF) -ms ; \
177 < gnuplot.ms sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," |\
178 tbl | eqn | $(TROFF) -ms ; \
183 gnuplot.nroff: gnuplot.ms titlepag.ms
184 @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \
185 tbl gnuplot.ms | neqn | nroff -ms | col > gnuplot.nroff ; \
187 < gnuplot.ms sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," |\
188 tbl | neqn | nroff -ms | col > gnuplot.nroff ; \
191 ### groff documentation
193 groff: grotxt grodvi grops
195 grotxt: gnuplot.ms titlepag.ms
196 @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \
197 groff -s -p -t -e -ms -Tlatin1 gnuplot.ms > gnuplot.txt ; \
199 sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," gnuplot.ms |\
200 groff -s -p -t -e -ms -Tlatin1 gnuplot.ms > gnuplot.txt ; \
203 grodvi: gnuplot.ms titlepag.ms
204 @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \
205 groff -s -p -t -e -ms -Tdvi gnuplot.ms > gnuplot.dvi ; \
207 sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," gnuplot.ms |\
208 groff -s -p -t -e -ms -Tdvi gnuplot.ms > gnuplot.dvi ; \
211 grops: gnuplot.ms titlepag.ms
212 @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \
213 groff -s -p -t -e -ms -Tps gnuplot.ms > gnuplot.ps ; \
215 sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," gnuplot.ms |\
216 groff -s -p -t -e -ms -Tps gnuplot.ms > gnuplot.ps ; \
219 ### doc2xxx dependencies
222 gnuplot.ms: doc2ms $(srcdir)/gnuplot.doc
223 ./doc2ms $(srcdir)/gnuplot.doc gnuplot.ms
225 doc2ms: doc2ms.o termdoc.o
226 $(LINK) doc2ms.o termdoc.o $(LIBS)
228 doc2ms.o: doc2ms.c $(BUILT_SOURCES)
229 $(COMPILE) -DALL_TERM_DOC -c $(srcdir)/doc2ms.c
232 html: htmldocs/gnuplot.html
234 # requires makeinfo (GNU texinfo) 4.0 or better
235 # htmldocs/gnuplot.html: $(srcdir)/gnuplot.texi
236 # $(MAKEINFO) --html -I$(srcdir) $(srcdir)/gnuplot.texi --no-split --output=$@
238 # TeX itself does a better job these days, and doesn't depend on having
239 # emacs around to do lisp pre-processing
240 htmldocs/gnuplot.html: $(srcdir)/gnuplot.tex
242 latex2html -dir htmldocs -local_icons gnuplot
244 ### PDF documentation
247 gnuplot.pdf: gnuplot.tex
248 @if test $(PDFLATEX) != no ; then \
249 rm -f gnuplot.idx ; \
250 touch gnuplot.idx ; \
251 TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) gnuplot ; \
252 TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) gnuplot ; \
253 TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) gnuplot ; \
254 makeindex gnuplot ; \
255 TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) gnuplot ; \
257 echo pdflatex not found - cannot build pdf file ; \
260 ### LaTeX documentation
263 gnuplot.tex: doc2tex $(srcdir)/gnuplot.doc
264 ./doc2tex $(srcdir)/gnuplot.doc gnuplot.tex
266 doc2tex: doc2tex.o termdoc.o
267 $(LINK) doc2tex.o termdoc.o $(LIBS)
269 doc2tex.o: doc2tex.c $(BUILT_SOURCES)
270 $(COMPILE) -DALL_TERM_DOC -c $(srcdir)/doc2tex.c
272 # this is how to make DVI files
273 dvi: gnuplot.dvi gpcard.dvi
275 gnuplot.dvi: gnuplot.tex titlepag.tex toc_entr.sty
276 @if test $(LATEX) != no ; then \
277 rm -f gnuplot.idx ; \
278 touch gnuplot.idx ; \
279 TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) gnuplot ; \
280 TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) gnuplot ; \
281 TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) gnuplot ; \
282 makeindex gnuplot ; \
283 TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(LATEX) gnuplot ; \
285 echo "latex not found - cannot build dvi file" ; \
288 gpcard.dvi: gpcard.tex
289 @if test $(PLAINTEX) != no ; then \
290 TEXINPUTS=.:$(srcdir):$(top_srcdir): tex gpcard ; \
292 echo "plaintex not found - cannot build dvi file" ; \
295 ### Postscript format
296 # if pslatex has been installed, add "times" to titlepage.tex
297 ps: gnuplot.ps gpcard.ps
299 gnuplot.ps: gnuplot.dvi
300 @if test $(DVIPS) != no ; then \
301 $(DVIPS) gnuplot.dvi -o gnuplot.ps ; \
303 echo "dvips not found - cannot build PS file" ; \
306 gpcard.ps: gpcard.dvi
307 @if test $(DVIPS) != no ; then \
308 $(DVIPS) gpcard.dvi -o gpcard.ps ; \
310 echo "dvips not found - cannot build PS file" ; \
314 # this is how to make gnuplot.hlp
317 gnuplot.hlp: doc2hlp $(srcdir)/gnuplot.doc
318 ./doc2hlp $(srcdir)/gnuplot.doc gnuplot.hlp
320 doc2hlp: doc2hlp.o termdoc.o
321 $(LINK) doc2hlp.o termdoc.o $(LIBS)
323 ### gnuplot interactive help format
326 gnuplot.gih: doc2gih $(srcdir)/gnuplot.doc
328 ./doc2gih $(srcdir)/gnuplot.doc gnuplot.gih
330 doc2gih: doc2gih.o termdoc.o
331 $(LINK) doc2gih.o termdoc.o $(LIBS)
333 # To include all terminals in the .gih file
334 allgih: alldoc2gih $(srcdir)/gnuplot.doc
336 ./alldoc2gih $(srcdir)/gnuplot.doc gnuplot.gih
338 alldoc2gih: alldoc2gih.o termdoc.o
339 $(LINK) alldoc2gih.o termdoc.o $(LIBS)
341 alldoc2gih.o: doc2gih.c $(BUILT_SOURCES)
342 $(COMPILE) -DALL_TERM_DOC -c $(srcdir)/doc2gih.c
343 @mv doc2gih.o alldoc2gih.o
348 gnuplot.info: $(srcdir)/gnuplot.texi
349 $(MAKEINFO) -I$(srcdir) $(srcdir)/gnuplot.texi --no-split --output=$@
351 # Thanks to Bruce Ravel for doc2texi.el!
352 $(srcdir)/gnuplot.texi: $(srcdir)/doc2texi.el $(srcdir)/gnuplot.doc
353 @echo "Creating texinfo"
354 @if test "$(EMACS)" != no; then \
356 $(EMACS) -batch -l doc2texi.el -f d2t-doc-to-texi ; \
358 echo "No emacs found - cannot create texinfo file" ; \
361 # this is how to make OS/2 ipfc documentation
364 gnuplot.ipf: doc2ipf $(srcdir)/gnuplot.doc
365 ./doc2ipf $(srcdir)/gnuplot.doc gnuplot.ipf
367 doc2ipf: doc2ipf.o termdoc.o xref.o
368 $(LINK) doc2ipf.o termdoc.o xref.o $(LIBS)
373 gnuplot.rtf: doc2rtf $(srcdir)/gnuplot.doc
374 ./doc2rtf $(srcdir)/gnuplot.doc gnuplot.rtf
376 doc2rtf: doc2rtf.o termdoc.o xref.o
377 $(LINK) doc2rtf.o termdoc.o xref.o $(LIBS)
379 # this is how to make rnh documentation (VMS help format)
382 gnuplot.rnh: doc2rnh $(srcdir)/gnuplot.doc
383 ./doc2rnh $(srcdir)/gnuplot.doc gnuplot.rnh
385 doc2rnh: doc2rnh.o termdoc.o
386 $(LINK) doc2rnh.o termdoc.o $(LIBS)
388 ### AmigaGuide(R) format
389 ## requires the GG version of makeinfo
390 #guide: gnuplot.guide
392 #gnuplot.guide: $(srcdir)/gnuplot.texi $(srcdir)/gnuplot.doc
393 # $(MAKEINFO) --amiga -I$(srcdir) $(srcdir)/gnuplot.texi --no-split --output=$@
395 # end doc2xxx section
397 # this is how to check the gnuplot.doc file
399 @./checkdoc < $(srcdir)/gnuplot.doc; \
400 if test $$? -eq 0; then \
401 echo "PASS: gnuplot.doc"; \
406 checkdoc: checkdoc.o termdoc.o $(srcdir)/gnuplot.doc
407 $(LINK) checkdoc.o termdoc.o $(LIBS)
409 checkdoc.o: checkdoc.c $(BUILT_SOURCES)
410 $(COMPILE) -DALL_TERM_DOC -c $(srcdir)/checkdoc.c
413 install: install-gih install-info
415 install-gih: gnuplot.gih
416 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(GIHDIR)
417 $(INSTALL_DATA) gnuplot.gih $(DESTDIR)$(GIHDIR)/gnuplot.gih
419 install-info: gnuplot.info
420 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
421 $(INSTALL_DATA) gnuplot.info $(DESTDIR)$(infodir)/gnuplot.info
422 @if (install-info --version && \
423 install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
424 echo "install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnuplot.info";\
425 install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnuplot.info || :;\
433 uninstall: uninstall-gih uninstall-info
436 rm -f $(DESTDIR)$(GIHDIR)/gnuplot.gih
440 @if (install-info --version && \
441 install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
442 list='$(INFO_DEPS)'; \
443 for file in $$list; do \
444 relfile=`echo "$$file" | sed 's|^.*/||'`; \
445 echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \
446 install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \
450 @list='$(INFO_DEPS)'; \
451 for file in $$list; do \
452 relfile=`echo "$$file" | sed 's|^.*/||'`; \
453 relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
454 (if cd $(DESTDIR)$(infodir); then \
455 echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
456 rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
461 install-vms: gnuplot.hlp
462 $(INSTALL_DATA) gnuplot.hlp $(datadir)/gnuplot.hlp
464 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
469 distdir: $(DISTFILES)
470 distdir=`cd $(distdir) && pwd`
471 @for file in $(DISTFILES); do \
473 if test -d $$d/$$file; then \
474 cp -pr $$d/$$file $(distdir)/$$file; \
476 test -f $(distdir)/$$file \
477 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
478 || cp -p $$d/$$file $(distdir)/$$file || :; \
483 @test "$(top_srcdir)" = "$(top_builddir)" || rm -f gnuplot.texi
486 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
487 -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
488 -test -d htmldocs && rm -rf htmldocs
491 rm -f *.o core *.core
493 clean: clean-local clean-generic clean-compile
504 Makefile: Makefile.in ../config.status
506 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
508 ### Dependencies - do not edit!
510 # all doc2somethings depend on termdoc and either ../term.h or
511 # allterm.h, maybe this would be better as separate object file
512 # (but then we have to change all the other makefiles). Plus then
513 # we cannot make some doc2* filters use allterm.h and others use term.h
515 checkdoc.o: checkdoc.c ../config.h $(top_srcdir)/src/syscfg.h \
516 $(top_srcdir)/src/stdfn.h doc2x.h allterm.h
517 alldoc2gih.o: doc2gih.c ../config.h $(top_srcdir)/src/syscfg.h \
518 $(top_srcdir)/src/stdfn.h doc2x.h allterm.h
519 doc2gih.o: doc2gih.c ../config.h $(top_srcdir)/src/syscfg.h \
520 $(top_srcdir)/src/stdfn.h doc2x.h $(TERM_H)
521 doc2hlp.o: doc2hlp.c ../config.h $(top_srcdir)/src/syscfg.h \
522 $(top_srcdir)/src/stdfn.h doc2x.h $(TERM_H)
523 doc2ipf.o: doc2ipf.c ../config.h $(top_srcdir)/src/syscfg.h \
524 $(top_srcdir)/src/stdfn.h doc2x.h $(TERM_H)
525 doc2ms.o: doc2ms.c ../config.h $(top_srcdir)/src/syscfg.h \
526 $(top_srcdir)/src/stdfn.h doc2x.h allterm.h
527 doc2rnh.o: doc2rnh.c ../config.h $(top_srcdir)/src/syscfg.h \
528 $(top_srcdir)/src/stdfn.h doc2x.h $(TERM_H)
529 doc2rtf.o: doc2rtf.c ../config.h $(top_srcdir)/src/syscfg.h \
530 $(top_srcdir)/src/stdfn.h doc2x.h $(TERM_H)
531 doc2tex.o: doc2tex.c ../config.h $(top_srcdir)/src/syscfg.h \
532 $(top_srcdir)/src/stdfn.h doc2x.h allterm.h
533 termdoc.o: termdoc.c ../config.h $(top_srcdir)/src/syscfg.h \
534 $(top_srcdir)/src/stdfn.h doc2x.h
535 xref.o: xref.c ../config.h $(top_srcdir)/src/syscfg.h \
536 $(top_srcdir)/src/stdfn.h doc2x.h xref.h