speedo: Add INSTALL_PREFIX feature.
[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=w32
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 speedo_pkg_gnupg_configure = --enable-gpg2-is-gpg --disable-g13
386 speedo_pkg_gnupg_extracflags = -g
387
388 define speedo_pkg_gnupg_post_install
389 (set -e; \
390  sed -n  's/.*PACKAGE_VERSION "\(.*\)"/\1/p' config.h >$(idir)/INST_VERSION; \
391  sed -n  's/.*W32INFO_VI_PRODUCTVERSION \(.*\)/\1/p' common/w32info-rc.h \
392     |sed 's/,/./g' >$(idir)/INST_PROD_VERSION )
393 endef
394
395
396 # The LDFLAGS is needed for -lintl for glib.
397 speedo_pkg_gpgme_configure = \
398         --enable-static --enable-w32-glib --disable-w32-qt \
399         --with-gpg-error-prefix=$(idir) \
400         LDFLAGS=-L$(idir)/lib
401
402 speedo_pkg_pinentry_configure = \
403         --disable-pinentry-qt --disable-pinentry-qt4 --disable-pinentry-gtk \
404         --enable-pinentry-gtk2 \
405         --with-glib-prefix=$(idir) --with-gtk-prefix=$(idir) \
406         CPPFLAGS=-I$(idir)/include   \
407         LDFLAGS=-L$(idir)/lib        \
408         CXXFLAGS=-static-libstdc++
409
410 speedo_pkg_gpa_configure = \
411         --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir) \
412         --with-gpgme-prefix=$(idir) --with-zlib=$(idir) \
413         --with-libassuan-prefix=$(idir) --with-gpg-error-prefix=$(idir)
414
415 speedo_pkg_gpgex_configure = \
416         --with-gpg-error-prefix=$(idir) \
417         --with-libassuan-prefix=$(idir)
418
419 speedo_pkg_w64_gpgex_configure = \
420         --with-gpg-error-prefix=$(idir6) \
421         --with-libassuan-prefix=$(idir6)
422
423
424 #
425 # External packages
426 #
427
428 ifeq ($(TARGETOS),w32)
429 speedo_pkg_zlib_make_args = \
430         -fwin32/Makefile.gcc PREFIX=$(host)- IMPLIB=libz.dll.a
431
432 speedo_pkg_zlib_make_args_inst = \
433         -fwin32/Makefile.gcc \
434         BINARY_PATH=$(idir)/bin INCLUDE_PATH=$(idir)/include \
435         LIBRARY_PATH=$(idir)/lib SHARED_MODE=1 IMPLIB=libz.dll.a
436
437 # Zlib needs some special magic to generate a libtool file.
438 # We also install the pc file here.
439 define speedo_pkg_zlib_post_install
440 (set -e; mkdir $(idir)/lib/pkgconfig || true;           \
441 cp $(auxsrc)/zlib.pc $(idir)/lib/pkgconfig/;            \
442 cd $(idir);                                             \
443 echo "# Generated by libtool" > lib/libz.la             \
444 echo "dlname='../bin/zlib1.dll'" >> lib/libz.la;        \
445 echo "library_names='libz.dll.a'" >> lib/libz.la;       \
446 echo "old_library='libz.a'" >> lib/libz.la;             \
447 echo "dependency_libs=''" >> lib/libz.la;               \
448 echo "current=1" >> lib/libz.la;                        \
449 echo "age=2" >> lib/libz.la;                            \
450 echo "revision=5" >> lib/libz.la;                       \
451 echo "installed=yes" >> lib/libz.la;                    \
452 echo "shouldnotlink=no" >> lib/libz.la;                 \
453 echo "dlopen=''" >> lib/libz.la;                        \
454 echo "dlpreopen=''" >> lib/libz.la;                     \
455 echo "libdir=\"$(idir)/lib\"" >> lib/libz.la)
456 endef
457
458 endif
459
460 ifeq ($(TARGETOS),w32)
461 speedo_pkg_bzip2_make_args = \
462         CC="$(host)-gcc" AR="$(host)-ar" RANLIB="$(host)-ranlib"
463
464 speedo_pkg_bzip2_make_args_inst = \
465         PREFIX=$(idir) CC="$(host)-gcc" AR="$(host)-ar" RANLIB="$(host)-ranlib"
466 endif
467
468 speedo_pkg_w64_libiconv_configure = \
469         --enable-shared=no --enable-static=yes
470
471 speedo_pkg_gettext_configure = \
472         --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
473         CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
474 speedo_pkg_w64_gettext_configure = \
475         --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
476         CPPFLAGS=-I$(idir6)/include LDFLAGS=-L$(idir6)/lib
477 speedo_pkg_gettext_extracflags = -O2
478 # We only need gettext-runtime and there is sadly no top level
479 # configure option for this
480 speedo_pkg_gettext_make_dir = gettext-runtime
481
482
483 speedo_pkg_glib_configure = \
484         --disable-modular-tests \
485         --with-libiconv=gnu \
486         CPPFLAGS=-I$(idir)/include \
487         LDFLAGS=-L$(idir)/lib \
488         CCC=$(host)-g++ \
489         LIBFFI_CFLAGS=-I$(idir)/lib/libffi-$(libffi_ver)/include \
490         LIBFFI_LIBS=\"-L$(idir)/lib -lffi\"
491 ifeq ($(TARGETOS),w32)
492 speedo_pkg_glib_extracflags = -march=i486
493 endif
494
495 ifeq ($(TARGETOS),w32)
496 speedo_pkg_libpng_configure = \
497         CPPFLAGS=\"-I$(idir)/include -DPNG_BUILD_DLL\" \
498         LDFLAGS=\"-L$(idir)/lib\" LIBPNG_DEFINES=\"-DPNG_BUILD_DLL\"
499 else
500 speedo_pkg_libpng_configure = \
501         CPPFLAGS=\"-I$(idir)/include\" \
502         LDFLAGS=\"-L$(idir)/lib\"
503 endif
504
505 ifneq ($(TARGETOS),w32)
506 speedo_pkg_gdk_pixbuf_configure = --without-libtiff --without-libjpeg
507 endif
508
509 speedo_pkg_pixman_configure = \
510         CPPFLAGS=-I$(idir)/include \
511         LDFLAGS=-L$(idir)/lib
512
513 ifeq ($(TARGETOS),w32)
514 speedo_pkg_cairo_configure = \
515         --disable-qt --disable-ft --disable-fc \
516         --enable-win32 --enable-win32-font \
517         CPPFLAGS=-I$(idir)/include \
518         LDFLAGS=-L$(idir)/lib
519 else
520 speedo_pkg_cairo_configure = \
521         --disable-qt \
522         CPPFLAGS=-I$(idir)/include \
523         LDFLAGS=-L$(idir)/lib
524 endif
525
526 speedo_pkg_pango_configure = \
527         --disable-gtk-doc  \
528         CPPFLAGS=-I$(idir)/include \
529         LDFLAGS=-L$(idir)/lib
530
531 speedo_pkg_gtk__configure = \
532         --disable-cups \
533         CPPFLAGS=-I$(idir)/include \
534         LDFLAGS=-L$(idir)/lib
535
536
537 # ---------
538
539 all: all-speedo
540
541 report: report-speedo
542
543 clean: clean-speedo
544
545 ifeq ($(TARGETOS),w32)
546 STRIP = i686-w64-mingw32-strip
547 else
548 STRIP = strip
549 endif
550 W32CC = i686-w64-mingw32-gcc
551
552 -include config.mk
553
554 #
555 #  The generic speedo code
556 #
557
558 MKDIR=mkdir
559 MAKENSIS=makensis
560 SHA1SUM := $(shell $(topsrc)/build-aux/getswdb.sh --find-sha1sum)
561 ifeq ($(SHA1SUM),false)
562 $(error The sha1sum tool is missing)
563 endif
564
565
566 BUILD_ISODATE=$(shell date -u +%Y-%m-%d)
567
568 # The next two macros will work only after gnupg has been build.
569 INST_VERSION=$(shell head -1 $(idir)/INST_VERSION)
570 INST_PROD_VERSION=$(shell head -1 $(idir)/INST_PROD_VERSION)
571
572 # List with packages
573 speedo_build_list = $(speedo_spkgs)
574 speedo_w64_build_list = $(speedo_w64_spkgs)
575
576 # Determine build and host system
577 build := $(shell $(topsrc)/autogen.sh --silent --print-build)
578 ifeq ($(TARGETOS),w32)
579   speedo_autogen_buildopt := --build-w32
580   speedo_autogen_buildopt6 := --build-w64
581   host := $(shell $(topsrc)/autogen.sh --silent --print-host --build-w32)
582   host6:= $(shell $(topsrc)/autogen.sh --silent --print-host --build-w64)
583   speedo_host_build_option := --host=$(host) --build=$(build)
584   speedo_host_build_option6 := --host=$(host6) --build=$(build)
585   speedo_w32_cflags := -mms-bitfields
586 else
587   speedo_autogen_buildopt :=
588   host :=
589   speedo_host_build_option :=
590   speedo_w32_cflags :=
591 endif
592
593 ifeq ($(MAKE_J),)
594   speedo_makeopt=
595 else
596   speedo_makeopt=-j$(MAKE_J)
597 endif
598
599
600
601 # The playground area is our scratch area, where we unpack, build and
602 # install the packages.
603 $(stampdir)/stamp-directories:
604         $(MKDIR) $(root) || true
605         $(MKDIR) $(stampdir) || true
606         $(MKDIR) $(sdir)  || true
607         $(MKDIR) $(bdir)  || true
608         $(MKDIR) $(idir)   || true
609 ifeq ($(TARGETOS),w32)
610         $(MKDIR) $(bdir6)  || true
611         $(MKDIR) $(idir6)   || true
612 endif
613         touch $(stampdir)/stamp-directories
614
615 # Frob the name $1 by converting all '-' and '+' characters to '_'.
616 define FROB_macro
617 $(subst +,_,$(subst -,_,$(1)))
618 endef
619
620 # Get the variable $(1) (which may contain '-' and '+' characters).
621 define GETVAR
622 $($(call FROB_macro,$(1)))
623 endef
624
625 # Set a couple of common variables.
626 define SETVARS
627         pkg="$(1)";                                                     \
628         git="$(call GETVAR,speedo_pkg_$(1)_git)";                       \
629         gitref="$(call GETVAR,speedo_pkg_$(1)_gitref)";                 \
630         tar="$(call GETVAR,speedo_pkg_$(1)_tar)";                       \
631         sha1="$(call GETVAR,$(1)_sha1)";                                \
632         pkgsdir="$(sdir)/$(1)";                                         \
633         if [ "$(1)" = "gnupg" ]; then                                   \
634           git='';                                                       \
635           gitref='';                                                    \
636           tar='';                                                       \
637           pkgsdir="$(topsrc)";                                          \
638         fi;                                                             \
639         pkgbdir="$(bdir)/$(1)";                                         \
640         pkgcfg="$(call GETVAR,speedo_pkg_$(1)_configure)";              \
641         tmp="$(speedo_w32_cflags)                                       \
642              $(call GETVAR,speedo_pkg_$(1)_extracflags)";               \
643         if [ x$$$$(echo "$$$$tmp" | tr -d '[:space:]')x != xx ]; then   \
644           pkgextracflags="CFLAGS=\"$$$$tmp\"";                          \
645         else                                                            \
646           pkgextracflags=;                                              \
647         fi;                                                             \
648         pkgmkdir="$(call GETVAR,speedo_pkg_$(1)_make_dir)";             \
649         pkgmkargs="$(call GETVAR,speedo_pkg_$(1)_make_args)";           \
650         pkgmkargs_inst="$(call GETVAR,speedo_pkg_$(1)_make_args_inst)"; \
651         pkgmkargs_uninst="$(call GETVAR,speedo_pkg_$(1)_make_args_uninst)"; \
652         export PKG_CONFIG="/usr/bin/pkg-config";                        \
653         export PKG_CONFIG_PATH="$(idir)/lib/pkgconfig";                 \
654         [ "$(TARGETOS)" != native ] && export PKG_CONFIG_LIBDIR="";     \
655         export SYSROOT="$(idir)";                                       \
656         export PATH="$(idir)/bin:$${PATH}";                             \
657         export LD_LIBRARY_PATH="$(idir)/lib:$${LD_LIBRARY_PATH}"
658 endef
659
660 define SETVARS_W64
661         pkg="$(1)";                                                     \
662         git="$(call GETVAR,speedo_pkg_$(1)_git)";                       \
663         gitref="$(call GETVAR,speedo_pkg_$(1)_gitref)";                 \
664         tar="$(call GETVAR,speedo_pkg_$(1)_tar)";                       \
665         sha1="$(call GETVAR,$(1)_sha1)";                                \
666         pkgsdir="$(sdir)/$(1)";                                         \
667         if [ "$(1)" = "gnupg" ]; then                                   \
668           git='';                                                       \
669           gitref='';                                                    \
670           tar='';                                                       \
671           pkgsdir="$(topsrc)";                                          \
672         fi;                                                             \
673         pkgbdir="$(bdir6)/$(1)";                                        \
674         pkgcfg="$(call GETVAR,speedo_pkg_w64_$(1)_configure)";          \
675         tmp="$(speedo_w32_cflags)                                       \
676              $(call GETVAR,speedo_pkg_$(1)_extracflags)";               \
677         if [ x$$$$(echo "$$$$tmp" | tr -d '[:space:]')x != xx ]; then   \
678           pkgextracflags="CFLAGS=\"$$$$tmp\"";                          \
679         else                                                            \
680           pkgextracflags=;                                              \
681         fi;                                                             \
682         pkgmkdir="$(call GETVAR,speedo_pkg_$(1)_make_dir)";             \
683         pkgmkargs="$(call GETVAR,speedo_pkg_$(1)_make_args)";           \
684         pkgmkargs_inst="$(call GETVAR,speedo_pkg_$(1)_make_args_inst)"; \
685         pkgmkargs_uninst="$(call GETVAR,speedo_pkg_$(1)_make_args_uninst)"; \
686         export PKG_CONFIG="/usr/bin/pkg-config";                        \
687         export PKG_CONFIG_PATH="$(idir6)/lib/pkgconfig";                \
688         [ "$(TARGETOS)" != native ] && export PKG_CONFIG_LIBDIR="";     \
689         export SYSROOT="$(idir6)";                                      \
690         export PATH="$(idir6)/bin:$${PATH}";                            \
691         export LD_LIBRARY_PATH="$(idir6)/lib:$${LD_LIBRARY_PATH}"
692 endef
693
694
695 # Template for source packages.
696
697 # Note that the gnupg package is special: The package source dir is
698 # the same as the topsrc dir and thus we need to detect the gnupg
699 # package and cd to that directory.  We also test that no in-source build
700 # has been done.  autogen.sh is not run for gnupg.
701 #
702 define SPKG_template
703
704 $(stampdir)/stamp-$(1)-00-unpack: $(stampdir)/stamp-directories
705         @echo "speedo: /*"
706         @echo "speedo:  *   $(1)"
707         @echo "speedo:  */"
708         @(set -e; cd $(sdir);                           \
709          $(call SETVARS,$(1));                          \
710          if [ "$(WHAT)" = "this" ]; then                \
711            echo "speedo: using included source";        \
712          elif [ "$(1)" = "gnupg" ]; then                \
713            cd $$$${pkgsdir};                            \
714            if [ -f config.log ]; then                   \
715              echo "GnuPG has already been build in-source" >&2  ;\
716              echo "Please run \"make distclean\" and retry" >&2 ;\
717              exit 1 ;                                   \
718            fi;                                          \
719            echo "speedo: unpacking gnupg not needed";   \
720          elif [ -n "$$$${git}" ]; then                  \
721            echo "speedo: unpacking $(1) from $$$${git}:$$$${gitref}"; \
722            git clone -b "$$$${gitref}" "$$$${git}" "$$$${pkg}"; \
723            cd "$$$${pkg}";                              \
724            AUTOGEN_SH_SILENT=1 ./autogen.sh;            \
725          elif [ -n "$$$${tar}" ]; then                  \
726            echo "speedo: unpacking $(1) from $$$${tar}"; \
727            case "$$$${tar}" in                          \
728              *.gz) opt=z ;;                             \
729              *.bz2) opt=j ;;                            \
730              *.xz) opt=J ;;                             \
731              *) opt= ;;                                 \
732            esac;                                        \
733            [ -f tmp.tgz ] && rm tmp.tgz;                \
734            case "$$$${tar}" in                          \
735              /*) tar x$$$${opt}f - < $$$${tar} ;;       \
736              *)  wget -q -O - $$$${tar} | tee tmp.tgz | tar x$$$${opt}f - ;; \
737            esac;                                        \
738            if [ -f tmp.tgz ]; then                      \
739              if [ -n "$$$${sha1}" ]; then               \
740                tmp=$$$$($(SHA1SUM) <tmp.tgz|cut -d' ' -f1);\
741                if [ "$$$${tmp}" != "$$$${sha1}" ]; then \
742                  echo "speedo:";                        \
743                  echo "speedo: ERROR: checksum mismatch for $(1)";\
744                  echo "speedo:";                        \
745                  exit 1;                                \
746                fi;                                      \
747              else                                       \
748                echo "speedo:";                          \
749                echo "speedo: Warning: No checksum known for $(1)";\
750                echo "speedo:";                          \
751              fi;                                        \
752              rm tmp.tgz;                                \
753            fi;                                          \
754            base=`echo "$$$${tar}" | sed -e 's,^.*/,,'   \
755                  | sed -e 's,\.tar.*$$$$,,'`;           \
756            mv $$$${base} $(1);                          \
757            patch="$(patdir)/$(1)-$$$${base#$(1)-}.patch";\
758            if [ -x "$$$${patch}" ]; then                \
759              echo "speedo: applying patch $$$${patch}"; \
760              cd $(1); "$$$${patch}";                    \
761            elif [ -f "$$$${patch}" ]; then              \
762              echo "speedo: warning: $$$${patch} is not executable"; \
763            fi;                                          \
764          else                                           \
765            echo "speedo: unpacking $(1) from UNKNOWN";  \
766          fi)
767         @touch $(stampdir)/stamp-$(1)-00-unpack
768
769 $(stampdir)/stamp-$(1)-01-configure: $(stampdir)/stamp-$(1)-00-unpack
770         @echo "speedo: configuring $(1)"
771 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
772         @echo "speedo: configure run not required"
773 else ifneq ($(findstring $(1),$(speedo_gnupg_style)),)
774         @($(call SETVARS,$(1));                         \
775          mkdir "$$$${pkgbdir}";                         \
776          cd "$$$${pkgbdir}";                            \
777          if [ -n "$(speedo_autogen_buildopt)" ]; then   \
778             eval AUTOGEN_SH_SILENT=1 w32root="$(idir)"  \
779                "$$$${pkgsdir}/autogen.sh"               \
780                $(speedo_autogen_buildopt)               \
781                $$$${pkgcfg} $$$${pkgextracflags};       \
782          else                                           \
783             eval "$$$${pkgsdir}/configure"              \
784                --silent                                 \
785                --enable-maintainer-mode                 \
786                --prefix="$(idir)"                       \
787                $$$${pkgcfg} $$$${pkgextracflags};       \
788          fi)
789 else
790         @($(call SETVARS,$(1));                         \
791          mkdir "$$$${pkgbdir}";                         \
792          cd "$$$${pkgbdir}";                            \
793          eval "$$$${pkgsdir}/configure"                 \
794              --silent $(speedo_host_build_option)       \
795              --prefix="$(idir)"                         \
796              $$$${pkgcfg}  $$$${pkgextracflags};        \
797          )
798 endif
799         @touch $(stampdir)/stamp-$(1)-01-configure
800
801 # Note that unpack has no 64 bit version becuase it is just the source.
802 # Fixme: We should use templates to create the standard and w64
803 # version of these rules.
804 $(stampdir)/stamp-w64-$(1)-01-configure: $(stampdir)/stamp-$(1)-00-unpack
805         @echo "speedo: configuring $(1) (64 bit)"
806 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
807         @echo "speedo: configure run not required"
808 else ifneq ($(findstring $(1),$(speedo_gnupg_style)),)
809         @($(call SETVARS_W64,$(1));                     \
810          mkdir "$$$${pkgbdir}";                         \
811          cd "$$$${pkgbdir}";                            \
812          if [ -n "$(speedo_autogen_buildopt)" ]; then   \
813             eval AUTOGEN_SH_SILENT=1 w64root="$(idir6)" \
814                "$$$${pkgsdir}/autogen.sh"               \
815                $(speedo_autogen_buildopt6)              \
816                $$$${pkgcfg} $$$${pkgextracflags};       \
817          else                                           \
818             eval "$$$${pkgsdir}/configure"              \
819                --silent                                 \
820                --enable-maintainer-mode                 \
821                --prefix="$(idir6)"                      \
822                $$$${pkgcfg} $$$${pkgextracflags};       \
823          fi)
824 else
825         @($(call SETVARS_W64,$(1));                     \
826          mkdir "$$$${pkgbdir}";                         \
827          cd "$$$${pkgbdir}";                            \
828          eval "$$$${pkgsdir}/configure"                 \
829              --silent $(speedo_host_build_option6)      \
830              --prefix="$(idir6)"                        \
831              $$$${pkgcfg} $$$${pkgextracflags};         \
832          )
833 endif
834         @touch $(stampdir)/stamp-w64-$(1)-01-configure
835
836
837 $(stampdir)/stamp-$(1)-02-make: $(stampdir)/stamp-$(1)-01-configure
838         @echo "speedo: making $(1)"
839 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
840         @($(call SETVARS,$(1));                         \
841           cd "$$$${pkgsdir}";                           \
842           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
843           if test "$$$${pkg}" = zlib -a "$(TARGETOS)" != w32 ; then \
844             ./configure --prefix="$(idir)" ; \
845           fi ;\
846           $(MAKE) --no-print-directory $(speedo_makeopt) $$$${pkgmkargs} V=0)
847 else
848         @($(call SETVARS,$(1));                         \
849           cd "$$$${pkgbdir}";                           \
850           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
851           $(MAKE) --no-print-directory $(speedo_makeopt) $$$${pkgmkargs} V=0)
852 endif
853         @touch $(stampdir)/stamp-$(1)-02-make
854
855 $(stampdir)/stamp-w64-$(1)-02-make: $(stampdir)/stamp-w64-$(1)-01-configure
856         @echo "speedo: making $(1) (64 bit)"
857 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
858         @($(call SETVARS_W64,$(1));                             \
859           cd "$$$${pkgsdir}";                           \
860           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
861           $(MAKE) --no-print-directory $(speedo_makeopt) $$$${pkgmkargs} V=0)
862 else
863         @($(call SETVARS_W64,$(1));                             \
864           cd "$$$${pkgbdir}";                           \
865           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
866           $(MAKE) --no-print-directory $(speedo_makeopt) $$$${pkgmkargs} V=0)
867 endif
868         @touch $(stampdir)/stamp-w64-$(1)-02-make
869
870 # Note that post_install must come last because it may be empty and
871 # "; ;" is a syntax error.
872 $(stampdir)/stamp-$(1)-03-install: $(stampdir)/stamp-$(1)-02-make
873         @echo "speedo: installing $(1)"
874 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
875         @($(call SETVARS,$(1));                         \
876           cd "$$$${pkgsdir}";                           \
877           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
878           $(MAKE) --no-print-directory $$$${pkgmkargs_inst} install V=0;\
879           $(call speedo_pkg_$(call FROB_macro,$(1))_post_install))
880 else
881         @($(call SETVARS,$(1));                         \
882           cd "$$$${pkgbdir}";                           \
883           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
884           $(MAKE) --no-print-directory $$$${pkgmkargs_inst} install-strip V=0;\
885           $(call speedo_pkg_$(call FROB_macro,$(1))_post_install))
886 endif
887         touch $(stampdir)/stamp-$(1)-03-install
888
889 $(stampdir)/stamp-w64-$(1)-03-install: $(stampdir)/stamp-w64-$(1)-02-make
890         @echo "speedo: installing $(1) (64 bit)"
891 ifneq ($(findstring $(1),$(speedo_make_only_style)),)
892         @($(call SETVARS_W64,$(1));                             \
893           cd "$$$${pkgsdir}";                           \
894           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
895           $(MAKE) --no-print-directory $$$${pkgmkargs_inst} install V=0;\
896           $(call speedo_pkg_$(call FROB_macro,$(1))_post_install))
897 else
898         @($(call SETVARS_W64,$(1));                             \
899           cd "$$$${pkgbdir}";                           \
900           test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
901           $(MAKE) --no-print-directory $$$${pkgmkargs_inst} install-strip V=0;\
902           $(call speedo_pkg_$(call FROB_macro,$(1))_post_install))
903 endif
904         touch $(stampdir)/stamp-w64-$(1)-03-install
905
906 $(stampdir)/stamp-final-$(1): $(stampdir)/stamp-$(1)-03-install
907         @echo "speedo: $(1) done"
908         @touch $(stampdir)/stamp-final-$(1)
909
910 $(stampdir)/stamp-w64-final-$(1): $(stampdir)/stamp-w64-$(1)-03-install
911         @echo "speedo: $(1) (64 bit) done"
912         @touch $(stampdir)/stamp-w64-final-$(1)
913
914 .PHONY : clean-$(1)
915 clean-$(1):
916         @echo "speedo: uninstalling $(1)"
917         @($(call SETVARS,$(1));                           \
918          (cd "$$$${pkgbdir}" 2>/dev/null &&               \
919           $(MAKE) --no-print-directory                    \
920            $$$${pkgmkargs_uninst} uninstall V=0 ) || true;\
921          if [ "$(1)" = "gnupg" ]; then                    \
922            rm -fR "$$$${pkgbdir}" || true                ;\
923          else                                             \
924            rm -fR "$$$${pkgsdir}" "$$$${pkgbdir}" || true;\
925          fi)
926         -rm -f $(stampdir)/stamp-final-$(1) $(stampdir)/stamp-$(1)-*
927
928
929 .PHONY : build-$(1)
930 build-$(1): $(stampdir)/stamp-final-$(1)
931
932
933 .PHONY : report-$(1)
934 report-$(1):
935         @($(call SETVARS,$(1));                         \
936          echo -n $(1):\  ;                              \
937          if [ -n "$$$${git}" ]; then                    \
938            if [ -e "$$$${pkgsdir}/.git" ]; then         \
939              cd "$$$${pkgsdir}" &&                      \
940              git describe ;                             \
941            else                                         \
942              echo missing;                              \
943            fi                                           \
944          elif [ -n "$$$${tar}" ]; then                  \
945            base=`echo "$$$${tar}" | sed -e 's,^.*/,,'   \
946                  | sed -e 's,\.tar.*$$$$,,'`;           \
947            echo $$$${base} ;                            \
948          fi)
949
950 endef
951
952
953 # Insert the template for each source package.
954 $(foreach spkg, $(speedo_spkgs), $(eval $(call SPKG_template,$(spkg))))
955
956 $(stampdir)/stamp-final: $(stampdir)/stamp-directories
957 ifeq ($(TARGETOS),w32)
958 $(stampdir)/stamp-final: $(addprefix $(stampdir)/stamp-w64-final-,$(speedo_w64_build_list))
959 endif
960 $(stampdir)/stamp-final: $(addprefix $(stampdir)/stamp-final-,$(speedo_build_list))
961         touch $(stampdir)/stamp-final
962
963 all-speedo: $(stampdir)/stamp-final
964
965 report-speedo: $(addprefix report-,$(speedo_build_list))
966
967 # Just to check if we catched all stamps.
968 clean-stamps:
969         $(RM) -fR $(stampdir)
970
971 clean-speedo:
972         $(RM) -fR PLAY
973
974
975 #
976 # Windows installer
977 #
978
979 dist-source: all
980         for i in 00 01 02 03; do sleep 1;touch PLAY/stamps/stamp-*-${i}-*;done
981         (set -e;\
982          tarname="$(INST_NAME)-$(INST_VERSION)_$(BUILD_ISODATE).tar" ;\
983          [ -f "$$tarname" ] && rm "$$tarname" ;\
984          tar -C $(topsrc) -cf "$$tarname" --exclude-backups --exclude-vc \
985              --transform='s,^\./,$(INST_NAME)-$(INST_VERSION)/,' \
986              --anchored --exclude './PLAY' . ;\
987          tar --totals -rf "$$tarname" --exclude-backups --exclude-vc \
988               --transform='s,^,$(INST_NAME)-$(INST_VERSION)/,' \
989              PLAY/stamps/stamp-*-00-unpack PLAY/src ;\
990          xz "$$tarname" ;\
991         )
992
993
994 $(bdir)/NEWS.tmp: $(topsrc)/NEWS
995         sed -e '/^#/d' <$(topsrc)/NEWS >$(bdir)/NEWS.tmp
996
997 $(bdir)/README.txt: $(bdir)/NEWS.tmp $(w32src)/README.txt \
998                     $(w32src)/pkg-copyright.txt
999         sed -e '/^;.*/d;' \
1000         -e '/!NEWSFILE!/{r NEWS.tmp' -e 'd;}' \
1001         -e '/!PKG-COPYRIGHT!/{r $(w32src)/pkg-copyright.txt' -e 'd;}' \
1002         -e 's,!VERSION!,$(INST_VERSION),g' \
1003            < $(w32src)/README.txt \
1004            | awk '{printf "%s\r\n", $$0}' >$(bdir)/README.txt
1005
1006 $(bdir)/g4wihelp.dll: $(w32src)/g4wihelp.c $(w32src)/exdll.h
1007         (set -e; cd $(bdir); \
1008          $(W32CC) -I. -shared -O2 -o g4wihelp.dll $(w32src)/g4wihelp.c \
1009                   -lwinmm -lgdi32; \
1010          $(STRIP) g4wihelp.dll)
1011
1012 w32_insthelpers: $(bdir)/g4wihelp.dll
1013
1014 $(bdir)/inst-options.ini: $(w32src)/inst-options.ini
1015         cat $(w32src)/inst-options.ini >$(bdir)/inst-options.ini
1016
1017 installer: all w32_insthelpers $(w32src)/inst-options.ini $(bdir)/README.txt
1018         $(MAKENSIS) -V2 \
1019                     -DINST_DIR=$(idir) \
1020                     -DINST6_DIR=$(idir6) \
1021                     -DBUILD_DIR=$(bdir) \
1022                     -DTOP_SRCDIR=$(topsrc) \
1023                     -DW32_SRCDIR=$(w32src) \
1024                     -DBUILD_ISODATE=$(BUILD_ISODATE) \
1025                     -DNAME=$(INST_NAME) \
1026                     -DVERSION=$(INST_VERSION) \
1027                     -DPROD_VERSION=$(INST_PROD_VERSION) \
1028                     $(w32src)/inst.nsi
1029         @echo "Ready: $(idir)/$(INST_NAME)-$(INST_VERSION)"
1030
1031 #
1032 # Check availibility of standard tools
1033 #
1034 check-tools:
1035
1036
1037 #
1038 # Mark phony targets
1039 #
1040 .PHONY: all all-speedo report-speedo clean-stamps clean-speedo installer \
1041         w32_insthelpers check-tools