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 | SUBDIRS = . lib src doc tests |
---|
10 | |
---|
11 | # We never want to implicitly recurse into the vim subdirectory, but we still |
---|
12 | # want to distribute the files there. |
---|
13 | DIST_SUBDIRS = $(SUBDIRS) vim |
---|
14 | |
---|
15 | EXTRA_DIST = $(GNU_FILES) TODO survex.iss.in OLDNEWS\ |
---|
16 | desc.txt desc-aven.txt survex.spec.in survex.spec\ |
---|
17 | buildmacosx.sh |
---|
18 | |
---|
19 | extra_bin = lib/*.msg\ |
---|
20 | lib/aven.txf |
---|
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 | |
---|
27 | AUTHORS: doc/AUTHORS.htm |
---|
28 | w3m -dump doc/AUTHORS.htm > AUTHORS |
---|
29 | |
---|
30 | HACKING: doc/HACKING.htm |
---|
31 | w3m -dump doc/HACKING.htm > HACKING |
---|
32 | |
---|
33 | TODO: doc/TODO.htm |
---|
34 | w3m -dump doc/TODO.htm > TODO |
---|
35 | |
---|
36 | mingw : all mingw_iss |
---|
37 | |
---|
38 | mingw_iss : survex.iss |
---|
39 | $(RM) -rf iss_tmp |
---|
40 | mkdir iss_tmp |
---|
41 | cp src/svxedit iss_tmp/svxedit.tcl |
---|
42 | cp $(extra_txt) survex.iss iss_tmp |
---|
43 | : # so the installer can display the license |
---|
44 | cp COPYING iss_tmp/COPYING.txt |
---|
45 | cd doc;cp @HTMLFILES@ ../iss_tmp |
---|
46 | : # convert LF to CR+LF |
---|
47 | perl -p -i -e 's/\n/\r\n/' iss_tmp/* |
---|
48 | for f in $(base_progs) aven editwrap ; do cp src/$$f.exe iss_tmp ; done |
---|
49 | cp lib/icons/*.ico lib/icons/*.png iss_tmp |
---|
50 | : # don't ship pngs for which we ship the ico version |
---|
51 | for a in iss_tmp/*.ico ; do rm `echo $$a|sed 's/\.ico/.png/'` ; done |
---|
52 | : # but we do want aven.png for the About dialog |
---|
53 | cp lib/icons/aven.png iss_tmp |
---|
54 | : # not needed if we build wx without threads: gzip -dc /usr/share/doc/mingw32-runtime/mingwm10.dll.gz > iss_tmp/mingwm10.dll |
---|
55 | mkdir iss_tmp/manual |
---|
56 | cp doc/manual/*.htm iss_tmp/manual |
---|
57 | : # convert LF to CR+LF |
---|
58 | perl -p -i -e 's/\n/\r\n/' iss_tmp/manual/* |
---|
59 | cp doc/manual/*.png iss_tmp/manual |
---|
60 | cp $(extra_bin) iss_tmp |
---|
61 | : # NB check for updates for each new wx version |
---|
62 | for a in ca cs de es fr it pt pt_BR sk ; do\ |
---|
63 | mkdir iss_tmp/$$a;\ |
---|
64 | cp /usr/share/locale/$$a/LC_MESSAGES/wxstd.mo iss_tmp/$$a;\ |
---|
65 | echo 'Source: "'"$$a"'\wxstd.mo"; DestDir: "{app}\'"$$a"'"' >> iss_tmp/i18nfiles.iss;\ |
---|
66 | done |
---|
67 | cp lib/*.isl iss_tmp |
---|
68 | : # Also need to reduce colour depth it appears: |
---|
69 | : # src/png2bmp lib/icons/aven_about.png iss_tmp/logo.bmp |
---|
70 | DISPLAY= wine "c:/Program Files/Inno Setup 5/ISCC.exe" iss_tmp/survex.iss |
---|
71 | mv iss_tmp/Output/*.exe . |
---|
72 | $(RM) -rf iss_tmp |
---|
73 | |
---|
74 | dos_doc_zip_name = svxdoc-doswin-@VERSION@.zip |
---|
75 | dos_doc_exe_name = svxdoc-doswin-@VERSION@.exe |
---|
76 | |
---|
77 | dos_doc_exe : dos_doc_zip |
---|
78 | $(RM) $(dos_doc_exe_name)~ |
---|
79 | cat dos_extras/unzipsfx.exe $(dos_doc_zip_name) > $(dos_doc_exe_name)~ |
---|
80 | zip -A $(dos_doc_exe_name)~ |
---|
81 | mv $(dos_doc_exe_name)~ $(dos_doc_exe_name) |
---|
82 | |
---|
83 | dos_doc_zip : |
---|
84 | $(RM) $(dos_doc_zip_name) |
---|
85 | : # -l means convert LF to CR+LF |
---|
86 | cd doc && zip -9 -l ../$(dos_doc_zip_name) @DOCS_OTHER@ |
---|
87 | |
---|
88 | .PHONY: mingw mingw_iss dos_doc_exe dos_doc_zip |
---|