FYI: Version suffix support for IcedTea
Andrew John Hughes
gnu_andrew at member.fsf.org
Fri Sep 12 19:54:04 PDT 2008
This patch allows a version suffix (e.g. '-ubuntu') to be
added to the JDK version. It also will add '-<project>'
if something other than jdk7 is being built, so
we can end up with something like
1.7.0_0-b35-caciocavallo-happy.
ChangeLog:
2008-09-13 Andrew John Hughes <gnu_andrew at member.fsf.org>
* Makefile.am: Add the project name
and version suffix to the JDK version number.
* acinclude.m4: Add support for --with-version-suffix
and add a Makefile variable, PROJECT_NAME.
* configure.ac: Enable --with-version-suffix.
--
Andrew :)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
-------------- next part --------------
diff -r 08b2f6478462 Makefile.am
--- a/Makefile.am Sat Sep 13 02:48:10 2008 +0100
+++ b/Makefile.am Sat Sep 13 03:46:47 2008 +0100
@@ -683,7 +683,15 @@
revision="-r`(cd $(srcdir); $(HG) tip|grep changeset|cut -d':' -f2|sed -r 's#\W+##')`" ; \
fi ; \
icedtea_version="$(PACKAGE_VERSION)$${revision}" ; \
- sed -i "s#IcedTea#IcedTea $${icedtea_version}#" openjdk/jdk/make/common/shared/Defs.gmk
+ if test x"$(PROJECT_NAME)" != "xjdk7"; then \
+ proj_suffix="-$(PROJECT_NAME)"; \
+ fi ; \
+ if test x"$(VERSION_SUFFIX)" != "x"; then \
+ ver_suffix="-$(VERSION_SUFFIX)"; \
+ fi ; \
+ sed -i "s#IcedTea#IcedTea $${icedtea_version}#" openjdk/jdk/make/common/shared/Defs.gmk ; \
+ sed -i "s#BUILD_VARIANT_RELEASE)#BUILD_VARIANT_RELEASE)$${proj_suffix}$${ver_suffix}#" \
+ openjdk/jdk/make/common/shared/Defs.gmk
clean-patch:
rm -f stamps/patch.stamp
diff -r 08b2f6478462 acinclude.m4
--- a/acinclude.m4 Sat Sep 13 02:48:10 2008 +0100
+++ b/acinclude.m4 Sat Sep 13 03:46:47 2008 +0100
@@ -891,6 +891,34 @@
AM_CONDITIONAL([USE_HG], test x"${enable_hg}" = "xyes")
])
+AC_DEFUN([WITH_VERSION_SUFFIX],
+[
+ AC_MSG_CHECKING(if a version suffix has been specified)
+ AC_ARG_WITH([version-suffix],
+ [AS_HELP_STRING(--with-version-suffix,appends the given text to the JDK version)],
+ [
+ case "${withval}" in
+ yes)
+ version_suffix=
+ AC_MSG_RESULT([no])
+ ;;
+ no)
+ version_suffix=
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ version_suffix=${withval}
+ AC_MSG_RESULT([${version_suffix}])
+ ;;
+ esac
+ ],
+ [
+ version_suffix=
+ AC_MSG_RESULT([no])
+ ])
+ AC_SUBST(VERSION_SUFFIX, $version_suffix)
+])
+
AC_DEFUN([WITH_PROJECT],
[
AC_MSG_CHECKING(which OpenJDK project is being used)
@@ -913,6 +941,7 @@
project=jdk7
])
AC_MSG_RESULT([${project}])
+ AC_SUBST(PROJECT_NAME, $project)
AM_CONDITIONAL([USE_CLOSURES], test x"${project}" = "xclosures")
AM_CONDITIONAL([USE_CVMI], test x"${project}" = "xcvmi")
AM_CONDITIONAL([USE_CACIOCAVALLO], test x"${project}" = "xcaciocavallo")
diff -r 08b2f6478462 configure.ac
--- a/configure.ac Sat Sep 13 02:48:10 2008 +0100
+++ b/configure.ac Sat Sep 13 03:46:47 2008 +0100
@@ -225,6 +225,7 @@
ENABLE_OPTIMIZATIONS
ENABLE_ZERO_BUILD
SET_CORE_OR_SHARK_BUILD
+WITH_VERSION_SUFFIX
WITH_PROJECT
ENABLE_HG
More information about the distro-pkg-dev
mailing list