action.c: new UpdatePackage(Selected|All)
[geda-pcb/whiteaudio.git] / doc / Makefile.am
blobcf366277972afd67ad4d57bb08dd4d22f156a02c
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
108 pcb_output_noinst=      \
109         ${pcb_files:.pcb=.pdf}
111 pcb_output_inst=        \
112         ${pcb_files:.pcb=.png}
114 pcb_output=     ${pcb_output_inst} ${pcb_output_noinst}
116 # Additional images
117 images= \
118         gcode_control_img.eps \
119         gcode_tool_path.eps
121 images_output_noinst= \
122         ${images:.eps=.pdf}
124 images_output_inst= \
125         ${images:.eps=.png}
127 images_output= ${images_output_noinst} ${images_output_inst}
129 ${inline_texi} : extracted-docs
131 # no need to build these when building via a tarball.  They're not used then
132 # anyway.
133 .PHONY : extracted-docs
134 extracted-docs :
135 if GIT_OR_CVS_VERSION
136         ${PERL} $(srcdir)/extract-docs $(srcdir)
137 else
138         @echo "Skipping documentation extraction since you are not building from GIT sources"
139 endif
141 SUFFIXES = .eps .pcb .pdf .png .tab .tex
143 .pcb.eps :
144         ${PCB} -x eps --only-visible --font-path $(top_srcdir)/src --eps-file $@ $<
146 .pcb.png :
147         ${PCB} -x png --only-visible --font-path $(top_srcdir)/src --outfile $@ $<
149 .eps.pdf :
150 if MISSING_PS2PDF
151         @echo "****************************************************"
152         @echo "WARNING:  ps2pdf is missing on your system but"
153         @echo "$@ is out of date and needs to rebuilt."
154         @echo "Changes to $< will be ignored"
155 else
156         ${PS2PDF} `${AWK} 'BEGIN{s=8}; /BoundingBox/ {printf("-r%d -g%dx%d", s*72, s*$$4, s*$$5);}' $<` $< $@
157 endif
159 .tab.texi:
160         ${ASCII2TEXI} $< > $@
162 .tex.pdf:
163 if MISSING_PDFLATEX
164         @echo "****************************************************"
165         @echo "WARNING:  pdflatex is missing on your system but"
166         @echo "$@ is out of date and needs to rebuilt."
167         @echo "Changes to $< will be ignored"
168 else
169         ${PDFLATEX} $<
170         ${PDFLATEX} $<
171         ${PDFLATEX} $<
172 endif
174 .eps.png:
175         ${PERL} $(srcdir)/eps2png --png $< > $@