1 | ## Process this file with automake to produce Makefile.in |
---|
2 | |
---|
3 | # We aim to be GNU compliant, but some required files are generated |
---|
4 | AUTOMAKE_OPTIONS = 1.5 foreign |
---|
5 | |
---|
6 | # These files are installed automatically in --gnu mode |
---|
7 | GNU_FILES = INSTALL NEWS README COPYING AUTHORS ChangeLog |
---|
8 | |
---|
9 | EXTRA_DIST = $(GNU_FILES) TODO OLDNEWS\ |
---|
10 | desc.txt desc-aven.txt survex.spec\ |
---|
11 | desc-svxedit.txt alien.pl\ |
---|
12 | buildmacosx.sh vim/syntax/survex.vim vim/ftdetect/survex.vim |
---|
13 | |
---|
14 | SUBDIRS = . lib src doc tests debian |
---|
15 | |
---|
16 | # seem to need this for "make distclean" to recurse?!? |
---|
17 | DIST_SUBDIRS = $(SUBDIRS) |
---|
18 | |
---|
19 | extra_bin = lib/*.msg\ |
---|
20 | lib/default.bit lib/bold.bit |
---|
21 | extra_txt = lib/*.svx lib/print.ini |
---|
22 | extra_files = $(extra_bin) $(extra_txt) |
---|
23 | |
---|
24 | # FIXME: need to keep in step with src/Makefile.am |
---|
25 | base_progs = cad3d cavern diffpos extend sorterr 3dtopos\ |
---|
26 | printdm printps printpcl printhpgl |
---|
27 | |
---|
28 | AUTHORS: doc/AUTHORS.htm |
---|
29 | w3m -dump doc/AUTHORS.htm > AUTHORS |
---|
30 | |
---|
31 | HACKING: doc/HACKING.htm |
---|
32 | w3m -dump doc/HACKING.htm > HACKING |
---|
33 | |
---|
34 | TODO: doc/TODO.htm |
---|
35 | w3m -dump doc/TODO.htm > TODO |
---|
36 | |
---|
37 | debian : dist |
---|
38 | : # overkill maybe - we could probably just use this tree |
---|
39 | : # but then the .deb-s go in the parent directory, plus we get |
---|
40 | : # lintian moaning about the directory name not having the |
---|
41 | : # version number |
---|
42 | -rm -rf deb |
---|
43 | mkdir deb |
---|
44 | cd deb && tar zxvf ../${PACKAGE}-${VERSION}.tar.gz |
---|
45 | : # -us and -uc mean don't sign packages |
---|
46 | cd deb/${PACKAGE}-${VERSION} && debuild -us -uc |
---|
47 | mv deb/*.deb deb/*.dsc deb/*.changes deb/*.gz . |
---|
48 | rm -rf deb |
---|
49 | |
---|
50 | dostxt : |
---|
51 | $(RM) -rf dostxt_tmp |
---|
52 | mkdir dostxt_tmp |
---|
53 | for a in @EXTRA_TEXT@ ; do ln -s ../$$a dostxt_tmp/$$a.txt ; done |
---|
54 | : # rename to 8.3 |
---|
55 | mv dostxt_tmp/ChangeLog.txt dostxt_tmp/Changes.txt |
---|
56 | |
---|
57 | djgpp : all djgpp_zip |
---|
58 | |
---|
59 | djgpp_zip_name = survex-dos-@VERSION@.zip |
---|
60 | djgpp_exe_name = survex-dos-@VERSION@.exe |
---|
61 | |
---|
62 | djgpp_exe : djgpp_zip |
---|
63 | $(RM) $(djgpp_exe_name)~ |
---|
64 | cat dos_extras/unzipsfx.exe $(djgpp_zip_name) > $(djgpp_exe_name)~ |
---|
65 | zip -A $(djgpp_exe_name)~ |
---|
66 | mv $(djgpp_exe_name)~ $(djgpp_exe_name) |
---|
67 | |
---|
68 | djgpp_zip : dostxt |
---|
69 | test -d djgpp_exes || mkdir djgpp_exes |
---|
70 | for a in $(base_progs) caverot ; do cp src/$$a.exe djgpp_exes ; done |
---|
71 | $(RM) $(djgpp_zip_name) |
---|
72 | zip -9 -j $(djgpp_zip_name) djgpp_exes/*.exe $(extra_bin)\ |
---|
73 | djgpp_extras/cwsdpmi.exe djgpp_extras/emu387.dxe |
---|
74 | ln -s ../INSTALL.DOS dostxt_tmp/INSTALL.txt |
---|
75 | ln -s ../README dostxt_tmp/README.txt |
---|
76 | ln -s ../src/svxedit dostxt_tmp/svxedit.tcl |
---|
77 | : # -l means convert LF to CR+LF |
---|
78 | : # FIXME: really include dostxt too on DOS? |
---|
79 | zip -9 -j -l $(djgpp_zip_name) dostxt_tmp/*.txt dostxt_tmp/svxedit.tcl\ |
---|
80 | $(extra_txt) |
---|
81 | cd doc;zip -9 -l ../$(djgpp_zip_name) manual/*.htm @HTMLFILES@ |
---|
82 | cd doc;zip -9 ../$(djgpp_zip_name) manual/*.png |
---|
83 | $(RM) -rf dostxt_tmp |
---|
84 | |
---|
85 | mingw : all mingw_iss |
---|
86 | |
---|
87 | mingw_iss : survex.iss |
---|
88 | $(RM) -rf iss_tmp |
---|
89 | mkdir iss_tmp |
---|
90 | cp src/svxedit iss_tmp/svxedit.tcl |
---|
91 | cp $(extra_txt) survex.iss iss_tmp |
---|
92 | : # so the installer can display the license |
---|
93 | cp COPYING iss_tmp/COPYING.txt |
---|
94 | cd doc;cp @HTMLFILES@ ../iss_tmp |
---|
95 | : # convert LF to CR+LF |
---|
96 | perl -p -i -e 's/\n/\r\n/' iss_tmp/* |
---|
97 | for f in $(base_progs) aven printwin editwrap ; do cp src/$$f.exe iss_tmp ; done |
---|
98 | cp lib/icons/*.ico lib/icons/*.png iss_tmp |
---|
99 | : # don't ship pngs for which we ship the ico version |
---|
100 | for a in iss_tmp/*.ico ; do rm `echo $$a|sed 's/\.ico/.png/'` ; done |
---|
101 | : # but we do want aven.png for the About dialog |
---|
102 | cp lib/icons/aven.png iss_tmp |
---|
103 | : # not needed if we build wx without threads: gzip -dc /usr/share/doc/mingw32-runtime/mingwm10.dll.gz > iss_tmp/mingwm10.dll |
---|
104 | mkdir iss_tmp/manual |
---|
105 | cp doc/manual/*.htm iss_tmp/manual |
---|
106 | : # convert LF to CR+LF |
---|
107 | perl -p -i -e 's/\n/\r\n/' iss_tmp/manual/* |
---|
108 | cp doc/manual/*.png iss_tmp/manual |
---|
109 | cp $(extra_bin) iss_tmp |
---|
110 | for f in /usr/share/locale/*/LC_MESSAGES/wxstd.mo ; do \ |
---|
111 | a=`echo "$$f"|sed 's!^/usr/share/locale/\([^/]*\).*!\1!'`; \ |
---|
112 | mkdir iss_tmp/$$a;\ |
---|
113 | cp "$$f" iss_tmp/$$a;\ |
---|
114 | echo 'Source: "'"$$a"'\wxstd.mo"; DestDir: "{app}\'"$$a"'"' >> iss_tmp/i18nfiles.iss;\ |
---|
115 | done |
---|
116 | cp lib/*.isl iss_tmp |
---|
117 | : # Also need to reduce colour depth it appears: |
---|
118 | : # src/png2bmp lib/icons/aven_about.png iss_tmp/logo.bmp |
---|
119 | DISPLAY= wine "c:/Program Files/Inno Setup 5/ISCC.exe" iss_tmp/survex.iss |
---|
120 | mv iss_tmp/Output/*.exe . |
---|
121 | $(RM) -rf iss_tmp |
---|
122 | |
---|
123 | bc_zip_name = survex-dos286-@VERSION@.zip |
---|
124 | bc_exe_name = survex-dos286-@VERSION@.exe |
---|
125 | |
---|
126 | borlandc_exe : borlandc_zip |
---|
127 | $(RM) $(bc_exe_name)~ |
---|
128 | cat dos_extras/unzipsfx.exe $(bc_zip_name) > $(bc_exe_name)~ |
---|
129 | zip -A $(bc_exe_name)~ |
---|
130 | mv $(bc_exe_name)~ $(bc_exe_name) |
---|
131 | |
---|
132 | borlandc_zip : dostxt |
---|
133 | $(RM) $(bc_zip_name) |
---|
134 | zip -9 -j $(bc_zip_name) bc_exes/*.exe $(extra_bin) bc_extras/*.bgi |
---|
135 | ln -s ../INSTALL.DOS dostxt_tmp/INSTALL.txt |
---|
136 | ln -s ../README dostxt_tmp/README.txt |
---|
137 | : # -l means convert LF to CR+LF |
---|
138 | : # FIXME: really include dostxt too on DOS? |
---|
139 | zip -9 -j -l $(bc_zip_name) dostxt_tmp/*.txt $(extra_txt) |
---|
140 | cd doc;zip -9 -l ../$(bc_zip_name) manual/*.htm @HTMLFILES@ |
---|
141 | cd doc;zip -9 ../$(bc_zip_name) manual/*.png |
---|
142 | $(RM) -rf dostxt_tmp |
---|
143 | |
---|
144 | riscos_zip_name = survex-riscos-@VERSION@.zip |
---|
145 | |
---|
146 | riscos_zip : |
---|
147 | $(RM) $(riscos_zip_name) |
---|
148 | : # needs a zip with Darren Salt's patches, which'll hopefully be merged |
---|
149 | : # into the mainstream distribution in future |
---|
150 | $(RM) -rf riscos_tmp |
---|
151 | mkdir riscos_tmp |
---|
152 | ln -s ../README.ros riscos_tmp/\!ReadMe,fff |
---|
153 | : # "cp -r riscos_extras riscos_tmp" but avoid CVS directories |
---|
154 | cd riscos_extras; tar --exclude CVS -cf - . | (cd ../riscos_tmp ; tar xf -) |
---|
155 | cp -r riscos_extras/\!* riscos_tmp |
---|
156 | for f in $(base_progs) caverot ; do\ |
---|
157 | ln -s ../../riscos_exes/$$f riscos_tmp/\!Cavern/$$f,ff8 ; done |
---|
158 | for f in @EXTRA_TEXT@ ; do\ |
---|
159 | b=`echo "$$f" | sed 's!.*/!!'` ;\ |
---|
160 | type=fff ;\ |
---|
161 | case "$$f" in\ |
---|
162 | *.bit) type=ffd ;;\ |
---|
163 | *.msg) type=ffd ;;\ |
---|
164 | esac ;\ |
---|
165 | ln -s ../$$f riscos_tmp/$$b,$$type ; done |
---|
166 | for f in $(extra_files) ; do\ |
---|
167 | b=`echo "$$f" | sed 's!.*/!!'` ;\ |
---|
168 | type=fff ;\ |
---|
169 | case "$$f" in\ |
---|
170 | *.bit) type=ffd ;;\ |
---|
171 | *.msg) type=ffd ;;\ |
---|
172 | esac ;\ |
---|
173 | ln -s ../../$$f riscos_tmp/\!Cavern/$$b,$$type ; done |
---|
174 | cd doc && for f in @HTMLFILES@ ; do\ |
---|
175 | ln -s ../doc/$$f ../riscos_tmp/$$f,faf ; done |
---|
176 | mkdir riscos_tmp/manual |
---|
177 | cd doc && for f in manual/*.htm ; do\ |
---|
178 | ln -s ../../doc/$$f ../riscos_tmp/$$f,faf ; done |
---|
179 | cd doc && for f in manual/*.png ; do\ |
---|
180 | ln -s ../../doc/$$f ../riscos_tmp/$$f,b60 ; done |
---|
181 | : # -R doesn't seem to work here, so just glob it all in |
---|
182 | cd riscos_tmp && ../zip-magic -N ../$(riscos_zip_name) * */* */*/* |
---|
183 | $(RM) -rf riscos_tmp |
---|
184 | |
---|
185 | # source code for transfer to the RISC OS/DOS machines for compilation |
---|
186 | alien_src_zip_name = src$(shell echo "@VERSION@"|sed 's/\./_/g').zip |
---|
187 | |
---|
188 | alien_src_zip : |
---|
189 | $(RM) $(alien_src_zip_name) |
---|
190 | $(RM) -rf alien_tmp |
---|
191 | mkdir alien_tmp |
---|
192 | mkdir alien_tmp/c |
---|
193 | mkdir alien_tmp/h |
---|
194 | mkdir alien_tmp/s |
---|
195 | mkdir alien_tmp/o |
---|
196 | mkdir alien_tmp/stdh |
---|
197 | perl alien.pl src/*.c src/*.h > alien_tmp/\!ObeyMe,feb |
---|
198 | echo 'RMEnsure DDEUtils 0 System:modules.ddeutils' > alien_tmp/\!MakeMe,feb |
---|
199 | echo 'Dir <Obey$$Dir>' >> alien_tmp/\!MakeMe,feb |
---|
200 | echo amu >> alien_tmp/\!MakeMe,feb |
---|
201 | echo Back >> alien_tmp/\!MakeMe,feb |
---|
202 | ln -s ../src/riscos/stdh/[a-z]* alien_tmp |
---|
203 | ln -s ../src/borlandc/makefile alien_tmp/makefile.mak |
---|
204 | ln -s ../src/borlandc/make.bat alien_tmp |
---|
205 | ln -s ../../src/riscos/config.h alien_tmp/h/config |
---|
206 | ln -s ../../src/riscos/armrot.s alien_tmp/s/armrot |
---|
207 | ln -s ../../src/riscos/stdh/regnames alien_tmp/stdh |
---|
208 | ln -s ../../src/riscos/stdh/swinames alien_tmp/stdh |
---|
209 | ./zip-magic -N -j $(alien_src_zip_name) alien_tmp src/*.c src/*.h\ |
---|
210 | src/riscos/makefile src/borlandc/config.h |
---|
211 | cd alien_tmp && ../zip-magic -N -r ../$(alien_src_zip_name) * |
---|
212 | $(RM) -rf alien_tmp |
---|
213 | |
---|
214 | dos_doc_zip_name = svxdoc-doswin-@VERSION@.zip |
---|
215 | dos_doc_exe_name = svxdoc-doswin-@VERSION@.exe |
---|
216 | |
---|
217 | dos_doc_exe : dos_doc_zip |
---|
218 | $(RM) $(dos_doc_exe_name)~ |
---|
219 | cat dos_extras/unzipsfx.exe $(dos_doc_zip_name) > $(dos_doc_exe_name)~ |
---|
220 | zip -A $(dos_doc_exe_name)~ |
---|
221 | mv $(dos_doc_exe_name)~ $(dos_doc_exe_name) |
---|
222 | |
---|
223 | dos_doc_zip : |
---|
224 | $(RM) $(dos_doc_zip_name) |
---|
225 | : # -l means convert LF to CR+LF |
---|
226 | cd doc && zip -9 -l ../$(dos_doc_zip_name) @DOCS_OTHER@ |
---|
227 | |
---|
228 | riscos_doc_zip_name = svxdoc-riscos-@VERSION@.zip |
---|
229 | |
---|
230 | riscos_doc_zip : |
---|
231 | $(RM) $(riscos_doc_zip_name) |
---|
232 | $(RM) -rf riscos_doc_tmp |
---|
233 | mkdir riscos_doc_tmp |
---|
234 | cd doc && for f in @DOCS_OTHER@ ; do\ |
---|
235 | if test -d $$f ; then\ |
---|
236 | mkdir ../riscos_doc_tmp/$$f ;\ |
---|
237 | else\ |
---|
238 | case "$$f" in\ |
---|
239 | */*.htm|*/*.html) ln -s ../../doc/$$f ../riscos_doc_tmp/$$f,faf ;;\ |
---|
240 | *.htm|*.html) ln -s ../doc/$$f ../riscos_doc_tmp/$$f,faf ;;\ |
---|
241 | *.txt) ln -s ../doc/$$f ../riscos_doc_tmp/$$f,fff ;;\ |
---|
242 | *.rtf) ln -s ../doc/$$f ../riscos_doc_tmp/$$f,c32 ;;\ |
---|
243 | *.ps) ln -s ../doc/$$f ../riscos_doc_tmp/$$f,ff5 ;;\ |
---|
244 | *) ln -s ../doc/$$f ../riscos_doc_tmp/$$f,ffd ;;\ |
---|
245 | esac;\ |
---|
246 | fi;\ |
---|
247 | done |
---|
248 | cd riscos_doc_tmp && ../zip-magic -N -r ../$(riscos_doc_zip_name) * |
---|
249 | $(RM) -rf riscos_doc_tmp |
---|