changeset 1269:7e85e3fd25d7

Backport IcedTea7 support for --enable-hg. 2008-12-09 Andrew John Hughes <gnu_andrew@member.fsf.org> * Makefile.am: Support downloading from the Mercurial repository. * acinclude.m4: (ENABLE_HG): New macro. * configure.ac: Check for --enable-hg.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Tue, 09 Dec 2008 21:42:14 +0000
parents 62b109d14405
children 7b1c3278c88a
files ChangeLog Makefile.am acinclude.m4 configure.ac
diffstat 4 files changed, 61 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Dec 09 20:09:24 2008 +0000
+++ b/ChangeLog	Tue Dec 09 21:42:14 2008 +0000
@@ -1,3 +1,12 @@
+2008-12-09  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	* Makefile.am:
+	Support downloading from the Mercurial repository.
+	* acinclude.m4:
+	(ENABLE_HG): New macro.
+	* configure.ac:
+	Check for --enable-hg.
+
 2008-12-09  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	* Makefile.am:
--- a/Makefile.am	Tue Dec 09 20:09:24 2008 +0000
+++ b/Makefile.am	Tue Dec 09 21:42:14 2008 +0000
@@ -290,12 +290,17 @@
 # Download OpenJDK sources.
 OPENJDK_URL = http://download.java.net/openjdk/jdk6/promoted/$(OPENJDK_VERSION)/
 HOTSPOT_URL = http://hg.openjdk.java.net/jdk7/hotspot/hotspot/archive/
+OPENJDK_HG_URL = http://hg.openjdk.java.net/jdk6/jdk6
 
 if USE_ALT_OPENJDK_SRC_ZIP
   OPENJDK_SRC_ZIP = $(ALT_OPENJDK_SRC_ZIP)
 else
+if USE_HG
+  OPENJDK_SRC_ZIP = 
+else
   OPENJDK_SRC_ZIP = openjdk-6-src-$(OPENJDK_VERSION)-$(OPENJDK_DATE).tar.gz
 endif
+endif
 
 if USE_ALT_HOTSPOT_SRC_ZIP
   HOTSPOT_SRC_ZIP = $(ALT_HOTSPOT_SRC_ZIP)
@@ -336,9 +341,28 @@
   VISUALVM_SRC_ZIP = visualvm-20081031-src.tar.gz
 endif
 
-stamps/download.stamp:
+stamps/hgforest.stamp:
 if USE_ALT_OPENJDK_SRC_ZIP
 else
+if !USE_HG
+else
+	if ! $(HG) fclone -h; \
+          then \
+          echo "No forest extension found. Please refer to" \
+            "http://selenic.com/mercurial/wiki/index.cgi/ForestExtension"; \
+          exit 1; \
+          fi;
+endif
+endif
+	mkdir -p stamps 
+	touch stamps/hgforest.stamp
+
+stamps/download.stamp: stamps/hgforest.stamp
+if USE_ALT_OPENJDK_SRC_ZIP
+else
+if USE_HG
+	$(HG) fclone -r jdk6-$(OPENJDK_VERSION) $(OPENJDK_HG_URL) openjdk;
+else
 	if ! echo "$(OPENJDK_MD5SUM)  $(OPENJDK_SRC_ZIP)" \
 	  | $(MD5SUM) --check ; \
 	then \
@@ -349,6 +373,7 @@
 	  $(WGET) $(OPENJDK_URL)$(OPENJDK_SRC_ZIP) -O $(OPENJDK_SRC_ZIP); \
 	fi
 endif
+endif
 if WITH_ALT_HSBUILD
 if USE_ALT_HOTSPOT_SRC_ZIP
 else
@@ -415,6 +440,9 @@
 	mkdir -p stamps
 	touch stamps/download.stamp
 
+clean-hgforest:
+	rm -f stamps/hgforest.stamp
+
 clean-download:
 	rm -f stamps/download.stamp
 	rm -f $(OPENJDK_SRC_ZIP)
--- a/acinclude.m4	Tue Dec 09 20:09:24 2008 +0000
+++ b/acinclude.m4	Tue Dec 09 21:42:14 2008 +0000
@@ -966,3 +966,25 @@
   AC_MSG_RESULT(${ALT_HOTSPOT_SRC_ZIP})
   AC_SUBST(ALT_HOTSPOT_SRC_ZIP)
 ])
+
+AC_DEFUN([ENABLE_HG],
+[
+  AC_MSG_CHECKING(whether to retrieve the source code from Mercurial)
+  AC_ARG_ENABLE([hg],
+                [AS_HELP_STRING(--enable-hg,download source code from Mercurial [[default=no]])],
+  [
+    case "${enableval}" in
+      no)
+	enable_hg=no
+        ;;
+      *)
+        enable_hg=yes
+        ;;
+    esac
+  ],
+  [
+        enable_hg=no
+  ])
+  AC_MSG_RESULT([${enable_hg}])
+  AM_CONDITIONAL([USE_HG], test x"${enable_hg}" = "xyes")
+])
--- a/configure.ac	Tue Dec 09 20:09:24 2008 +0000
+++ b/configure.ac	Tue Dec 09 21:42:14 2008 +0000
@@ -314,6 +314,7 @@
 ENABLE_OPTIMIZATIONS
 ENABLE_ZERO_BUILD
 SET_CORE_OR_SHARK_BUILD
+ENABLE_HG
 
 if test "x${enable_pulse_java}" = "xyes"
 then