changeset 2852:1da3fd7fa32e

PR3630: Use ${datadir} when specifying default tz.properties location 2018-09-24 Andrew John Hughes <gnu_andrew@member.fsf.org> PR3630: Use ${datadir} when specifying default tz.properties location * Makefile.am: (EXTRA_DIST): Remove stp.in files which are already handled by configure. Add tz.properties.in which no longer is. (clean-local): Add clean-tz.properties. (.PHONY): Likewise. (add-tzdata-support): Depend on tz.properties. (add-tzdata-support-debug): Likewise. (add-tzdata-support-boot): Likewise. (tz.properties): Generate tz.properties from tz.properties.in by substituting the value of TZDATA_DIR determined by configure. (clean-tz.properties): Remove generated tz.properties. * NEWS: Updated. * acinclude.m4: (IT_WITH_TZDATA_DIR): Use ${datadir}/javazi as default. Sync macro with improvements in similiar IT_WITH_TAPSET_DIR. * tz.properties.in: Use _TZDATA_DIR_ instead of @TZDATA_DIR@ to distinguish it from configure-based substitution.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Thu, 27 Sep 2018 05:52:34 +0100
parents 1a7d5095cb45
children 5e48e2fa5dd8
files ChangeLog Makefile.am NEWS acinclude.m4 tz.properties.in
diffstat 5 files changed, 53 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Sep 24 17:13:44 2018 +0100
+++ b/ChangeLog	Thu Sep 27 05:52:34 2018 +0100
@@ -1,3 +1,30 @@
+2018-09-24  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	PR3630: Use ${datadir} when specifying default
+	tz.properties location
+	* Makefile.am:
+	(EXTRA_DIST): Remove stp.in files which are already
+	handled by configure. Add tz.properties.in which no
+	longer is.
+	(clean-local): Add clean-tz.properties.
+	(.PHONY): Likewise.
+	(add-tzdata-support): Depend on tz.properties.
+	(add-tzdata-support-debug): Likewise.
+	(add-tzdata-support-boot): Likewise.
+	(tz.properties): Generate tz.properties from
+	tz.properties.in by substituting the value of
+	TZDATA_DIR determined by configure.
+	(clean-tz.properties): Remove generated
+	tz.properties.
+	* NEWS: Updated.
+	* acinclude.m4:
+	(IT_WITH_TZDATA_DIR): Use ${datadir}/javazi
+	as default. Sync macro with improvements in
+	similiar IT_WITH_TAPSET_DIR.
+	* tz.properties.in: Use _TZDATA_DIR_ instead
+	of @TZDATA_DIR@ to distinguish it from
+	configure-based substitution.
+
 2018-09-23  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	PR3628: Install symlinks to tapsets in SystemTap directory
--- a/Makefile.am	Mon Sep 24 17:13:44 2018 +0100
+++ b/Makefile.am	Thu Sep 27 05:52:34 2018 +0100
@@ -817,10 +817,7 @@
 	$(top_srcdir)/patches/hotspot/*/*.patch \
 	tools-copy contrib overlays \
 	$(JTREG_SRCS) HACKING autogen.sh \
-	tapset/hotspot.stp.in \
-	tapset/hotspot_jni.stp.in \
-	tapset/jstack.stp.in \
-	tapset/hotspot_gc.stp.in \
+	tz.properties.in \
 	scripts/jni_create_stap.c \
 	scripts/jni_desc \
 	THANKYOU test/tapset \
@@ -846,7 +843,7 @@
  clean-bootstrap-directory-symlink-stage1 clean-bootstrap-directory-symlink-stage2 \
  clean-extract clean-icedtea-stage2 clean-icedtea-debug-stage2 clean-icedtea-stage1 \
  clean-add-zero clean-add-zero-debug clean-add-cacao clean-add-cacao-debug \
- clean-policytool-@JAVA_VER@.desktop clean-jconsole-@JAVA_VER@.desktop \
+ clean-policytool-@JAVA_VER@.desktop clean-jconsole-@JAVA_VER@.desktop clean-tz.properties \
  clean-add-nss clean-add-nss-debug clean-add-tzdata-support clean-add-tzdata-support-debug \
  clean-add-systemtap clean-add-systemtap-debug
 	if [ -e bootstrap ]; then \
@@ -888,7 +885,7 @@
 	clean-split-debuginfo clean-split-debuginfo-debug clean-split-debuginfo-boot \
 	clean-add-nss clean-add-nss-debug clean-add-tzdata-support clean-add-tzdata-support-debug \
 	clean-add-systemtap clean-add-systemtap-debug clean-add-systemtap-boot clean-add-nss-boot \
-	clean-add-tzdata-support-boot clean-aescheck clean-check-aes
+	clean-add-tzdata-support-boot clean-aescheck clean-check-aes clean-tz.properties
 
 env:
 	@echo 'unset JAVA_HOME'
@@ -2024,7 +2021,7 @@
 	rm -f $(BUILD_SDK_DIR)/jre/lib/security/nss.cfg
 	rm -f stamps/add-nss.stamp
 
-stamps/add-tzdata-support.stamp: stamps/icedtea.stamp
+stamps/add-tzdata-support.stamp: stamps/icedtea.stamp tz.properties
 if WITH_TZDATA_DIR
 	cp $(abs_top_builddir)/tz.properties $(BUILD_SDK_DIR)/jre/lib;
 endif
@@ -2163,7 +2160,7 @@
 	rm -f $(BUILD_DEBUG_SDK_DIR)/jre/lib/security/nss.cfg
 	rm -f stamps/add-nss-debug.stamp
 
-stamps/add-tzdata-support-debug.stamp: stamps/icedtea-debug.stamp
+stamps/add-tzdata-support-debug.stamp: stamps/icedtea-debug.stamp tz.properties
 if WITH_TZDATA_DIR
 	cp $(abs_top_builddir)/tz.properties \
 	  $(BUILD_DEBUG_SDK_DIR)/j2sdk-image/jre/lib;
@@ -2314,7 +2311,7 @@
 	rm -f $(BUILD_BOOT_SDK_DIR)/jre/lib/security/nss.cfg
 	rm -f stamps/add-nss-boot.stamp
 
-stamps/add-tzdata-support-boot.stamp: stamps/icedtea-boot.stamp
+stamps/add-tzdata-support-boot.stamp: stamps/icedtea-boot.stamp tz.properties
 if WITH_TZDATA_DIR
 	cp $(abs_top_builddir)/tz.properties $(BUILD_BOOT_SDK_DIR)/jre/lib;
 endif
@@ -2950,6 +2947,12 @@
 clean-jconsole-@JAVA_VER@.desktop:
 	rm -f jconsole-@JAVA_VER@.desktop
 
+tz.properties: $(top_srcdir)/tz.properties.in
+	cat $< | $(SED) "s#_TZDATA_DIR_#$(TZDATA_DIR)#" > $@
+
+clean-tz.properties:
+	rm -f tz.properties
+
 # AES Intrinstic Check
 
 stamps/aescheck-build.stamp: $(INITIAL_BOOTSTRAP_LINK_STAMP) stamps/extract-hotspot.stamp
--- a/NEWS	Mon Sep 24 17:13:44 2018 +0100
+++ b/NEWS	Thu Sep 27 05:52:34 2018 +0100
@@ -104,6 +104,7 @@
   - PR3597: Potential bogus -Wformat-overflow warning with -Wformat enabled
   - PR3600: jni_util.c does not import header file which declares getLastErrorString
   - PR3601: Fix additional -Wreturn-type issues introduced by 8061651
+  - PR3630: Use ${datadir} when specifying default tz.properties location
 * AArch64 port
   - S8207345, PR3626: Trampoline generation code reads from uninitialized memory
 * Shenandoah
--- a/acinclude.m4	Mon Sep 24 17:13:44 2018 +0100
+++ b/acinclude.m4	Thu Sep 27 05:52:34 2018 +0100
@@ -1188,33 +1188,29 @@
 
 AC_DEFUN([IT_WITH_TZDATA_DIR],
 [
-  DEFAULT="/usr/share/javazi"
+  TZDATA_DEFAULT="${datadir}/javazi"
   AC_MSG_CHECKING([which Java timezone data directory to use])
   AC_ARG_WITH([tzdata-dir],
-	      [AS_HELP_STRING(--with-tzdata-dir,set the Java timezone data directory [[default=${DEFAULT}]])],
+	      [AS_HELP_STRING(--with-tzdata-dir,set the Java timezone data directory [[default=DATAROOTDIR/javazi]])],
   [
     if test "x${withval}" = x || test "x${withval}" = xyes; then
-      TZDATA_DIR_SET=yes
-      TZDATA_DIR="${DEFAULT}"
+      TZDATA_DIR="${TZDATA_DEFAULT}"
     else
-      if test "x${withval}" = xno; then
-        TZDATA_DIR_SET=no
-        AC_MSG_RESULT([no])
-      else
-        TZDATA_DIR_SET=yes
-        TZDATA_DIR="${withval}"
-      fi
+      TZDATA_DIR="${withval}"
     fi
   ],
   [ 
-    TZDATA_DIR="${DEFAULT}"
+    TZDATA_DIR="${TZDATA_DEFAULT}"
   ])
-  if test "x${TZDATA_DIR}" != "x"; then
-    AC_MSG_RESULT([${TZDATA_DIR}])
+  if test "x${TZDATA_DIR}" = "xno"; then
+    TZDATA_DIR=none
+    TZDATA_DIR_SET=no
+  else
+    TZDATA_DIR_SET=yes
   fi
+  AC_MSG_RESULT([${TZDATA_DIR}])
   AC_SUBST([TZDATA_DIR])
-  AM_CONDITIONAL(WITH_TZDATA_DIR, test "x${TZDATA_DIR}" != "x")
-  AC_CONFIG_FILES([tz.properties])
+  AM_CONDITIONAL(WITH_TZDATA_DIR, test "x${TZDATA_DIR_SET}" = "xyes")
 ])
 
 dnl check that javac and java work
--- a/tz.properties.in	Mon Sep 24 17:13:44 2018 +0100
+++ b/tz.properties.in	Thu Sep 27 05:52:34 2018 +0100
@@ -1,1 +1,1 @@
-sun.zoneinfo.dir=@TZDATA_DIR@
+sun.zoneinfo.dir=_TZDATA_DIR_