RFC: PR1176: Added --with-cacao-src-dir option

Stefan Ring stefan at complang.tuwien.ac.at
Wed Oct 17 14:23:04 PDT 2012


Hi,

this is the first part of makefile synchronization. I'd really like to
see this go in. It would also help get CACAO's buildbot off the
ground.

Cheers


https://bitbucket.org/Ringdingcoder/icedtea7/changeset/36af76cba7dea4538f9183ab437369be17d01749

2012-10-17  Stefan Ring  <stefan at complang.tuwien.ac.at>

* configure.ac: Added --with-cacao-src-dir option, along the lines
of Mercurial rev 66ad418c7b91 from icedtea6.
* acinclude.m4: New macro IT_WITH_CACAO_SRC_DIR.
* Makefile.am: Copy CACAO sources when USE_ALT_CACAO_SRC_DIR is
used.

diff -r 67d42446bc250967387ebb973857c0e01d6fc487 -r
36af76cba7dea4538f9183ab437369be17d01749 Makefile.am
--- a/Makefile.am	Wed Sep 26 14:52:49 2012 +0100
+++ b/Makefile.am	Wed Oct 17 23:13:04 2012 +0200
@@ -1068,6 +1068,8 @@
 stamps/download-cacao.stamp:
 if BUILD_CACAO
 if !USE_SYSTEM_CACAO
+if USE_ALT_CACAO_SRC_DIR
+else
 if USE_ALT_CACAO_SRC_ZIP
 	ln -sf $(ALT_CACAO_SRC_ZIP) $(CACAO_SRC_ZIP)
 endif
@@ -1089,6 +1091,7 @@
 	fi
 endif
 endif
+endif
 	mkdir -p stamps
 	touch $@

@@ -1268,6 +1271,14 @@
 stamps/extract-cacao.stamp: stamps/download-cacao.stamp
 if BUILD_CACAO
 if !USE_SYSTEM_CACAO
+if USE_ALT_CACAO_SRC_DIR
+	set -e ; \
+	if ! test -d cacao/cacao ; \
+	then \
+	  mkdir cacao ; \
+	  cp -rL $(ALT_CACAO_SRC_DIR) cacao/cacao ; \
+	fi
+else
 	set -e ; \
 	if ! test -d cacao/cacao ; \
 	then \
@@ -1280,6 +1291,7 @@
 	fi
 endif
 endif
+endif
 	mkdir -p stamps
 	touch $@

diff -r 67d42446bc250967387ebb973857c0e01d6fc487 -r
36af76cba7dea4538f9183ab437369be17d01749 acinclude.m4
--- a/acinclude.m4	Wed Sep 26 14:52:49 2012 +0100
+++ b/acinclude.m4	Wed Oct 17 23:13:04 2012 +0200
@@ -805,7 +805,7 @@
       AC_MSG_ERROR([Invalid CACAO source zip specified: ${ALT_CACAO_SRC_ZIP}])
     fi
   ],
-  [
+  [
     ALT_CACAO_SRC_ZIP="not specified"
   ])
   AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test "x${ALT_CACAO_SRC_ZIP}"
!= "xnot specified")
@@ -813,6 +813,27 @@
   AC_SUBST(ALT_CACAO_SRC_ZIP)
 ])

+AC_DEFUN([IT_WITH_CACAO_SRC_DIR],
+[
+  AC_MSG_CHECKING(for a CACAO source directory)
+  AC_ARG_WITH([cacao-src-dir],
+              [AS_HELP_STRING(--with-cacao-src-dir,specify the
location of the CACAO sources)],
+  [
+    ALT_CACAO_SRC_DIR=${withval}
+    if test "x${ALT_CACAO_SRC_DIR}" = "xno"; then
+      ALT_CACAO_SRC_DIR="not specified"
+    elif ! test -d ${ALT_CACAO_SRC_DIR} ; then
+      AC_MSG_ERROR([Invalid CACAO source dir specified: ${ALT_CACAO_SRC_DIR}])
+    fi
+  ],
+  [
+    ALT_CACAO_SRC_DIR="not specified"
+  ])
+  AM_CONDITIONAL(USE_ALT_CACAO_SRC_DIR, test "x${ALT_CACAO_SRC_DIR}"
!= "xnot specified")
+  AC_MSG_RESULT(${ALT_CACAO_SRC_DIR})
+  AC_SUBST(ALT_CACAO_SRC_DIR)
+])
+
 AC_DEFUN([IT_ENABLE_HG],
 [
   AC_REQUIRE([IT_WITH_PROJECT])
diff -r 67d42446bc250967387ebb973857c0e01d6fc487 -r
36af76cba7dea4538f9183ab437369be17d01749 configure.ac
--- a/configure.ac	Wed Sep 26 14:52:49 2012 +0100
+++ b/configure.ac	Wed Oct 17 23:13:04 2012 +0200
@@ -148,6 +148,7 @@
 IT_ENABLE_CACAO
 IT_WITH_CACAO_HOME
 IT_WITH_CACAO_SRC_ZIP
+IT_WITH_CACAO_SRC_DIR
 IT_ENABLE_JAMVM
 IT_WITH_JAMVM_SRC_ZIP



More information about the distro-pkg-dev mailing list