hid/gtk: Call ghid_fill_pcb_polygon via (HID_DRAW *)->fill_pcb_polygon()
[geda-pcb/pcjc2.git] / doc / gs / Makefile.inc
blob96e42bd510424c7b03c49de7d6b856085f2e18fe
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} ${pdf_docs} ${pcb_output}
43 html_docs=      ${info_TEXINFOS:.texi=.html}
44 pdf_docs=       ${info_TEXINFOS:.texi=.pdf}
45 dvi_docs=       ${info_TEXINFOS:.texi=.dvi}
47 pcb_files = $(wildcard *.pcb)
48 fp_files  = $(wildcard *.fp)
49 sch_files = $(wildcard *.sch)
50 sym_files = $(wildcard *.sym)
52 gen_base = ${basename ${pcb_files} ${fp_files} ${sch_files} ${sym_files}}
54 png_files = ${addsuffix .png,${gen_base}}
55 png_found = $(filter-out ${png_files},$(wildcard *.png))
57 gen_base2 = ${gen_base} ${basename ${png_found}}
58 eps_files = ${addsuffix .eps,${gen_base2}}
59 pdf_files = ${addsuffix .pdf,${gen_base2}}
61 tab_files = $(wildcard *.tab)
62 tab_texi  = ${tab_files:.tab=.texi}
64 all_texi = $(wildcard *.texi)
65 inc_texi = $(filter-out ${BASE}.texi,$(all_texi))
67 ${BASE}.html : ${png_files}
68 ${BASE}.dvi : ${eps_files} ${pdf_files}
69 ${BASE}.pdf : ${pdf_files}
71 # put the html manual into 1 file instead of multiple files?
72 AM_MAKEINFOHTMLFLAGS=   --css-include=$(srcdir)/${BASE}.css --no-split
74 # use this to avoid having the clean target delete pcb.{dvi,html,pdf,ps}
75 # which unfortunately deletes files which are part of the distfile
76 mostlyclean-aminfo:
77         -rm -rf ${BASE}.aux ${BASE}.cp ${BASE}.cps ${BASE}.fn \
78           ${BASE}.fns ${BASE}.ky ${BASE}.kys ${BASE}.log ${BASE}.pg \
79           ${BASE}.pgs ${BASE}.tmp ${BASE}.toc ${BASE}.tp ${BASE}.tps \
80           ${BASE}.vr ${BASE}.vrs
82 EXTRA_DIST= \
83         ${BASE}.dvi \
84         ${BASE}.css \
85         ${inc_texi} \
86         ${pcb_files} \
87         ${fp_files} \
88         ${sch_files} \
89         ${sym_files} \
90         ${tab_files} \
91         ${tab_texi}
93 CLEANFILES = \
94         ${html_docs} \
95         ${pdf_docs} \
96         ${eps_files} \
97         ${png_files} \
98         ${pdf_files} \
99         ${tab_texi}
101 if GIT_VERSION
102 BUILT_SOURCES=  ${tab_texi} ${pcb_output} ${inline_texi}
103 CLEANFILES+= \
104         refcard.aux refcard.dvi refcard.log refcard.pdf \
105         ${pcb_output} ${tab_texi} ${inline_texi} pcb.dvi pcb.html pcb.pdf
107 else
108 BUILT_SOURCES=
109 endif
111 ASCII2TEXI=     ${AWK} -f $(srcdir)/../ascii2texi.awk ncol=3
113 pcb_output=     \
114         ${pcb_files:.pcb=.eps} \
115         ${pcb_files:.pcb=.pdf} \
116         ${pcb_files:.pcb=.png}
118 SUFFIXES = .dvi .eps .pcb .pdf .png .tab .tex
120 %.png %.eps : %.pcb
121         $(PCB) -x eps --font-path $(top_srcdir)/src --eps-file $*.eps $<
122         $(PERL) $(srcdir)/../eps2png -resolution 100 -output $*.png $*.eps
124 %.png %.eps : %.fp
125         $(PCB) -x eps --font-path $(top_srcdir)/src --eps-file $*.eps $<
126         $(PERL) $(srcdir)/../eps2png -resolution 100 -output $*.png $*.eps
128 %.png %.eps : %.sch
129 if MISSING_GSCHEM
130         @echo "****************************************************"
131         @echo "WARNING:  gschem is missing on your system but"
132         @echo "$@ is out of date and needs to rebuilt."
133         @echo "Changes to $< will be ignored"
134 else
135         $(GSCHEM) -p -o $*.eps -s ./print-eps.scm $<
136         $(PERL) $(srcdir)/../eps2png -resolution 100 -output $*.png $*.eps
137 endif
139 %.png %.eps : %.sym
140 if MISSING_GSCHEM
141         @echo "****************************************************"
142         @echo "WARNING:  gschem is missing on your system but"
143         @echo "$@ is out of date and needs to rebuilt."
144         @echo "Changes to $< will be ignored"
145 else
146         $(GSCHEM) -p -o $*.eps -s $(srcdir)/print-eps.scm $<
147         $(PERL) $(srcdir)/../eps2png -resolution 100 -output $*.png $*.eps
148 endif
150 .eps.pdf :
151 if MISSING_PS2PDF
152         @echo "****************************************************"
153         @echo "WARNING:  ps2pdf is missing on your system but"
154         @echo "$@ is out of date and needs to rebuilt."
155         @echo "Changes to $< will be ignored"
156 else
157         ${PS2PDF} `${AWK} 'BEGIN{s=8}; /BoundingBox/ {printf("-r%d -g%dx%d", s*72, s*$$4, s*$$5);}' $<` $< $@
158 endif
160 .tab.texi:
161         ${ASCII2TEXI} $< > $@
163 .tex.pdf:
164 if MISSING_PDFLATEX
165         @echo "****************************************************"
166         @echo "WARNING:  pdflatex is missing on your system but"
167         @echo "$@ is out of date and needs to rebuilt."
168         @echo "Changes to $< will be ignored"
169 else
170         ${PDFLATEX} $<
171         ${PDFLATEX} $<
172         ${PDFLATEX} $<
173 endif
175 %.eps : %.png
176         pngtopnm $< | pnmtops -nocenter -equalpixels -noturn -dpi 200 > $@
178 djtest :
179         @echo gen_base = ${gen_base}
180         @echo
181         @echo png_files = ${png_files}
182         @echo
183         @echo png_found = ${png_found}