Added a description of djopt(debumpify) in the user docs.
[geda-pcb/pcjc2.git] / doc / Makefile.am
blob7816c5a02bead61712c29444833cfbcbcec2625d
1 ## -*- makefile -*-
2 ##
3 ##                            COPYRIGHT
4 ##
5 ##  PCB, interactive printed circuit board design
6 ##  Copyright (C) 1994,1995,1996 Thomas Nau
7 ##
8 ##  This program is free software; you can redistribute it and/or modify
9 ##  it under the terms of the GNU General Public License as published by
10 ##  the Free Software Foundation; either version 2 of the License, or
11 ##  (at your option) any later version.
13 ##  This program is distributed in the hope that it will be useful,
14 ##  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 ##  GNU General Public License for more details.
18 ##  You should have received a copy of the GNU General Public License
19 ##  along with this program; if not, write to the Free Software
20 ##  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 ##  Contact addresses for paper mail and Email:
23 ##  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
24 ##  Thomas.Nau@rz.uni-ulm.de
27 ## not until it is fully fixed up in terms of building
28 ##SUBDIRS=      gs
30 info_TEXINFOS=  pcb.texi
32 # We avoid adding all the dependencies when building from a tarball.
33 # This allows end users to use pre-built documentation instead of
34 # requiring recent versions of makeinfo and other tools used only
35 # to build the documentation.  Users who obtain the cutting edge sources
36 # via GIT are considered to be doing "development" and incur a slightly
37 # higher list of required tools.
38 if GIT_OR_CVS_VERSION
39 pcb_TEXINFOS=   ${inline_texi} ${pcb_output} ${tab_texi} ${images_output}
40 else
41 pcb_TEXINFOS=
42 endif
44 dist_html_DATA= ${html_docs} ${pcb_output_inst} ${images_output_inst}
45 dist_pdf_DATA=  ${pdf_docs}
47 dist_man_MANS=  pcb.1
49 html_docs=      ${info_TEXINFOS:.texi=.html}
50 pdf_docs=       ${info_TEXINFOS:.texi=.pdf} refcard.pdf
52 DVIS=
54 # put the html manual into 1 file instead of multiple files?
55 AM_MAKEINFOHTMLFLAGS=   --css-include=$(srcdir)/pcb.css --no-split
57 # use this to avoid having the clean target delete pcb.{dvi,html,pdf,ps}
58 # which unfortunately deletes files which are part of the distfile
59 mostlyclean-aminfo:
60         -rm -rf pcb.aux pcb.cp pcb.cps pcb.fn pcb.fns pcb.ky pcb.kys pcb.log pcb.pg \
61         pcb.pgs pcb.tmp pcb.toc pcb.tp pcb.tps pcb.vr pcb.vrs 
63 EXTRA_DIST= \
64         ascii2texi.awk \
65         eps2png \
66         extract-docs \
67         refcard.tex \
68         pcb.css \
69         ${inline_texi} \
70         ${pcb_files} \
71         ${pcb_output_noinst} \
72         ${tab_files} \
73         ${tab_texi} \
74         ${images}
76 if GIT_OR_CVS_VERSION
77 BUILT_SOURCES=  ${tab_texi} ${pcb_output} ${inline_texi}
78 CLEANFILES= \
79         refcard.aux refcard.log refcard.pdf \
80         ${pcb_output} ${tab_texi} ${inline_texi} pcb.html pcb.pdf \
81         ${images_output}
82 else
83 BUILT_SOURCES=
84 endif
86 inline_texi=    \
87         options.texi \
88         actions.texi \
89         pcbfile.texi
91 ASCII2TEXI=     ${AWK} -f $(srcdir)/ascii2texi.awk ncol=3
93 # Tables
94 tab_files=      \
95         fractional_size.tab \
96         letter_size.tab \
97         metric_size.tab \
98         wire_size.tab
99 tab_texi=       ${tab_files:.tab=.texi}
101 # PCB Drawings
102 pcb_files=      \
103         pad.pcb \
104         puller.pcb \
105         thermal.pcb \
106         gcode.pcb \
107         debumpify.pcb \
108         debumpify.out.pcb
110 pcb_output_noinst=      \
111         ${pcb_files:.pcb=.pdf}
113 pcb_output_inst=        \
114         ${pcb_files:.pcb=.png}
116 pcb_output=     ${pcb_output_inst} ${pcb_output_noinst}
118 # Additional images
119 images= \
120         gcode_control_img.eps \
121         gcode_tool_path.eps \
122         td_ex1.eps \
123         debumpify.eps \
124         debumpify.out.eps
126 images_output_noinst= \
127         ${images:.eps=.pdf}
129 images_output_inst= \
130         ${images:.eps=.png}
132 images_output= ${images_output_noinst} ${images_output_inst}
134 ${inline_texi} : extracted-docs
136 # no need to build these when building via a tarball.  They're not used then
137 # anyway.
138 .PHONY : extracted-docs
139 extracted-docs :
140 if GIT_OR_CVS_VERSION
141         ${PERL} $(srcdir)/extract-docs $(srcdir)
142 else
143         @echo "Skipping documentation extraction since you are not building from GIT sources"
144 endif
146 SUFFIXES = .eps .pcb .pdf .png .tab .tex
148 .pcb.eps :
149         ${PCB} -x eps --only-visible --font-path $(top_srcdir)/src --eps-file $@ $<
151 .pcb.png :
152         ${PCB} -x png --only-visible --font-path $(top_srcdir)/src --outfile $@ $<
154 .eps.pdf :
155 if MISSING_PS2PDF
156         @echo "****************************************************"
157         @echo "WARNING:  ps2pdf is missing on your system but"
158         @echo "$@ is out of date and needs to rebuilt."
159         @echo "Changes to $< will be ignored"
160 else
161         ${PS2PDF} `${AWK} 'BEGIN{s=8}; /BoundingBox/ {printf("-r%d -g%dx%d", s*72, s*$$4, s*$$5);}' $<` $< $@
162 endif
164 .tab.texi:
165         ${ASCII2TEXI} $< > $@
167 .tex.pdf:
168 if MISSING_PDFLATEX
169         @echo "****************************************************"
170         @echo "WARNING:  pdflatex is missing on your system but"
171         @echo "$@ is out of date and needs to rebuilt."
172         @echo "Changes to $< will be ignored"
173 else
174         ${PDFLATEX} $<
175         ${PDFLATEX} $<
176         ${PDFLATEX} $<
177 endif
179 .eps.png:
180         ${PERL} $(srcdir)/eps2png --png $< > $@