[Gpg4win-commits] r1190 - in trunk: . m4 src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Jun 20 00:53:28 CEST 2009


Author: marcus
Date: 2009-06-20 00:53:27 +0200 (Sat, 20 Jun 2009)
New Revision: 1190

Modified:
   trunk/ChangeLog
   trunk/m4/gpg4win.m4
   trunk/src/gpg4win.mk.in
Log:
2009-06-20  Marcus Brinkmann  <marcus at g10code.com>

	* m4/gpg4win.m4 (GPG4WIN_IPKG, GPG4WIN_SPKG, GPG4WIN_BPKG,
	GPG4WIN_MPKG): Define new substitution variables
	gpg4win_pkg_PKGNAME_deps, to transfer the knowledge of the
	dependency tree to the Makefiles.
	* src/gpg4win.mk.in (SPKG_template, BPKG_template): Wrap it in a
	test for package name being NO.
	(pkg_files): New variable, listing all package files.
	(VERSIONINFO_macro): Removed.
	(GETDEPS): New macro.
	* src/Makefile.am (versioninfo.txt): Use pkg_files to create versioninfo.txt.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-06-19 22:26:03 UTC (rev 1189)
+++ trunk/ChangeLog	2009-06-19 22:53:27 UTC (rev 1190)
@@ -1,3 +1,16 @@
+2009-06-20  Marcus Brinkmann  <marcus at g10code.com>
+
+	* m4/gpg4win.m4 (GPG4WIN_IPKG, GPG4WIN_SPKG, GPG4WIN_BPKG,
+	GPG4WIN_MPKG): Define new substitution variables
+	gpg4win_pkg_PKGNAME_deps, to transfer the knowledge of the
+	dependency tree to the Makefiles.
+	* src/gpg4win.mk.in (SPKG_template, BPKG_template): Wrap it in a
+	test for package name being NO.
+	(pkg_files): New variable, listing all package files.
+	(VERSIONINFO_macro): Removed.
+	(GETDEPS): New macro.
+	* src/Makefile.am (versioninfo.txt): Use pkg_files to create versioninfo.txt.
+
 2009-06-20  Werner Koch  <wk at g10code.com>
 
 	* packages/packages.current: Update GPA.

Modified: trunk/m4/gpg4win.m4
===================================================================
--- trunk/m4/gpg4win.m4	2009-06-19 22:26:03 UTC (rev 1189)
+++ trunk/m4/gpg4win.m4	2009-06-19 22:53:27 UTC (rev 1190)
@@ -1,5 +1,5 @@
 dnl gpg4win.m4 - macros to configure gpg4win.
-dnl Copyright (C) 2005 g10 Code GmbH
+dnl Copyright (C) 2005, 2009 g10 Code GmbH
 dnl
 dnl This file is part of GPG4Win.
 dnl
@@ -226,6 +226,10 @@
     _gpg4win_pkg=$enableval,
     _gpg4win_pkg=yes)
 
+  # gpg4win_pkg_PKGNAME_deps=DEPS
+  gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
+  AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
+
   AC_MSG_RESULT($_gpg4win_pkg)
 
   AS_IF([test "$_gpg4win_pkg" != no],
@@ -271,6 +275,10 @@
   gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
   AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
 
+  # gpg4win_pkg_PKGNAME_deps=DEPS
+  gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
+  AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
+
   AS_IF([test "$_gpg4win_spkg" != no],
     _gpg4win_pkgs="$_gpg4win_pkgs $1"
     GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
@@ -315,6 +323,10 @@
   gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
   AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
 
+  # gpg4win_pkg_PKGNAME_deps=DEPS
+  gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
+  AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
+
   AS_IF([test $_gpg4win_bpkg != no],
     GPG4WIN_FIND($1-lib, [$1-\(.*\)-lib],,
                  $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
@@ -428,6 +440,10 @@
   gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
   AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
 
+  # gpg4win_pkg_PKGNAME_deps=DEPS
+  gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
+  AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
+
   AS_IF([test $_gpg4win_bpkg != no],
     [GPG4WIN_FIND($1,,tar, $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
        AC_MSG_ERROR(can not find sources for package $1))]
@@ -480,6 +496,10 @@
   gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
   AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
 
+  # gpg4win_pkg_PKGNAME_deps=DEPS
+  gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
+  AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
+
   AS_IF([test $_gpg4win_bpkg != no],
     [GPG4WIN_FIND($1-dev,,, $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
        AC_MSG_ERROR(can not find development package for package $1))]
@@ -547,6 +567,10 @@
   gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
   AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
 
+  # gpg4win_pkg_PKGNAME_deps=DEPS
+  gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
+  AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
+
   AS_IF([test $_gpg4win_bpkg != no],
     [GPG4WIN_FIND($1,,tar, $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
        AC_MSG_ERROR(can not find sources for package $1))]
@@ -605,6 +629,10 @@
   gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_version=$_gpg4win_version
   AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_version)
 
+  # gpg4win_pkg_PKGNAME_deps=DEPS
+  gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
+  AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
+
   AS_IF([test $_gpg4win_bpkg != no],
     tmp_binsrc=yes
     GPG4WIN_FIND($1-src, [$1-\(.*\)-src],,

Modified: trunk/src/gpg4win.mk.in
===================================================================
--- trunk/src/gpg4win.mk.in	2009-06-19 22:26:03 UTC (rev 1189)
+++ trunk/src/gpg4win.mk.in	2009-06-19 22:53:27 UTC (rev 1190)
@@ -1,5 +1,5 @@
 # gpg4win.m4.in - Installer for GnuPG 4 Windows Makefile.   -*- makefile -*-
-# Copyright (C) 2005 g10 Code GmbH
+# Copyright (C) 2005, 2009 g10 Code GmbH
 # 
 # This file is part of GPG4Win.
 # 
@@ -29,6 +29,8 @@
 tsdir := $(shell pwd)/${top_srcdir}
 pdir := $(shell pwd)/${top_srcdir}/patches
 
+# We collect the names of all pkg files used.
+pkg_files =
 
 # The playground area is our scratch area, where we unpack, build and
 # install the packages.
@@ -75,11 +77,6 @@
 	export CONFIG_SITE="$(tsdir)/src/config.site"
 endef
 
-# Support macro.  Record version number of file $(1).
-define VERSIONINFO_macro
-         $(SHA1SUM) "$(1)" >> "$(bdir)/versioninfo.txt" 
-endef
-
 # Support macro.  Unpack the archive $(1).
 define DEFLATE_macro
 	case "$(1)" in			\
@@ -104,15 +101,20 @@
 	fi
 endef
 
+define GETDEPS
+  $(addprefix stamps/stamp-final-, $(call GETVAR,gpg4win_pkg_$(1)_deps))
+endef
 
+
 # Template for source packages.
 
-define SPKG_template
+define SPKG_template_
 
-stamps/stamp-$(1)-00-unpack: stamps/stamp-directories 
+pkg_files += $(call GETVAR,gpg4win_pkg_$(1))
+
+stamps/stamp-$(1)-00-unpack: stamps/stamp-directories $(call GETDEPS,$(1))
 	(cd $(bdir);					\
 	 $(call SETVARS,$(1));				\
-	 $(call VERSIONINFO_macro,$$$${pkg});           \
 	 $(call DEFLATE_macro,$$$${pkg}))
 	touch stamps/stamp-$(1)-00-unpack
 
@@ -173,16 +175,22 @@
 
 endef
 
+define SPKG_template
+$(if $(filter-out no, $(call GETVAR,gpg4win_pkg_$(1))),
+  $(call SPKG_template_,$1))
+endef
 
+
 # Template for source packages using only make and no build
 # directory.
 
-define MPKG_template
+define MPKG_template_
 
-stamps/stamp-$(1)-00-unpack: stamps/stamp-directories 
+pkg_files += $(call GETVAR,gpg4win_pkg_$(1))
+
+stamps/stamp-$(1)-00-unpack: stamps/stamp-directories $(call GETDEPS,$(1))
 	(cd $(bdir);					\
 	 $(call SETVARS,$(1));				\
-	 $(call VERSIONINFO_macro,$$$${pkg});           \
 	 $(call DEFLATE_macro,$$$${pkg}))
 	touch stamps/stamp-$(1)-00-unpack
 
@@ -227,17 +235,24 @@
 
 endef
 
+define MPKG_template
+$(if $(filter-out no, $(call GETVAR,gpg4win_pkg_$(1))),
+  $(call MPKG_template_,$1))
+endef
 
 
+
 # Template for binary packages.
 
-define BPKG_template
+define BPKG_template_
 
-stamps/stamp-$(1)-00-install: stamps/stamp-directories 
+pkg_files += $(call GETVAR,gpg4win_pkg_$(1))
+pkg_files += $(call GETVAR,gpg4win_pkg_$(1)_dev)
+
+stamps/stamp-$(1)-00-install: stamps/stamp-directories $(call GETDEPS,$(1))
 	($(call SETVARS,$(1));				\
 	 $(MKDIR) "$$$${pkgidir}";			\
 	 cd $$$${pkgidir};				\
-	 $(call VERSIONINFO_macro,$$$${pkg});           \
 	 $(call DEFLATE_macro,$$$${pkg}))
 	touch stamps/stamp-$(1)-00-install
 
@@ -247,7 +262,6 @@
 	($(call SETVARS,$(1));				\
 	 $(MKDIR) "$$$${pkgidir_dev}";			\
 	 (cd $$$${pkgidir_dev};				\
-          $(call VERSIONINFO_macro,$$$${pkg_dev});      \
 	  $(call DEFLATE_macro,$$$${pkg_dev}));		\
 	 $(call gpg4win_pkg_$(call FROB_macro,$(1))_post_install))
 	touch stamps/stamp-$(1)-01-install-dev
@@ -278,12 +292,17 @@
 
 endef
 
+define BPKG_template
+$(if $(filter-out no, $(call GETVAR,gpg4win_pkg_$(1))),
+  $(call BPKG_template_,$1))
+endef
 
-# Template for source packages.
 
+# Template for internal packages.
+
 define IPKG_template
 
-stamps/stamp-final-$(1): stamps/stamp-directories 
+stamps/stamp-final-$(1): stamps/stamp-directories $(call GETDEPS,$(1))
 	touch stamps/stamp-final-$(1)
 endef
 
@@ -304,6 +323,10 @@
 stamps/stamp-final: $(addprefix stamps/stamp-final-,$(gpg4win_build_list))
 	touch stamps/stamp-final
 
+$(bdir)/versioninfo.txt: stamps/stamp-final
+	touch $(bdir)/versioninfo.txt
+
+
 all-gpg4win: stamps/stamp-final
 
 # Just to check if we catched all stamps.



More information about the Gpg4win-commits mailing list