[425d063] | 1 | ## Process this file with automake to produce Makefile.in |
---|
| 2 | |
---|
[6c7fbd5] | 3 | # We aim to be GNU compliant, but some required files are generated |
---|
[87681b8] | 4 | AUTOMAKE_OPTIONS = 1.5 foreign |
---|
[6c7fbd5] | 5 | |
---|
| 6 | # These files are installed automatically in --gnu mode |
---|
| 7 | GNU_FILES = INSTALL NEWS README COPYING AUTHORS ChangeLog |
---|
| 8 | |
---|
[b8bf5bc] | 9 | EXTRA_DIST = $(GNU_FILES) TODO OLDNEWS\ |
---|
| 10 | desc.txt desc-aven.txt survex.spec\ |
---|
[b7bd145] | 11 | desc-svxedit.txt alien.pl\ |
---|
[53e9dd0] | 12 | buildmacosx.sh vim/syntax/survex.vim vim/ftdetect/survex.vim |
---|
[647407d] | 13 | |
---|
[f6a3719] | 14 | SUBDIRS = . lib src doc tests debian |
---|
[425d063] | 15 | |
---|
[d1621779] | 16 | # seem to need this for "make distclean" to recurse?!? |
---|
| 17 | DIST_SUBDIRS = $(SUBDIRS) |
---|
| 18 | |
---|
[168df28] | 19 | extra_bin = lib/*.msg\ |
---|
| 20 | lib/default.bit lib/bold.bit |
---|
[2eaaa3d] | 21 | extra_txt = lib/*.svx lib/print.ini |
---|
| 22 | extra_files = $(extra_bin) $(extra_txt) |
---|
[425d063] | 23 | |
---|
[1f22d4a] | 24 | # FIXME: need to keep in step with src/Makefile.am |
---|
[168df28] | 25 | base_progs = cad3d cavern diffpos extend sorterr 3dtopos\ |
---|
| 26 | printdm printps printpcl printhpgl |
---|
[2eaaa3d] | 27 | |
---|
[1c969fc] | 28 | AUTHORS: doc/AUTHORS.htm |
---|
| 29 | w3m -dump doc/AUTHORS.htm > AUTHORS |
---|
[6c7fbd5] | 30 | |
---|
[79b37a4c] | 31 | HACKING: doc/HACKING.htm |
---|
| 32 | w3m -dump doc/HACKING.htm > HACKING |
---|
| 33 | |
---|
[1c969fc] | 34 | TODO: doc/TODO.htm |
---|
| 35 | w3m -dump doc/TODO.htm > TODO |
---|
[6c7fbd5] | 36 | |
---|
[f6a3719] | 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 |
---|
[87681b8] | 45 | : # -us and -uc mean don't sign packages |
---|
[65d4e46] | 46 | cd deb/${PACKAGE}-${VERSION} && debuild -us -uc |
---|
[404e6f62] | 47 | mv deb/*.deb deb/*.dsc deb/*.changes deb/*.gz . |
---|
[24d8c39] | 48 | rm -rf deb |
---|
[749fd1e] | 49 | |
---|
[2eaaa3d] | 50 | dostxt : |
---|
[f9daedc] | 51 | $(RM) -rf dostxt_tmp |
---|
[2eaaa3d] | 52 | mkdir dostxt_tmp |
---|
[5636835] | 53 | for a in @EXTRA_TEXT@ ; do ln -s ../$$a dostxt_tmp/$$a.txt ; done |
---|
[87681b8] | 54 | : # rename to 8.3 |
---|
[2eaaa3d] | 55 | mv dostxt_tmp/ChangeLog.txt dostxt_tmp/Changes.txt |
---|
| 56 | |
---|
| 57 | djgpp : all djgpp_zip |
---|
| 58 | |
---|
[242f7439] | 59 | djgpp_zip_name = survex-dos-@VERSION@.zip |
---|
[15d03ab] | 60 | djgpp_exe_name = survex-dos-@VERSION@.exe |
---|
[e68fccf] | 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 | |
---|
[2eaaa3d] | 68 | djgpp_zip : dostxt |
---|
[f969e06] | 69 | test -d djgpp_exes || mkdir djgpp_exes |
---|
[2eaaa3d] | 70 | for a in $(base_progs) caverot ; do cp src/$$a.exe djgpp_exes ; done |
---|
[242f7439] | 71 | $(RM) $(djgpp_zip_name) |
---|
[8840529] | 72 | zip -9 -j $(djgpp_zip_name) djgpp_exes/*.exe $(extra_bin)\ |
---|
[2eaaa3d] | 73 | djgpp_extras/cwsdpmi.exe djgpp_extras/emu387.dxe |
---|
[58263c7] | 74 | ln -s ../INSTALL.DOS dostxt_tmp/INSTALL.txt |
---|
| 75 | ln -s ../README dostxt_tmp/README.txt |
---|
[750a2dd] | 76 | ln -s ../src/svxedit dostxt_tmp/svxedit.tcl |
---|
[87681b8] | 77 | : # -l means convert LF to CR+LF |
---|
[de934bd4] | 78 | : # FIXME: really include dostxt too on DOS? |
---|
[de389c9] | 79 | zip -9 -j -l $(djgpp_zip_name) dostxt_tmp/*.txt dostxt_tmp/svxedit.tcl\ |
---|
| 80 | $(extra_txt) |
---|
[8840529] | 81 | cd doc;zip -9 -l ../$(djgpp_zip_name) manual/*.htm @HTMLFILES@ |
---|
| 82 | cd doc;zip -9 ../$(djgpp_zip_name) manual/*.png |
---|
[2eaaa3d] | 83 | $(RM) -rf dostxt_tmp |
---|
| 84 | |
---|
[3f32910] | 85 | mingw : all mingw_iss |
---|
[425d063] | 86 | |
---|
[6dc55cf] | 87 | mingw_iss : survex.iss |
---|
[faa8fc9] | 88 | $(RM) -rf iss_tmp |
---|
[1d43ee5] | 89 | mkdir iss_tmp |
---|
[750a2dd] | 90 | cp src/svxedit iss_tmp/svxedit.tcl |
---|
[de934bd4] | 91 | cp $(extra_txt) survex.iss iss_tmp |
---|
[de389c9] | 92 | : # so the installer can display the license |
---|
[de934bd4] | 93 | cp COPYING iss_tmp/COPYING.txt |
---|
[5636835] | 94 | cd doc;cp @HTMLFILES@ ../iss_tmp |
---|
[87681b8] | 95 | : # convert LF to CR+LF |
---|
[b71c279] | 96 | perl -p -i -e 's/\n/\r\n/' iss_tmp/* |
---|
[faa8fc9] | 97 | for f in $(base_progs) aven printwin editwrap ; do cp src/$$f.exe iss_tmp ; done |
---|
[a243fc5] | 98 | cp lib/icons/*.ico lib/icons/*.png iss_tmp |
---|
| 99 | : # don't ship pngs for which we ship the ico version |
---|
[41d3795] | 100 | for a in iss_tmp/*.ico ; do rm `echo $$a|sed 's/\.ico/.png/'` ; done |
---|
[168df28] | 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 |
---|
[d56306f] | 104 | mkdir iss_tmp/manual |
---|
| 105 | cp doc/manual/*.htm iss_tmp/manual |
---|
[87681b8] | 106 | : # convert LF to CR+LF |
---|
[d56306f] | 107 | perl -p -i -e 's/\n/\r\n/' iss_tmp/manual/* |
---|
[bb3a530] | 108 | cp doc/manual/*.png iss_tmp/manual |
---|
[faa8fc9] | 109 | cp $(extra_bin) iss_tmp |
---|
[4f3c188] | 110 | for f in /usr/share/locale/*/LC_MESSAGES/wxstd.mo ; do \ |
---|
| 111 | a=`echo "$$f"|sed 's!^/usr/share/locale/\([^/]*\).*!\1!'`; \ |
---|
[d80db60] | 112 | mkdir iss_tmp/$$a;\ |
---|
[4f3c188] | 113 | cp "$$f" iss_tmp/$$a;\ |
---|
[9faed96] | 114 | echo 'Source: "'"$$a"'\wxstd.mo"; DestDir: "{app}\'"$$a"'"' >> iss_tmp/i18nfiles.iss;\ |
---|
[d80db60] | 115 | done |
---|
[9faed96] | 116 | cp lib/*.isl iss_tmp |
---|
[6dc55cf] | 117 | : # Also need to reduce colour depth it appears: |
---|
| 118 | : # src/png2bmp lib/icons/aven_about.png iss_tmp/logo.bmp |
---|
[9faed96] | 119 | DISPLAY= wine "c:/Program Files/Inno Setup 5/ISCC.exe" iss_tmp/survex.iss |
---|
[1d43ee5] | 120 | mv iss_tmp/Output/*.exe . |
---|
[faa8fc9] | 121 | $(RM) -rf iss_tmp |
---|
[1d43ee5] | 122 | |
---|
[242f7439] | 123 | bc_zip_name = survex-dos286-@VERSION@.zip |
---|
[e68fccf] | 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) |
---|
[242f7439] | 131 | |
---|
[2eaaa3d] | 132 | borlandc_zip : dostxt |
---|
[242f7439] | 133 | $(RM) $(bc_zip_name) |
---|
[8840529] | 134 | zip -9 -j $(bc_zip_name) bc_exes/*.exe $(extra_bin) bc_extras/*.bgi |
---|
[58263c7] | 135 | ln -s ../INSTALL.DOS dostxt_tmp/INSTALL.txt |
---|
| 136 | ln -s ../README dostxt_tmp/README.txt |
---|
[87681b8] | 137 | : # -l means convert LF to CR+LF |
---|
[de934bd4] | 138 | : # FIXME: really include dostxt too on DOS? |
---|
[8840529] | 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 |
---|
[2eaaa3d] | 142 | $(RM) -rf dostxt_tmp |
---|
[425d063] | 143 | |
---|
[d4d7e27] | 144 | riscos_zip_name = survex-riscos-@VERSION@.zip |
---|
[242f7439] | 145 | |
---|
[425d063] | 146 | riscos_zip : |
---|
[242f7439] | 147 | $(RM) $(riscos_zip_name) |
---|
[87681b8] | 148 | : # needs a zip with Darren Salt's patches, which'll hopefully be merged |
---|
| 149 | : # into the mainstream distribution in future |
---|
[2eaaa3d] | 150 | $(RM) -rf riscos_tmp |
---|
| 151 | mkdir riscos_tmp |
---|
[58263c7] | 152 | ln -s ../README.ros riscos_tmp/\!ReadMe,fff |
---|
[87681b8] | 153 | : # "cp -r riscos_extras riscos_tmp" but avoid CVS directories |
---|
[011fe59] | 154 | cd riscos_extras; tar --exclude CVS -cf - . | (cd ../riscos_tmp ; tar xf -) |
---|
[58263c7] | 155 | cp -r riscos_extras/\!* riscos_tmp |
---|
[2eaaa3d] | 156 | for f in $(base_progs) caverot ; do\ |
---|
[d4d7e27] | 157 | ln -s ../../riscos_exes/$$f riscos_tmp/\!Cavern/$$f,ff8 ; done |
---|
[5636835] | 158 | for f in @EXTRA_TEXT@ ; do\ |
---|
[2eaaa3d] | 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 |
---|
[d4d7e27] | 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 |
---|
[5636835] | 174 | cd doc && for f in @HTMLFILES@ ; do\ |
---|
[c359bfd] | 175 | ln -s ../doc/$$f ../riscos_tmp/$$f,faf ; done |
---|
[c14817d] | 176 | mkdir riscos_tmp/manual |
---|
| 177 | cd doc && for f in manual/*.htm ; do\ |
---|
[c359bfd] | 178 | ln -s ../../doc/$$f ../riscos_tmp/$$f,faf ; done |
---|
[b1d01c1] | 179 | cd doc && for f in manual/*.png ; do\ |
---|
| 180 | ln -s ../../doc/$$f ../riscos_tmp/$$f,b60 ; done |
---|
[87681b8] | 181 | : # -R doesn't seem to work here, so just glob it all in |
---|
[d4d7e27] | 182 | cd riscos_tmp && ../zip-magic -N ../$(riscos_zip_name) * */* */*/* |
---|
[2eaaa3d] | 183 | $(RM) -rf riscos_tmp |
---|
[425d063] | 184 | |
---|
| 185 | # source code for transfer to the RISC OS/DOS machines for compilation |
---|
[242f7439] | 186 | alien_src_zip_name = src$(shell echo "@VERSION@"|sed 's/\./_/g').zip |
---|
[425d063] | 187 | |
---|
| 188 | alien_src_zip : |
---|
[242f7439] | 189 | $(RM) $(alien_src_zip_name) |
---|
[425d063] | 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 |
---|
[1aa71d4] | 196 | mkdir alien_tmp/stdh |
---|
[a33349e] | 197 | perl alien.pl src/*.c src/*.h > alien_tmp/\!ObeyMe,feb |
---|
[e2fdd12] | 198 | echo 'RMEnsure DDEUtils 0 System:modules.ddeutils' > alien_tmp/\!MakeMe,feb |
---|
| 199 | echo 'Dir <Obey$$Dir>' >> alien_tmp/\!MakeMe,feb |
---|
[a54128f] | 200 | echo amu >> alien_tmp/\!MakeMe,feb |
---|
| 201 | echo Back >> alien_tmp/\!MakeMe,feb |
---|
[418914d] | 202 | ln -s ../src/riscos/stdh/[a-z]* alien_tmp |
---|
[425d063] | 203 | ln -s ../src/borlandc/makefile alien_tmp/makefile.mak |
---|
[418914d] | 204 | ln -s ../src/borlandc/make.bat alien_tmp |
---|
[425d063] | 205 | ln -s ../../src/riscos/config.h alien_tmp/h/config |
---|
| 206 | ln -s ../../src/riscos/armrot.s alien_tmp/s/armrot |
---|
[1aa71d4] | 207 | ln -s ../../src/riscos/stdh/regnames alien_tmp/stdh |
---|
| 208 | ln -s ../../src/riscos/stdh/swinames alien_tmp/stdh |
---|
[242f7439] | 209 | ./zip-magic -N -j $(alien_src_zip_name) alien_tmp src/*.c src/*.h\ |
---|
[a33349e] | 210 | src/riscos/makefile src/borlandc/config.h |
---|
[242f7439] | 211 | cd alien_tmp && ../zip-magic -N -r ../$(alien_src_zip_name) * |
---|
[2eaaa3d] | 212 | $(RM) -rf alien_tmp |
---|
| 213 | |
---|
[242f7439] | 214 | dos_doc_zip_name = svxdoc-doswin-@VERSION@.zip |
---|
[15d03ab] | 215 | dos_doc_exe_name = svxdoc-doswin-@VERSION@.exe |
---|
[e68fccf] | 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) |
---|
[242f7439] | 222 | |
---|
[2eaaa3d] | 223 | dos_doc_zip : |
---|
[242f7439] | 224 | $(RM) $(dos_doc_zip_name) |
---|
[87681b8] | 225 | : # -l means convert LF to CR+LF |
---|
[8840529] | 226 | cd doc && zip -9 -l ../$(dos_doc_zip_name) @DOCS_OTHER@ |
---|
[242f7439] | 227 | |
---|
| 228 | riscos_doc_zip_name = svxdoc-riscos-@VERSION@.zip |
---|
[2eaaa3d] | 229 | |
---|
| 230 | riscos_doc_zip : |
---|
[242f7439] | 231 | $(RM) $(riscos_doc_zip_name) |
---|
[2eaaa3d] | 232 | $(RM) -rf riscos_doc_tmp |
---|
| 233 | mkdir riscos_doc_tmp |
---|
[f6a3719] | 234 | cd doc && for f in @DOCS_OTHER@ ; do\ |
---|
[2eaaa3d] | 235 | if test -d $$f ; then\ |
---|
| 236 | mkdir ../riscos_doc_tmp/$$f ;\ |
---|
| 237 | else\ |
---|
| 238 | case "$$f" in\ |
---|
[bcd7eb8] | 239 | */*.htm|*/*.html) ln -s ../../doc/$$f ../riscos_doc_tmp/$$f,faf ;;\ |
---|
[404e6f62] | 240 | *.htm|*.html) ln -s ../doc/$$f ../riscos_doc_tmp/$$f,faf ;;\ |
---|
[2eaaa3d] | 241 | *.txt) ln -s ../doc/$$f ../riscos_doc_tmp/$$f,fff ;;\ |
---|
| 242 | *.rtf) ln -s ../doc/$$f ../riscos_doc_tmp/$$f,c32 ;;\ |
---|
[b985330] | 243 | *.ps) ln -s ../doc/$$f ../riscos_doc_tmp/$$f,ff5 ;;\ |
---|
[2eaaa3d] | 244 | *) ln -s ../doc/$$f ../riscos_doc_tmp/$$f,ffd ;;\ |
---|
| 245 | esac;\ |
---|
[49a9b3f] | 246 | fi;\ |
---|
[2eaaa3d] | 247 | done |
---|
[242f7439] | 248 | cd riscos_doc_tmp && ../zip-magic -N -r ../$(riscos_doc_zip_name) * |
---|
[2eaaa3d] | 249 | $(RM) -rf riscos_doc_tmp |
---|