speedo: Fixes for native build.
[gnupg.git] / build-aux / speedo.mk
1 # speedo.mk - Speedo rebuilds speedily.
2 # Copyright (C) 2008, 2014 g10 Code GmbH
3 #
4 # speedo is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # speedo is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, see <http://www.gnu.org/licenses/>.
16
17 # speedo builds gnupg-related packages from GIT and installs them in a
18 # user directory, thereby providing a non-obstrusive test environment.
19 # speedo does only work with GNU make.  The build system is similar to
20 # that of gpg4win.  The following commands are supported:
21 #
22 #   make -f speedo.mk all  pkg2rep=/dir/with/tarballs
23 # or
24 #   make -f speedo.mk
25 #
26 # Builds all packages and installs them under PLAY/inst.  At the end,
27 # speedo prints commands that can be executed in the local shell to
28 # make use of the installed packages.
29 #
30 #   make -f speedo.mk clean
31 # or
32 #   make -f speedo.mk clean-PACKAGE
33 #
34 # Removes all packages or the package PACKAGE from the installation
35 # and build tree.  A subsequent make will rebuild these (and only
36 # these) packages.
37 #
38 #   make -f speedo.mk report
39 # or
40 #   make -f speedo.mk report-PACKAGE
41 #
42 # Lists packages and versions.
43 #
44
45 # We need to know our own name.
46 SPEEDO_MK := $(realpath $(lastword $(MAKEFILE_LIST)))
47
48 .PHONY : help native native-gui w32-installer w32-source
49 .PHONY :      git-native git-native-gui git-w32-installer git-w32-source
50 .PHONY :      this-native this-native-gui this-w32-installer this-w32-source
51
52 help:
53         @echo 'usage: make -f speedo.mk TARGET'
54         @echo '       with TARGET being one of:'
55         @echo '  help           This help'
56         @echo '  native         Native build of the GnuPG core'
57         @echo '  native-gui     Ditto but with pinentry and GPA'
58         @echo '  w32-installer  Build a Windows installer'
59         @echo '  w32-source     Pack a source archive'
60         @echo
61         @echo 'You may append INSTALL_REFIX=<dir> for native builds.'
62         @echo 'Prepend TARGET with "git-" to build from GIT repos.'
63         @echo 'Prepend TARGET with "this-" to build from the source tarball.'
64
65
66 SPEEDOMAKE := $(MAKE) -f $(SPEEDO_MK) UPD_SWDB=1
67
68 native: check-tools
69         $(SPEEDOMAKE) TARGETOS=native WHAT=release WITH_GUI=0 all
70
71 git-native: check-tools
72         $(SPEEDOMAKE) TARGETOS=native WHAT=git     WITH_GUI=0 all
73
74 this-native: check-tools
75         $(SPEEDOMAKE) TARGETOS=native WHAT=this    WITH_GUI=0 all
76
77 native-gui: check-tools
78         $(SPEEDOMAKE) TARGETOS=native WHAT=release WITH_GUI=1 all
79
80 git-native-gui: check-tools
81         $(SPEEDOMAKE) TARGETOS=native WHAT=git     WITH_GUI=1 all
82
83 this-native-gui: check-tools
84         $(SPEEDOMAKE) TARGETOS=native WHAT=this    WITH_GUI=1 all
85
86 w32-installer: check-tools
87         $(SPEEDOMAKE) TARGETOS=w32    WHAT=release WITH_GUI=1 installer
88
89 git-w32-installer: check-tools
90         $(SPEEDOMAKE) TARGETOS=w32    WHAT=git     WITH_GUI=1 installer
91
92 this-w32-installer: check-tools
93         $(SPEEDOMAKE) TARGETOS=w32    WHAT=this    WITH_GUI=1 installer
94
95 w32-source: check-tools
96         $(SPEEDOMAKE) TARGETOS=w32    WHAT=release WITH_GUI=1 dist-source
97
98 git-w32-source: check-tools
99         $(SPEEDOMAKE) TARGETOS=w32    WHAT=git     WITH_GUI=1 dist-source
100
101 this-w32-source: check-tools
102         $(SPEEDOMAKE) TARGETOS=w32    WHAT=git     WITH_GUI=1 dist-source
103
104
105 # Set this to "git" to build from git,
106 #          to "release" from tarballs,
107 #          to "this" from the unpacked sources.
108 WHAT=git
109
110 # Set target to "native" or "w32"
111 TARGETOS=
112
113 # Set to 1 to build the GUI tools
114 WITH_GUI=0
115
116 # Set to 1 to really download the swdb.
117 UPD_SWDB=0
118
119 # Set to the location of the directory with tarballs of
120 # external packages.
121 TARBALLS=$(shell pwd)/../tarballs
122
123 #  Number of parallel make jobs
124 MAKE_J=3
125
126 # Name to use for the w32 installer and sources
127 INST_NAME=gnupg-w32
128
129 # Use this to override the installaion directory for native builds.
130 INSTALL_PREFIX=none
131
132
133 # Directory names.
134 # They must be absolute, as we switch directories pretty often.
135 root := $(shell pwd)/PLAY
136 sdir := $(root)/src
137 bdir := $(root)/build
138 bdir6:= $(root)/build-w64
139 ifeq ($(INSTALL_PREFIX),none)
140 idir := $(root)/inst
141 else
142 idir := $(abspath $(INSTALL_PREFIX))
143 endif
144 idir6:= $(root)/inst-w64
145 stampdir := $(root)/stamps
146 topsrc := $(shell cd $(dir $(SPEEDO_MK)).. && pwd)
147 auxsrc := $(topsrc)/build-aux/speedo
148 patdir := $(topsrc)/build-aux/speedo/patches
149 w32src := $(topsrc)/build-aux/speedo/w32
150
151 # =====BEGIN LIST OF PACKAGES=====
152 # The packages that should be built.  The order is also the build order.
153 # Fixme: Do we need to build pkg-config for cross-building?
154
155 speedo_spkgs  = \
156         libgpg-error npth libgcrypt
157
158 ifeq ($(TARGETOS),w32)
159 speedo_spkgs += \
160         zlib bzip2 libiconv gettext
161 endif
162
163 speedo_spkgs += \
164         libassuan libksba gnupg
165
166 ifeq ($(TARGETOS),w32)
167 speedo_spkgs += \
168         libffi glib pkg-config
169 endif
170
171 speedo_spkgs += \
172         gpgme
173
174 ifeq ($(TARGETOS),w32)
175 speedo_spkgs += \
176         libpng \
177         gdk-pixbuf atk pixman cairo pango gtk+
178 endif
179
180
181 ifeq ($(WITH_GUI),1)
182 speedo_spkgs += \
183         pinentry gpa
184 endif
185
186 ifeq ($(TARGETOS),w32)
187 speedo_spkgs += \
188         gpgex
189 endif
190
191 # =====END LIST OF PACKAGES=====
192
193
194 # Packages which are additionally build for 64 bit Windows
195 speedo_w64_spkgs  = \
196         libgpg-error libiconv gettext libassuan gpgex
197
198 # Packages which use the gnupg autogen.sh build style
199 speedo_gnupg_style = \
200         libgpg-error npth libgcrypt  \
201         libassuan libksba gnupg gpgme \
202         pinentry gpa gpgex
203
204 # Packages which use only make and no build directory
205 speedo_make_only_style = \
206         zlib bzip2
207
208 # Get the content of the software DB.
209 ifeq ($(UPD_SWDB),1)
210 SWDB := $(shell $(topsrc)/build-aux/getswdb.sh && echo okay)
211 ifeq ($(strip $(SWDB)),)
212 $(error Error getting GnuPG software version database)
213 endif
214
215 # Version numbers of the released packages
216 gnupg_ver = $(shell cat $(topsrc)/VERSION)
217
218 libgpg_error_ver := $(shell awk '$$1=="libgpg_error_ver" {print $$2}' swdb.lst)
219 libgpg_error_sha1:= $(shell awk '$$1=="libgpg_error_sha1" {print $$2}' swdb.lst)
220
221 npth_ver  := $(shell awk '$$1=="npth_ver" {print $$2}' swdb.lst)
222 npth_sha1 := $(shell awk '$$1=="npth_sha1" {print $$2}' swdb.lst)
223
224 libgcrypt_ver  := $(shell awk '$$1=="libgcrypt_ver" {print $$2}' swdb.lst)
225 libgcrypt_sha1 := $(shell awk '$$1=="libgcrypt_sha1" {print $$2}' swdb.lst)
226
227 libassuan_ver  := $(shell awk '$$1=="libassuan_ver" {print $$2}' swdb.lst)
228 libassuan_sha1 := $(shell awk '$$1=="libassuan_sha1" {print $$2}' swdb.lst)
229
230 libksba_ver  := $(shell awk '$$1=="libksba_ver" {print $$2}' swdb.lst)
231 libksba_sha1 := $(shell awk '$$1=="libksba_sha1" {print $$2}' swdb.lst)
232
233 gpgme_ver  := $(shell awk '$$1=="gpgme_ver" {print $$2}' swdb.lst)
234 gpgme_sha1 := $(shell awk '$$1=="gpgme_sha1" {print $$2}' swdb.lst)
235
236 pinentry_ver  := $(shell awk '$$1=="pinentry_ver" {print $$2}' swdb.lst)
237 pinentry_sha1 := $(shell awk '$$1=="pinentry_sha1" {print $$2}' swdb.lst)
238
239 gpa_ver  := $(shell awk '$$1=="gpa_ver" {print $$2}' swdb.lst)
240 gpa_sha1 := $(shell awk '$$1=="gpa_sha1" {print $$2}' swdb.lst)
241
242 gpgex_ver  := $(shell awk '$$1=="gpgex_ver" {print $$2}' swdb.lst)
243 gpgex_sha1 := $(shell awk '$$1=="gpgex_sha1" {print $$2}' swdb.lst)
244
245 zlib_ver  := $(shell awk '$$1=="zlib_ver" {print $$2}' swdb.lst)
246 zlib_sha1 := $(shell awk '$$1=="zlib_sha1_gz" {print $$2}' swdb.lst)
247
248 bzip2_ver  := $(shell awk '$$1=="bzip2_ver" {print $$2}' swdb.lst)
249 bzip2_sha1 := $(shell awk '$$1=="bzip2_sha1_gz" {print $$2}' swdb.lst)
250
251 $(info Information from the version database)
252 $(info GnuPG ..........: $(gnupg_ver))
253 $(info Libgpg-error ...: $(libgpg_error_ver))
254 $(info Npth ...........: $(npth_ver))
255 $(info Libgcrypt ......: $(libgcrypt_ver))
256 $(info Libassuan ......: $(libassuan_ver))
257 $(info Zlib ...........: $(zlib_ver))
258 $(info Bzip2 ..........: $(bzip2_ver))
259 $(info GPGME ..........: $(gpgme_ver))
260 $(info Pinentry .......: $(pinentry_ver))
261 $(info GPA ............: $(gpa_ver))
262 $(info GpgEX.... ......: $(gpgex_ver))
263 endif
264
265 # Version number for external packages
266 pkg_config_ver = 0.23
267 zlib_ver = 1.2.8
268 libiconv_ver = 1.14
269 gettext_ver = 0.18.2.1
270 libffi_ver = 3.0.13
271 glib_ver = 2.34.3
272 libpng_ver = 1.4.12
273 gdk_pixbuf_ver = 2.26.5
274 atk_ver = 1.32.0
275 pango_ver = 1.29.4
276 pixman_ver = 0.32.4
277 cairo_ver = 1.12.16
278 gtk__ver = 2.24.17
279
280
281 # The GIT repository.  Using a local repo is much faster.
282 #gitrep = git://git.gnupg.org
283 gitrep = ${HOME}/s
284
285 # The tarball directories
286 pkgrep = ftp://ftp.gnupg.org/gcrypt
287 pkg10rep = ftp://ftp.g10code.com/g10code
288 pkg2rep = $(TARBALLS)
289
290 # For each package, the following variables can be defined:
291 #
292 # speedo_pkg_PACKAGE_git: The GIT repository that should be built.
293 # speedo_pkg_PACKAGE_gitref: The GIT revision to checkout
294 #
295 # speedo_pkg_PACKAGE_tar: URL to the tar file that should be built.
296 #
297 # Exactly one of the above variables is required.  Note that this
298 # version of speedo does not cache repositories or tar files, and does
299 # not test the integrity of the downloaded software.  If you care
300 # about this, you can also specify filenames to locally verified files.
301 # Filenames are differentiated from URLs by starting with a slash '/'.
302 #
303 # speedo_pkg_PACKAGE_configure: Extra arguments to configure.
304 #
305 # speedo_pkg_PACKAGE_make_args: Extra arguments to make.
306 #
307 # speedo_pkg_PACKAGE_make_args_inst: Extra arguments to make install.
308 #
309 # Note that you can override the defaults in this file in a local file
310 # "config.mk"
311
312 ifeq ($(WHAT),this)
313 else ifeq ($(WHAT),git)
314   speedo_pkg_libgpg_error_git = $(gitrep)/libgpg-error
315   speedo_pkg_libgpg_error_gitref = master
316   speedo_pkg_npth_git = $(gitrep)/npth
317   speedo_pkg_npth_gitref = master
318   speedo_pkg_libassuan_git = $(gitrep)/libassuan
319   speedo_pkg_libassuan_gitref = master
320   speedo_pkg_libgcrypt_git = $(gitrep)/libgcrypt
321   speedo_pkg_libgcrypt_gitref = LIBGCRYPT-1-6-BRANCH
322   speedo_pkg_libksba_git = $(gitrep)/libksba
323   speedo_pkg_libksba_gitref = master
324   speedo_pkg_gpgme_git = $(gitrep)/gpgme
325   speedo_pkg_gpgme_gitref = master
326   speedo_pkg_pinentry_git = $(gitrep)/pinentry
327   speedo_pkg_pinentry_gitref = master
328   speedo_pkg_gpa_git = $(gitrep)/gpa
329   speedo_pkg_gpa_gitref = master
330   speedo_pkg_gpgex_git = $(gitrep)/gpgex
331   speedo_pkg_gpgex_gitref = master
332 else ifeq ($(WHAT),release)
333   speedo_pkg_libgpg_error_tar = \
334         $(pkgrep)/libgpg-error/libgpg-error-$(libgpg_error_ver).tar.bz2
335   speedo_pkg_npth_tar = \
336         $(pkgrep)/npth/npth-$(npth_ver).tar.bz2
337   speedo_pkg_libassuan_tar = \
338         $(pkgrep)/libassuan/libassuan-$(libassuan_ver).tar.bz2
339   speedo_pkg_libgcrypt_tar = \
340         $(pkgrep)/libgcrypt/libgcrypt-$(libgcrypt_ver).tar.bz2
341   speedo_pkg_libksba_tar = \
342         $(pkgrep)/libksba/libksba-$(libksba_ver).tar.bz2
343   speedo_pkg_gpgme_tar = \
344         $(pkgrep)/gpgme/gpgme-$(gpgme_ver).tar.bz2
345   speedo_pkg_pinentry_tar = \
346         $(pkgrep)/pinentry/pinentry-$(pinentry_ver).tar.bz2
347   speedo_pkg_gpa_tar = \
348         $(pkgrep)/gpa/gpa-$(gpa_ver).tar.bz2
349   speedo_pkg_gpgex_tar = \
350         $(pkg10rep)/gpgex/gpgex-$(gpgex_ver).tar.bz2
351 else
352   $(error invalid value for WHAT (use on of: git release this))
353 endif
354
355 speedo_pkg_pkg_config_tar = $(pkg2rep)/pkg-config-$(pkg_config_ver).tar.gz
356 speedo_pkg_zlib_tar       = $(pkgrep)/zlib/zlib-$(zlib_ver).tar.gz
357 speedo_pkg_bzip2_tar      = $(pkgrep)/bzip2/bzip2-$(bzip2_ver).tar.gz
358 speedo_pkg_libiconv_tar   = $(pkg2rep)/libiconv-$(libiconv_ver).tar.gz
359 speedo_pkg_gettext_tar    = $(pkg2rep)/gettext-$(gettext_ver).tar.gz
360 speedo_pkg_libffi_tar     = $(pkg2rep)/libffi-$(libffi_ver).tar.gz
361 speedo_pkg_glib_tar       = $(pkg2rep)/glib-$(glib_ver).tar.xz
362 speedo_pkg_libpng_tar     = $(pkg2rep)/libpng-$(libpng_ver).tar.bz2
363 speedo_pkg_gdk_pixbuf_tar = $(pkg2rep)/gdk-pixbuf-$(gdk_pixbuf_ver).tar.xz
364 speedo_pkg_atk_tar        = $(pkg2rep)/atk-$(atk_ver).tar.bz2
365 speedo_pkg_pango_tar      = $(pkg2rep)/pango-$(pango_ver).tar.bz2
366 speedo_pkg_pixman_tar     = $(pkg2rep)/pixman-$(pixman_ver).tar.gz
367 speedo_pkg_cairo_tar      = $(pkg2rep)/cairo-$(cairo_ver).tar.xz
368 speedo_pkg_gtk__tar       = $(pkg2rep)/gtk+-$(gtk__ver).tar.xz
369
370
371 #
372 # Package build options
373 #
374
375 speedo_pkg_libgpg_error_configure = --enable-static
376 speedo_pkg_w64_libgpg_error_configure = --enable-static
377
378 speedo_pkg_libassuan_configure = --enable-static
379 speedo_pkg_w64_libassuan_configure = --enable-static
380
381 speedo_pkg_libgcrypt_configure = --disable-static
382
383 speedo_pkg_libksba_configure = --disable-static
384
385 ifeq ($(TARGETOS),w32)
386 speedo_pkg_gnupg_configure = --enable-gpg2-is-gpg --disable-g13
387 else
388 speedo_pkg_gnupg_configure = --disable-g13
389 endif
390 speedo_pkg_gnupg_extracflags = -g
391
392 # Create the version info files only for W32 so that they won't get
393 # installed if for example INSTALL_PREFIX=/usr/local is used.
394 ifeq ($(TARGETOS),w32)
395 define speedo_pkg_gnupg_post_install
396 (set -e; \
397  sed -n  's/.*PACKAGE_VERSION "\(.*\)"/\1/p' config.h >$(idir)/INST_VERSION; \
398  sed -n  's/.*W32INFO_VI_PRODUCTVERSION \(.*\)/\1/p' common/w32info-rc.h \
399     |sed 's/,/./g' >$(idir)/INST_PROD_VERSION )
400 endef
401 endif
402
403 # The LDFLAGS is needed for -lintl for glib.
404 speedo_pkg_gpgme_configure = \
405         --enable-static --enable-w32-glib --disable-w32-qt \
406         --with-gpg-error-prefix=$(idir) \
407         LDFLAGS=-L$(idir)/lib
408
409 speedo_pkg_pinentry_configure = \
410         --disable-pinentry-qt --disable-pinentry-qt4 --disable-pinentry-gtk \
411         --enable-pinentry-gtk2 \
412         --with-glib-prefix=$(idir) --with-gtk-prefix=$(idir) \
413         CPPFLAGS=-I$(idir)/include   \
414         LDFLAGS=-L$(idir)/lib        \
415         CXXFLAGS=-static-libstdc++
416
417 speedo_pkg_gpa_configure = \
418         --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir) \
419         --with-gpgme-prefix=$(idir) --with-zlib=$(idir) \
420         --with-libassuan-prefix=$(idir) --with-gpg-error-prefix=$(idir)
421
422 speedo_pkg_gpgex_configure = \
423         --with-gpg-error-prefix=$(idir) \
424         --with-libassuan-prefix=$(idir)
425
426 speedo_pkg_w64_gpgex_configure = \
427         --with-gpg-error-prefix=$(idir6) \
428         --with-libassuan-prefix=$(idir6)
429
430
431 #
432 # External packages
433 #
434
435 ifeq ($(TARGETOS),w32)
436 speedo_pkg_zlib_make_args = \
437         -fwin32/Makefile.gcc PREFIX=$(host)- IMPLIB=libz.dll.a
438
439 speedo_pkg_zlib_make_args_inst = \
440         -fwin32/Makefile.gcc \
441         BINARY_PATH=$(idir)/bin INCLUDE_PATH=$(idir)/include \
442         LIBRARY_PATH=$(idir)/lib SHARED_MODE=1 IMPLIB=libz.dll.a
443
444 # Zlib needs some special magic to generate a libtool file.
445 # We also install the pc file here.
446 define speedo_pkg_zlib_post_install
447 (set -e; mkdir $(idir)/lib/pkgconfig || true;           \
448 cp $(auxsrc)/zlib.pc $(idir)/lib/pkgconfig/;            \
449 cd $(idir);                                             \
450 echo "# Generated by libtool" > lib/libz.la             \
451 echo "dlname='../bin/zlib1.dll'" >> lib/libz.la;        \
452 echo "library_names='libz.dll.a'" >> lib/libz.la;       \
453 echo "old_library='libz.a'" >> lib/libz.la;             \
454 echo "dependency_libs=''" >> lib/libz.la;               \
455 echo "current=1" >> lib/libz.la;                        \
456 echo "age=2" >> lib/libz.la;                            \
457 echo "revision=5" >> lib/libz.la;                       \
458 echo "installed=yes" >> lib/libz.la;                    \
459 echo "shouldnotlink=no" >> lib/libz.la;                 \
460 echo "dlopen=''" >> lib/libz.la;                        \
461 echo "dlpreopen=''" >> lib/libz.la;                     \
462 echo "libdir=\"$(idir)/lib\"" >> lib/libz.la)
463 endef
464
465 endif
466
467 ifeq ($(TARGETOS),w32)
468 speedo_pkg_bzip2_make_args = \
469         CC="$(host)-gcc" AR="$(host)-ar" RANLIB="$(host)-ranlib"
470
471 speedo_pkg_bzip2_make_args_inst = \
472         PREFIX=$(idir) CC="$(host)-gcc" AR="$(host)-ar" RANLIB="$(host)-ranlib"
473 endif
474
475 speedo_pkg_w64_libiconv_configure = \
476         --enable-shared=no --enable-static=yes
477
478 speedo_pkg_gettext_configure = \
479         --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
480         CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
481 speedo_pkg_w64_gettext_configure = \
482         --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
483         CPPFLAGS=-I$(idir6)/include LDFLAGS=-L$(idir6)/lib
484 speedo_pkg_gettext_extracflags = -O2
485 # We only need gettext-runtime and there is sadly no top level
486 # configure option for this
487 speedo_pkg_gettext_make_dir = gettext-runtime
488
489
490 speedo_pkg_glib_configure = \
491         --disable-modular-tests \
492         --with-libiconv=gnu \
493         CPPFLAGS=-I$(idir)/include \
494         LDFLAGS=-L$(idir)/lib \
495         CCC=$(host)-g++ \
496         LIBFFI_CFLAGS=-I$(idir)/lib/libffi-$(libffi_ver)/include \
497         LIBFFI_LIBS=\"-L$(idir)/lib -lffi\"
498 ifeq ($(TARGETOS),w32)
499 speedo_pkg_glib_extracflags = -march=i486
500 endif
501
502 ifeq ($(TARGETOS),w32)
503 speedo_pkg_libpng_configure = \
504         CPPFLAGS=\"-I$(idir)/include -DPNG_BUILD_DLL\" \
505         LDFLAGS=\"-L$(idir)/lib\" LIBPNG_DEFINES=\"-DPNG_BUILD_DLL\"
506 else
507 speedo_pkg_libpng_configure = \
508         CPPFLAGS=\"-I$(idir)/include\" \
509         LDFLAGS=\"-L$(idir)/lib\"
510 endif
511
512 ifneq ($(TARGETOS),w32)
513 speedo_pkg_gdk_pixbuf_configure = --without-libtiff --without-libjpeg
514 endif
515
516 speedo_pkg_pixman_configure = \
517         CPPFLAGS=-I$(idir)/include \
518         LDFLAGS=-L$(idir)/lib
519
520 ifeq ($(TARGETOS),w32)
521 speedo_pkg_cairo_configure = \
522         --disable-qt --disable-ft --disable-fc \
523         --enable-win32 --enable-win32-font \
524         CPPFLAGS=-I$(idir)/include \
525         LDFLAGS=-L$(idir)/lib
526 else
527 speedo_pkg_cairo_configure = \
528         --disable-qt \
529         CPPFLAGS=-I$(idir)/include \
530         LDFLAGS=-L$(idir)/lib
531 endif
532
533 speedo_pkg_pango_configure = \
534         --disable-gtk-doc  \
535         CPPFLAGS=-I$(idir)/include \
536         LDFLAGS=-L$(idir)/lib
537
538 speedo_pkg_gtk__configure = \
539         --disable-cups \
540         CPPFLAGS=-I$(idir)/include \
541         LDFLAGS=-L$(idir)/lib
542
543
544 # ---------
545
546 all: all-speedo
547
548 report: report-speedo
549
550 clean: clean-speedo
551
552 ifeq ($(TARGETOS),w32)
553 STRIP = i686-w64-mingw32-strip
554 else
555 STRIP = strip
556 endif
557 W32CC = i686-w64-mingw32-gcc
558
559 -include config.mk
560
561 #
562 #  The generic speedo code
563 #
564
565 MKDIR=mkdir
566 MAKENSIS=makensis
567 SHA1SUM := $(shell $(topsrc)/build-aux/getswdb.sh --find-sha1sum)
568 ifeq ($(SHA1SUM),false)
569 $(error The sha1sum tool is missing)
570 endif
571
572
573 BUILD_ISODATE=$(shell date -u +%Y-%m-%d)
574
575 # The next two macros will work only after gnupg has been build.
576 ifeq ($(TARGETOS),w32)
577 INST_VERSION=$(shell head -1 $(idir)/INST_VERSION)
578 INST_PROD_VERSION=$(shell head -1 $(idir)/INST_PROD_VERSION)
579 endif
580
581 # List with packages
582 speedo_build_list = $(speedo_spkgs)
583 speedo_w64_build_list = $(speedo_w64_spkgs)
584
585 # To avoid running external commands during the read phase (":=" style
586 # assignments), we check that the targetos has been given
587 ifneq ($(TARGETOS),)
588
589 # Determine build and host system
590 build := $(shell $(topsrc)/autogen.sh --silent --print-build)
591 ifeq ($(TARGETOS),w32)
592   speedo_autogen_buildopt := --build-w32
593   speedo_autogen_buildopt6 := --build-w64
594   host := $(shell $(topsrc)/autogen.sh --silent --print-host --build-w32)
595   host6:= $(shell $(topsrc)/autogen.sh --silent --print-host --build-w64)
596   speedo_host_build_option := --host=$(host) --build=$(build)
597   speedo_host_build_option6 := --host=$(host6) --build=$(build)
598   speedo_w32_cflags := -mms-bitfields
599 else
600   speedo_autogen_buildopt :=
601   host :=
602   speedo_host_build_option :=
603   speedo_w32_cflags :=
604 endif
605
606 ifeq ($(MAKE_J),)
607   speedo_makeopt=
608 else
609   speedo_makeopt=-j$(MAKE_J)
610 endif
611
612 # End non-empty TARGETOS
613 endif
614
615
616
617 # The playground area is our scratch area, where we unpack, build and
618 # install the packages.
619 $(stampdir)/stamp-directories:
620         $(MKDIR) $(root) || true
621         $(MKDIR) $(stampdir) || true
622         $(MKDIR) $(sdir)  || true
623         $(MKDIR) $(bdir)  || true
624         $(MKDIR) $(idir)   || true
625 ifeq ($(TARGETOS),w32)
626         $(MKDIR) $(bdir6)  || true
627         $(MKDIR) $(idir6)   || true
628 endif
629         touch $(stampdir)/stamp-directories
630
631 # Frob the name $1 by converting all '-' and '+' characters to '_'.
632 define FROB_macro
633 $(subst +,_,$(subst -,_,$(1)))
634 endef
635
636 # Get the variable $(1) (which may contain '-' and '+' characters).
637 define GETVAR
638 $($(call FROB_macro,$(1)))
639 endef
640
641 # Set a couple of common variables.
642 define SETVARS
643         pkg="$(1)";                                                     \
644         git="$(call GETVAR,speedo_pkg_$(1)_git)";                       \
645         gitref="$(call GETVAR,speedo_pkg_$(1)_gitref)";                 \
646         tar="$(call GETVAR,speedo_pkg_$(1)_tar)";                       \
647         sha1="$(call GETVAR,$(1)_sha1)";                                \
648         pkgsdir="$(sdir)/$(1)";                                         \
649         if [ "$(1)" = "gnupg" ]; then                                   \
650           git='';                                                       \
651           gitref='';                                                    \
652           tar='';                                                       \
653           pkgsdir="$(topsrc)";                                          \
654         fi;                                                             \
655         pkgbdir="$(bdir)/$(1)";                                         \
656         pkgcfg="$(call GETVAR,speedo_pkg_$(1)_configure)";              \
657         tmp="$(speedo_w32_cflags)                                       \
658              $(call GETVAR,speedo_pkg_$(1)_extracflags)";               \
659         if [ x$$$$(echo "$$$$tmp" | tr -d '[:space:]')x != xx ]; then   \
660           pkgextracflags="CFLAGS=\"$$$$tmp\"";                          \
661         else                                                            \
662           pkgextracflags=;                                              \
663         fi;                                                             \
664         pkgmkdir="$(call GETVAR,speedo_pkg_$(1)_make_dir)";             \
665         pkgmkargs="$(call GETVAR,speedo_pkg_$(1)_make_args)";           \
666         pkgmkargs_inst="$(call GETVAR,speedo_pkg_$(1)_make_args_inst)"; \
667         pkgmkargs_uninst="$(call GETVAR,speedo_pkg_$(1)_make_args_uninst)"; \
668         export PKG_CONFIG="/usr/bin/pkg-config";                        \
669         export PKG_CONFIG_PATH="$(idir)/lib/pkgconfig";                 \
670         [ "$(TARGETOS)" != native ] && export PKG_CONFIG_LIBDIR="";     \
671         export SYSROOT="$(idir)";                                       \
672         export PATH="$(idir)/bin:$${PATH}";                             \
673         export LD_LIBRARY_PATH="$(idir)/lib:$${LD_LIBRARY_PATH}"
674 endef
675
676 define SETVARS_W64
677         pkg="$(1)";                                                     \
678         git="$(call GETVAR,speedo_pkg_$(1)_git)";                       \
679         gitref="$(call GETVAR,speedo_pkg_$(1)_gitref)";                 \
680         tar="$(call GETVAR,speedo_pkg_$(1)_tar)";                       \
681         sha1="$(call GETVAR,$(1)_sha1)";                                \
682         pkgsdir="$(sdir)/$(1)";                                         \
683         if [ "$(1)" = "gnupg" ]; then                                   \
684           git='';                                                       \
685           gitref='';                                                    \
686           tar='';                                                       \
687           pkgsdir="$(topsrc)";                                          \
688         fi;                                                             \
689         pkgbdir="$(bdir6)/$(1)";                                        \
690         pkgcfg="$(call GETVAR,speedo_pkg_w64_$(1)_configure)";          \
691         tmp="$(speedo_w32_cflags)                                       \
692              $(call GETVAR,speedo_pkg_$(1)_extracflags)";               \
693         if [ x$$$$(echo "$$$$tmp" | tr -d '[:space:]')x != xx ]; then   \
694           pkgextracflags="CFLAGS=\"$$$$tmp\"";                          \
695         else                                                            \
696           pkgextracflags=;                                              \
697         fi;                                                             \
698         pkgmkdir="$(call GETVAR,speedo_pkg_$(1)_make_dir)";             \
699         pkgmkargs="$(call GETVAR,speedo_pkg_$(1)_make_args)";           \
700         pkgmkargs_inst="$(call GETVAR,speedo_pkg_$(1)_make_args_inst)"; \
701         pkgmkargs_uninst="$(call GETVAR,speedo_pkg_$(1)_make_args_uninst)"; \
702         export PKG_CONFIG="/usr/bin/pkg-config";                        \
703         export PKG_CONFIG_PATH="$(idir6)/lib/pkgconfig";                \
704         [ "$(TARGETOS)" != native ] && export PKG_CONFIG_LIBDIR="";     \
705         export SYSROOT="$(idir6)";                                      \
706         export PATH="$(idir6)/bin:$${PATH}";                            \
707         export LD_LIBRARY_PATH="$(idir6)/lib:$${LD_LIBRARY_PATH}"
708 endef
709
710
711 # Template for source packages.
712
713 # Note that the gnupg package is special: The package source dir is
714 # the same as the topsrc dir and thus we need to detect the gnupg
715 # package and cd to that directory.  We also test that no in-source build
716 # has been done.  autogen.sh is not run for gnupg.
717 #
718 define SPKG_template
719
720 $(stampdir)/stamp-$(1)-00-unpack: $(stampdir)/stamp-directories
721         @echo "speedo: /*"
722         @echo "speedo:  *   $(1)"
723         @echo "speedo:  */"
724         @(set -e; cd $(sdir);                           \
725          $(call SETVARS,$(1));                          \
726          if [ "$(WHAT)" = "this" ]; then                \
727            echo "speedo: using included source";        \
728          elif [ "$(1)" = "gnupg" ]; then                \
729            cd $$$${pkgsdir};                            \
730            if [ -f config.log ]; then                   \
731              echo "GnuPG has already been build in-source" >&2  ;\
732              echo "Please run \"make distclean\" and retry" >&2 ;\
733              exit 1 ;                                   \
734            fi;                                          \
735            echo "speedo: unpacking gnupg not needed";   \
736          elif [ -n "$$$${git}" ]; then                  \
737            echo "speedo: unpacking $(1) from $$$${git}:$$$${gitref}"; \
738            git clone -b "$$$${gitref}" "$$$${git}" "$$$${pkg}"; \
739            cd "$$$${pkg}";                              \
740            AUTOGEN_SH_SILENT=1 ./autogen.sh;            \
741          elif [ -n "$$$${tar}" ]; then                  \
742            echo "speedo: unpacking $(1) from $$$${tar}"; \
743            case "$$$${tar}" in                          \
744              *.gz) opt=z ;;                             \
745              *.bz2) opt=j ;;                            \
746              *.xz) opt=J ;;                             \
747              *) opt= ;;                                 \
748            esac;                                        \
749            [ -f tmp.tgz ] && rm tmp.tgz;                \
750            case "$$$${tar}" in                          \
751              /*) tar x$$$${opt}f - < $$$${tar} ;;       \
752              *)  wget -q -O - $$$${tar} | tee tmp.tgz | tar x$$$${opt}f - ;; \
753            esac;                                        \
754            if [ -f tmp.tgz ]; then                      \
755              if [ -n "$$$${sha1}" ]; then               \
756                tmp=$$$$($(SHA1SUM) <tmp.tgz|cut -d' ' -f1);\
757                if [ "$$$${tmp}" != "$$$${sha1}" ]; then \
758                  echo "speedo:";                        \
759                  echo "speedo: ERROR: checksum mismatch for $(1)";\
760                  echo "speedo:";                        \
761                  exit 1;                                \
762                fi;                                      \
763              else                                       \
764                echo "speedo:";                          \
765                echo "speedo: Warning: No checksum known for $(1)";\
766                echo "speedo:";                          \
767              fi;                                        \
768              rm tmp.tgz;                                \
769            fi;                                          \
770            base=`echo "$$$${tar}" | sed -e 's,^.*/,,'   \
771                  | sed -e 's,\.tar.*$$$$,,'`;           \
772            mv $$$${base} $(1);                          \
773            patch="$(patdir)/$(1)-$$$${base#$(1)-}.patch";\
774            if [ -x "$$$${patch}" ]; then                \
775              echo "speedo: applying patch $$$${patch}"; \
776              cd $(1); "$$$${patch}";                    \
777            elif [ -f "$$$${patch}" ]; then              \
778              echo "speedo: warning: $$$${patch} is not executable"; \
779            fi;                                          \
780          else                                           \
781            echo "speedo: unpacking $(1) from UNKNOWN";  \
782          fi)
783         @touch $(stampdir)/stamp-$(1)-00-unpack
784
785 $(stampdir)/stamp-$(1)-01-configure: $(stampdir)/stamp-$(1)-00-unpack
786         @echo "speedo: configuring $(1)"
787 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
788         @echo "speedo: configure run not required"
789 else ifneq ($(findstring $(1),$(speedo_gnupg_style)),)
790         @($(call SETVARS,$(1));                         \
791          mkdir "$$$${pkgbdir}";                         \
792          cd "$$$${pkgbdir}";                            \
793          if [ -n "$(speedo_autogen_buildopt)" ]; then   \
794             eval AUTOGEN_SH_SILENT=1 w32root="$(idir)"  \
795                "$$$${pkgsdir}/autogen.sh"               \
796                $(speedo_autogen_buildopt)               \
797                $$$${pkgcfg} $$$${pkgextracflags};       \
798          else                                           \
799             eval "$$$${pkgsdir}/configure"              \
800                --silent                                 \
801                --enable-maintainer-mode                 \
802                --prefix="$(idir)"                       \
803                $$$${pkgcfg} $$$${pkgextracflags};       \
804          fi)
805 else
806         @($(call SETVARS,$(1));                         \
807          mkdir "$$$${pkgbdir}";                         \
808          cd "$$$${pkgbdir}";                            \
809          eval "$$$${pkgsdir}/configure"                 \
810              --silent $(speedo_host_build_option)       \
811              --prefix="$(idir)"                         \
812              $$$${pkgcfg}  $$$${pkgextracflags};        \
813          )
814 endif
815         @touch $(stampdir)/stamp-$(1)-01-configure
816
817 # Note that unpack has no 64 bit version becuase it is just the source.
818 # Fixme: We should use templates to create the standard and w64
819 # version of these rules.
820 $(stampdir)/stamp-w64-$(1)-01-configure: $(stampdir)/stamp-$(1)-00-unpack
821         @echo "speedo: configuring $(1) (64 bit)"
822 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
823         @echo "speedo: configure run not required"
824 else ifneq ($(findstring $(1),$(speedo_gnupg_style)),)
825         @($(call SETVARS_W64,$(1));                     \
826          mkdir "$$$${pkgbdir}";                         \
827          cd "$$$${pkgbdir}";                            \
828          if [ -n "$(speedo_autogen_buildopt)" ]; then   \
829             eval AUTOGEN_SH_SILENT=1 w64root="$(idir6)" \
830                "$$$${pkgsdir}/autogen.sh"               \
831                $(speedo_autogen_buildopt6)              \
832                $$$${pkgcfg} $$$${pkgextracflags};       \
833          else                                           \
834             eval "$$$${pkgsdir}/configure"              \
835                --silent                                 \
836                --enable-maintainer-mode                 \
837                --prefix="$(idir6)"                      \
838                $$$${pkgcfg} $$$${pkgextracflags};       \
839          fi)
840 else
841         @($(call SETVARS_W64,$(1));                     \
842          mkdir "$$$${pkgbdir}";                         \
843          cd "$$$${pkgbdir}";                            \
844          eval "$$$${pkgsdir}/configure"                 \
845              --silent $(speedo_host_build_option6)      \
846              --prefix="$(idir6)"                        \
847              $$$${pkgcfg} $$$${pkgextracflags};         \
848          )
849 endif
850         @touch $(stampdir)/stamp-w64-$(1)-01-configure
851
852
853 $(stampdir)/stamp-$(1)-02-make: $(stampdir)/stamp-$(1)-01-configure
854         @echo "speedo: making $(1)"
855 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
856         @($(call SETVARS,$(1));                         \
857           cd "$$$${pkgsdir}";                           \
858           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
859           if test "$$$${pkg}" = zlib -a "$(TARGETOS)" != w32 ; then \
860             ./configure --prefix="$(idir)" ; \
861           fi ;\
862           $(MAKE) --no-print-directory $(speedo_makeopt) $$$${pkgmkargs} V=0)
863 else
864         @($(call SETVARS,$(1));                         \
865           cd "$$$${pkgbdir}";                           \
866           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
867           $(MAKE) --no-print-directory $(speedo_makeopt) $$$${pkgmkargs} V=0)
868 endif
869         @touch $(stampdir)/stamp-$(1)-02-make
870
871 $(stampdir)/stamp-w64-$(1)-02-make: $(stampdir)/stamp-w64-$(1)-01-configure
872         @echo "speedo: making $(1) (64 bit)"
873 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
874         @($(call SETVARS_W64,$(1));                             \
875           cd "$$$${pkgsdir}";                           \
876           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
877           $(MAKE) --no-print-directory $(speedo_makeopt) $$$${pkgmkargs} V=0)
878 else
879         @($(call SETVARS_W64,$(1));                             \
880           cd "$$$${pkgbdir}";                           \
881           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
882           $(MAKE) --no-print-directory $(speedo_makeopt) $$$${pkgmkargs} V=0)
883 endif
884         @touch $(stampdir)/stamp-w64-$(1)-02-make
885
886 # Note that post_install must come last because it may be empty and
887 # "; ;" is a syntax error.
888 $(stampdir)/stamp-$(1)-03-install: $(stampdir)/stamp-$(1)-02-make
889         @echo "speedo: installing $(1)"
890 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
891         @($(call SETVARS,$(1));                         \
892           cd "$$$${pkgsdir}";                           \
893           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
894           $(MAKE) --no-print-directory $$$${pkgmkargs_inst} install V=0;\
895           $(call speedo_pkg_$(call FROB_macro,$(1))_post_install))
896 else
897         @($(call SETVARS,$(1));                         \
898           cd "$$$${pkgbdir}";                           \
899           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
900           $(MAKE) --no-print-directory $$$${pkgmkargs_inst} install-strip V=0;\
901           $(call speedo_pkg_$(call FROB_macro,$(1))_post_install))
902 endif
903         touch $(stampdir)/stamp-$(1)-03-install
904
905 $(stampdir)/stamp-w64-$(1)-03-install: $(stampdir)/stamp-w64-$(1)-02-make
906         @echo "speedo: installing $(1) (64 bit)"
907 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
908         @($(call SETVARS_W64,$(1));                             \
909           cd "$$$${pkgsdir}";                           \
910           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
911           $(MAKE) --no-print-directory $$$${pkgmkargs_inst} install V=0;\
912           $(call speedo_pkg_$(call FROB_macro,$(1))_post_install))
913 else
914         @($(call SETVARS_W64,$(1));                             \
915           cd "$$$${pkgbdir}";                           \
916           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
917           $(MAKE) --no-print-directory $$$${pkgmkargs_inst} install-strip V=0;\
918           $(call speedo_pkg_$(call FROB_macro,$(1))_post_install))
919 endif
920         touch $(stampdir)/stamp-w64-$(1)-03-install
921
922 $(stampdir)/stamp-final-$(1): $(stampdir)/stamp-$(1)-03-install
923         @echo "speedo: $(1) done"
924         @touch $(stampdir)/stamp-final-$(1)
925
926 $(stampdir)/stamp-w64-final-$(1): $(stampdir)/stamp-w64-$(1)-03-install
927         @echo "speedo: $(1) (64 bit) done"
928         @touch $(stampdir)/stamp-w64-final-$(1)
929
930 .PHONY : clean-$(1)
931 clean-$(1):
932         @echo "speedo: uninstalling $(1)"
933         @($(call SETVARS,$(1));                           \
934          (cd "$$$${pkgbdir}" 2>/dev/null &&               \
935           $(MAKE) --no-print-directory                    \
936            $$$${pkgmkargs_uninst} uninstall V=0 ) || true;\
937          if [ "$(1)" = "gnupg" ]; then                    \
938            rm -fR "$$$${pkgbdir}" || true                ;\
939          else                                             \
940            rm -fR "$$$${pkgsdir}" "$$$${pkgbdir}" || true;\
941          fi)
942         -rm -f $(stampdir)/stamp-final-$(1) $(stampdir)/stamp-$(1)-*
943
944
945 .PHONY : build-$(1)
946 build-$(1): $(stampdir)/stamp-final-$(1)
947
948
949 .PHONY : report-$(1)
950 report-$(1):
951         @($(call SETVARS,$(1));                         \
952          echo -n $(1):\  ;                              \
953          if [ -n "$$$${git}" ]; then                    \
954            if [ -e "$$$${pkgsdir}/.git" ]; then         \
955              cd "$$$${pkgsdir}" &&                      \
956              git describe ;                             \
957            else                                         \
958              echo missing;                              \
959            fi                                           \
960          elif [ -n "$$$${tar}" ]; then                  \
961            base=`echo "$$$${tar}" | sed -e 's,^.*/,,'   \
962                  | sed -e 's,\.tar.*$$$$,,'`;           \
963            echo $$$${base} ;                            \
964          fi)
965
966 endef
967
968
969 # Insert the template for each source package.
970 $(foreach spkg, $(speedo_spkgs), $(eval $(call SPKG_template,$(spkg))))
971
972 $(stampdir)/stamp-final: $(stampdir)/stamp-directories
973 ifeq ($(TARGETOS),w32)
974 $(stampdir)/stamp-final: $(addprefix $(stampdir)/stamp-w64-final-,$(speedo_w64_build_list))
975 endif
976 $(stampdir)/stamp-final: $(addprefix $(stampdir)/stamp-final-,$(speedo_build_list))
977         touch $(stampdir)/stamp-final
978
979 all-speedo: $(stampdir)/stamp-final
980
981 report-speedo: $(addprefix report-,$(speedo_build_list))
982
983 # Just to check if we catched all stamps.
984 clean-stamps:
985         $(RM) -fR $(stampdir)
986
987 clean-speedo:
988         $(RM) -fR PLAY
989
990
991 #
992 # Windows installer
993 #
994 # {{{
995 ifeq ($(TARGETOS),w32)
996
997 dist-source: all
998         for i in 00 01 02 03; do sleep 1;touch PLAY/stamps/stamp-*-${i}-*;done
999         (set -e;\
1000          tarname="$(INST_NAME)-$(INST_VERSION)_$(BUILD_ISODATE).tar" ;\
1001          [ -f "$$tarname" ] && rm "$$tarname" ;\
1002          tar -C $(topsrc) -cf "$$tarname" --exclude-backups --exclude-vc \
1003              --transform='s,^\./,$(INST_NAME)-$(INST_VERSION)/,' \
1004              --anchored --exclude './PLAY' . ;\
1005          tar --totals -rf "$$tarname" --exclude-backups --exclude-vc \
1006               --transform='s,^,$(INST_NAME)-$(INST_VERSION)/,' \
1007              PLAY/stamps/stamp-*-00-unpack PLAY/src ;\
1008          xz "$$tarname" ;\
1009         )
1010
1011
1012 $(bdir)/NEWS.tmp: $(topsrc)/NEWS
1013         sed -e '/^#/d' <$(topsrc)/NEWS >$(bdir)/NEWS.tmp
1014
1015 $(bdir)/README.txt: $(bdir)/NEWS.tmp $(w32src)/README.txt \
1016                     $(w32src)/pkg-copyright.txt
1017         sed -e '/^;.*/d;' \
1018         -e '/!NEWSFILE!/{r NEWS.tmp' -e 'd;}' \
1019         -e '/!PKG-COPYRIGHT!/{r $(w32src)/pkg-copyright.txt' -e 'd;}' \
1020         -e 's,!VERSION!,$(INST_VERSION),g' \
1021            < $(w32src)/README.txt \
1022            | awk '{printf "%s\r\n", $$0}' >$(bdir)/README.txt
1023
1024 $(bdir)/g4wihelp.dll: $(w32src)/g4wihelp.c $(w32src)/exdll.h
1025         (set -e; cd $(bdir); \
1026          $(W32CC) -I. -shared -O2 -o g4wihelp.dll $(w32src)/g4wihelp.c \
1027                   -lwinmm -lgdi32; \
1028          $(STRIP) g4wihelp.dll)
1029
1030 w32_insthelpers: $(bdir)/g4wihelp.dll
1031
1032 $(bdir)/inst-options.ini: $(w32src)/inst-options.ini
1033         cat $(w32src)/inst-options.ini >$(bdir)/inst-options.ini
1034
1035 installer: all w32_insthelpers $(w32src)/inst-options.ini $(bdir)/README.txt
1036         $(MAKENSIS) -V2 \
1037                     -DINST_DIR=$(idir) \
1038                     -DINST6_DIR=$(idir6) \
1039                     -DBUILD_DIR=$(bdir) \
1040                     -DTOP_SRCDIR=$(topsrc) \
1041                     -DW32_SRCDIR=$(w32src) \
1042                     -DBUILD_ISODATE=$(BUILD_ISODATE) \
1043                     -DNAME=$(INST_NAME) \
1044                     -DVERSION=$(INST_VERSION) \
1045                     -DPROD_VERSION=$(INST_PROD_VERSION) \
1046                     $(w32src)/inst.nsi
1047         @echo "Ready: $(idir)/$(INST_NAME)-$(INST_VERSION)"
1048
1049 endif
1050 # }}} W32
1051
1052
1053 #
1054 # Check availibility of standard tools
1055 #
1056 check-tools:
1057
1058
1059 #
1060 # Mark phony targets
1061 #
1062 .PHONY: all all-speedo report-speedo clean-stamps clean-speedo installer \
1063         w32_insthelpers check-tools