changeset 2614:c2c1c1c2d74b

Make sure the destination directory for tz.properties exists before copying it. 2013-01-14 Andrew John Hughes <gnu_andrew@member.fsf.org> (add-tzdata-support): Only copy tz.properties if destination exists. Do it verbosely. (clean-add-tzdata-support): Only remove tz.properties if present and do so verbosely. (add-tzdata-support-debug): Same as add-tzdata-support but for debug. (clean-add-tzdata-support-debug): Same as clean-add-tzdata-support but for debug. (add-tzdata-support-boot): Same as add-tzdata-support but for bootstrap. (clean-add-tzdata-support-boot): Same as clean-add-tzdata-support but for bootstrap.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Mon, 14 Jan 2013 19:36:24 +0000
parents 7d1c8d7548ac
children 0ec29918b804
files ChangeLog Makefile.am
diffstat 2 files changed, 36 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jan 14 18:54:27 2013 +0000
+++ b/ChangeLog	Mon Jan 14 19:36:24 2013 +0000
@@ -1,3 +1,18 @@
+2013-01-14  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	(add-tzdata-support): Only copy tz.properties if
+	destination exists.  Do it verbosely.
+	(clean-add-tzdata-support): Only remove tz.properties
+	if present and do so verbosely.
+	(add-tzdata-support-debug): Same as add-tzdata-support
+	but for debug.
+	(clean-add-tzdata-support-debug): Same as
+	clean-add-tzdata-support but for debug.
+	(add-tzdata-support-boot): Same as add-tzdata-support
+	but for bootstrap.
+	(clean-add-tzdata-support-boot): Same as
+	clean-add-tzdata-support but for bootstrap.
+
 2013-01-14  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	* fsg.sh:
--- a/Makefile.am	Mon Jan 14 18:54:27 2013 +0000
+++ b/Makefile.am	Mon Jan 14 19:36:24 2013 +0000
@@ -1781,13 +1781,17 @@
 
 stamps/add-tzdata-support.stamp: stamps/icedtea.stamp
 if WITH_TZDATA_DIR
-	cp $(abs_top_builddir)/tz.properties \
-	  $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib;
+	if [ -e $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib ] ; then \
+	  cp -v $(abs_top_builddir)/tz.properties \
+	    $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib ; \
+	fi
 endif
 	touch stamps/add-tzdata-support.stamp
 
 clean-add-tzdata-support:
-	rm -f $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/tz.properties
+	if [ -e $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/tz.properties ] ; then \
+	  rm -vf $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/tz.properties ; \
+	fi
 	rm -f stamps/add-tzdata-support.stamp
 
 stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink-stage2.stamp \
@@ -1879,13 +1883,17 @@
 
 stamps/add-tzdata-support-debug.stamp: stamps/icedtea-debug.stamp
 if WITH_TZDATA_DIR
-	cp $(abs_top_builddir)/tz.properties \
-	  $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib;
+	if [ -e $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib ] ; then \
+	  cp -v $(abs_top_builddir)/tz.properties \
+	    $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib; \
+	fi
 endif
 	touch stamps/add-tzdata-support-debug.stamp
 
 clean-add-tzdata-support-debug:
-	rm -f $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/tz.properties
+	if [ -e $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/tz.properties ] ; then \
+	  rm -vf $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/tz.properties ; \
+	fi
 	rm -f stamps/add-tzdata-support-debug.stamp
 
 stamps/icedtea-stage2.stamp: stamps/icedtea.stamp stamps/add-cacao.stamp \
@@ -1983,13 +1991,17 @@
 
 stamps/add-tzdata-support-boot.stamp: stamps/icedtea-boot.stamp
 if WITH_TZDATA_DIR
-	cp $(abs_top_builddir)/tz.properties \
-	  $(BOOT_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib;
+	if [ -e $(BOOT_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib ] ; then \
+	  cp -v $(abs_top_builddir)/tz.properties \
+	    $(BOOT_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib; \
+	fi
 endif
 	touch stamps/add-tzdata-support-boot.stamp
 
 clean-add-tzdata-support-boot:
-	rm -f $(BOOT_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/tz.properties
+	if [ -e $(BOOT_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/tz.properties ] ; then \
+	  rm -vf $(BOOT_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/tz.properties ; \
+	fi
 	rm -f stamps/add-tzdata-support-boot.stamp
 
 stamps/icedtea-stage1.stamp: stamps/icedtea-boot.stamp \