source: git/Makefile.am @ b8bf5bc

RELEASE/1.0
Last change on this file since b8bf5bc was b8bf5bc, checked in by Olly Betts <olly@…>, 13 years ago

Backport change from 1.2.0:
Makefile.am,doc/Makefile.am: Don't list other .in files explicitly in
EXTRA_DIST.

git-svn-id: file:///home/survex-svn/survex/branches/1.0@3676 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

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