select.c: Remove Draw() call from SelectConnection
[geda-pcb/leaky.git] / doc / gs / Makefile.inc
blob8817a7ca25305da351370b381e30299b344247f9
1 ## -*- makefile -*-
2 ##
3 ##                            COPYRIGHT
4 ##
5 ##  PCB, interactive printed circuit board design
6 ##  Copyright (C) 2007 DJ Delorie
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.
23 # The makefile including this must set BASE to the base name of the
24 # primary texinfo file.
26 info_TEXINFOS=  ${BASE}.texi
28 # We avoid adding all the dependencies except in maintainer mode.  This is
29 # because the automake team feels that you should not require the user
30 # to have makeinfo and friends installed just to build the package.
31 # This seems reasonable.  Because of that, the documentation must be
32 # built in the source directory so it can be found when creating a distfile
33 # and this means you can't build outside the source tree with a read-only
34 # source.  So, ignore the dependencies unless we're in maintainer mode
35 # but be sure and put the generated files in the distfile via EXTRA_DIST
36 # and dist_pkgdata_DATA.  Also this helps us avoid problem with users
37 # having various out of date versions of the texinfo package installed
38 # which can have all sorts of issues.
41 dist_pkgdata_DATA=      ${html_docs} ${ps_docs} ${pdf_docs} ${pcb_output}
43 html_docs=      ${info_TEXINFOS:.texi=.html}
44 ps_docs=        ${info_TEXINFOS:.texi=.ps}
45 pdf_docs=       ${info_TEXINFOS:.texi=.pdf}
46 dvi_docs=       ${info_TEXINFOS:.texi=.dvi}
48 pcb_files = $(wildcard *.pcb)
49 fp_files  = $(wildcard *.fp)
50 sch_files = $(wildcard *.sch)
51 sym_files = $(wildcard *.sym)
53 gen_base = ${basename ${pcb_files} ${fp_files} ${sch_files} ${sym_files}}
55 png_files = ${addsuffix .png,${gen_base}}
56 png_found = $(filter-out ${png_files},$(wildcard *.png))
58 gen_base2 = ${gen_base} ${basename ${png_found}}
59 eps_files = ${addsuffix .eps,${gen_base2}}
60 pdf_files = ${addsuffix .pdf,${gen_base2}}
62 tab_files = $(wildcard *.tab)
63 tab_texi  = ${tab_files:.tab=.texi}
65 all_texi = $(wildcard *.texi)
66 inc_texi = $(filter-out ${BASE}.texi,$(all_texi))
68 ${BASE}.html : ${png_files}
69 ${BASE}.dvi : ${eps_files} ${pdf_files}
70 ${BASE}.pdf : ${pdf_files}
72 # put the html manual into 1 file instead of multiple files?
73 AM_MAKEINFOHTMLFLAGS=   --css-include=$(srcdir)/${BASE}.css --no-split
75 # use this to avoid having the clean target delete pcb.{dvi,html,pdf,ps}
76 # which unfortunately deletes files which are part of the distfile
77 mostlyclean-aminfo:
78         -rm -rf ${BASE}.aux ${BASE}.cp ${BASE}.cps ${BASE}.fn \
79           ${BASE}.fns ${BASE}.ky ${BASE}.kys ${BASE}.log ${BASE}.pg \
80           ${BASE}.pgs ${BASE}.tmp ${BASE}.toc ${BASE}.tp ${BASE}.tps \
81           ${BASE}.vr ${BASE}.vrs
83 EXTRA_DIST= \
84         ${BASE}.dvi \
85         ${BASE}.css \
86         ${inc_texi} \
87         ${pcb_files} \
88         ${fp_files} \
89         ${sch_files} \
90         ${sym_files} \
91         ${tab_files} \
92         ${tab_texi}
94 CLEANFILES = \
95         ${html_docs} \
96         ${ps_docs} \
97         ${pdf_docs} \
98         ${eps_files} \
99         ${png_files} \
100         ${pdf_files} \
101         ${tab_texi}
103 if GIT_VERSION
104 BUILT_SOURCES=  ${tab_texi} ${pcb_output} ${inline_texi}
105 CLEANFILES+= \
106         refcard.aux refcard.dvi refcard.log refcard.pdf refcard.ps \
107         ${pcb_output} ${tab_texi} ${inline_texi} pcb.dvi pcb.html pcb.pdf pcb.ps
109 else
110 BUILT_SOURCES=
111 endif
113 ASCII2TEXI=     ${AWK} -f $(srcdir)/../ascii2texi.awk ncol=3
115 pcb_output=     \
116         ${pcb_files:.pcb=.eps} \
117         ${pcb_files:.pcb=.pdf} \
118         ${pcb_files:.pcb=.png}
120 SUFFIXES = .dvi .eps .gif .pcb .pdf .png .ps .tab .tex
122 %.png %.eps : %.pcb
123         $(PCB) -x eps --font-path $(top_srcdir)/src --eps-file $*.eps $<
124         $(PERL) $(srcdir)/../eps2png -resolution 100 -output $*.png $*.eps
126 %.png %.eps : %.fp
127         $(PCB) -x eps --font-path $(top_srcdir)/src --eps-file $*.eps $<
128         $(PERL) $(srcdir)/../eps2png -resolution 100 -output $*.png $*.eps
130 %.png %.eps : %.sch
131 if MISSING_GSCHEM
132         @echo "****************************************************"
133         @echo "WARNING:  gschem is missing on your system but"
134         @echo "$@ is out of date and needs to rebuilt."
135         @echo "Changes to $< will be ignored"
136 else
137         $(GSCHEM) -p -o $*.eps -s ./print-eps.scm $<
138         $(PERL) $(srcdir)/../eps2png -resolution 100 -output $*.png $*.eps
139 endif
141 %.png %.eps : %.sym
142 if MISSING_GSCHEM
143         @echo "****************************************************"
144         @echo "WARNING:  gschem is missing on your system but"
145         @echo "$@ is out of date and needs to rebuilt."
146         @echo "Changes to $< will be ignored"
147 else
148         $(GSCHEM) -p -o $*.eps -s $(srcdir)/print-eps.scm $<
149         $(PERL) $(srcdir)/../eps2png -resolution 100 -output $*.png $*.eps
150 endif
152 .eps.pdf :
153 if MISSING_PS2PDF
154         @echo "****************************************************"
155         @echo "WARNING:  ps2pdf is missing on your system but"
156         @echo "$@ is out of date and needs to rebuilt."
157         @echo "Changes to $< will be ignored"
158 else
159         ${PS2PDF} `${AWK} 'BEGIN{s=8}; /BoundingBox/ {printf("-r%d -g%dx%d", s*72, s*$$4, s*$$5);}' $<` $< $@
160 endif
162 .tab.texi:
163         ${ASCII2TEXI} $< > $@
165 .tex.dvi:
166 if MISSING_LATEX
167         @echo "****************************************************"
168         @echo "WARNING:  LaTeX is missing on your system but"
169         @echo "$@ is out of date and needs to rebuilt."
170         @echo "Changes to $< will be ignored"
171 else
172         ${LATEX} $<
173         ${LATEX} $<
174         ${LATEX} $<
175 endif
177 .dvi.ps:
178 if MISSING_DVIPS
179         @echo "****************************************************"
180         @echo "WARNING:  dvips is missing on your system but"
181         @echo "$@ is out of date and needs to rebuilt."
182         @echo "Changes to $< will be ignored"
183 else
184         ${DVIPS} -Ppdf -j0 -D 300 -o $@ $<
185 endif
187 .tex.pdf:
188 if MISSING_PDFLATEX
189         @echo "****************************************************"
190         @echo "WARNING:  pdflatex is missing on your system but"
191         @echo "$@ is out of date and needs to rebuilt."
192         @echo "Changes to $< will be ignored"
193 else
194         ${PDFLATEX} $<
195         ${PDFLATEX} $<
196         ${PDFLATEX} $<
197 endif
199 %.eps : %.png
200         pngtopnm $< | pnmtops -nocenter -equalpixels -noturn -dpi 200 > $@
202 djtest :
203         @echo gen_base = ${gen_base}
204         @echo
205         @echo png_files = ${png_files}
206         @echo
207         @echo png_found = ${png_found}