[nautilus-actions] Review run-*.sh scripts to be able to build from several guests



commit 8c6a391ed32f52c42e5f8d032da3536d19bed3a4
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Nov 28 22:17:17 2011 +0100

    Review run-*.sh scripts to be able to build from several guests

 ChangeLog        |    4 ++
 run-autogen.sh   |   83 +++++++++++++++++++++++++++++++++++++++---------------
 run-distcheck.sh |    5 +--
 3 files changed, 65 insertions(+), 27 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e02c95c..ab3323f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-11-28 Pierre Wieser <pwieser trychlos org>
 
+	* run-autogen.sh:
+	* run-distcheck.sh: Review in order to be able to build several guests
+	from a common single source tree.
+
 	* src/nact/nact-assistant-export.c (assist_initial_load_target_folder):
 	Get ride of the superfluous 'name' entry field when selecting the folder.
 
diff --git a/run-autogen.sh b/run-autogen.sh
index a338278..8b189e2 100755
--- a/run-autogen.sh
+++ b/run-autogen.sh
@@ -1,4 +1,14 @@
 #!/bin/sh
+#
+# pwi 2011-11-28 goal is to have a single source tree, being able to easily
+#                build it in several virtual guests which all have a read
+#                access to this source tree
+# -> run-distcheck.sh and run-autogen.sh are only executed on the development
+#    boxes, while run-configure is meant to build from anywhere
+# -> on the development box, _build and _install are subdirectories of the
+#    source tree
+# -> on the virtual guests, _build and _install are subdirectories of the 
+#    current working directory
 
 target=${target:-normal}
 srcdir=$(cd ${0%/*}; pwd)
@@ -11,33 +21,24 @@ for d in $(find ${srcdir} -maxdepth 1 -type d -name 'nautilus-actions-*'); do
 	rm -fr $d
 done
 
-[ "${target}" = "normal" ] &&
-	exec ${srcdir}/autogen.sh \
-		--prefix=$(pwd)/_install \
-		--sysconfdir=/etc \
-		--with-nautilus-extdir=$(pwd)/_install/lib/nautilus \
-		--disable-schemas-install \
+[ "${target}" = "normal" ] && 
+	conf_arg=" \
 		--disable-deprecated \
 		--disable-gtk-doc \
 		--disable-html-manuals \
 		--disable-pdf-manuals \
-		$*
+"
 
 # 'doc' mode: enable deprecated, manuals and gtk-doc
 [ "${target}" = "doc" ] &&
-	exec ${srcdir}/autogen.sh \
-		--prefix=$(pwd)/_install \
-		--sysconfdir=/etc \
-		--with-nautilus-extdir=$(pwd)/_install/lib/nautilus \
-		--disable-schemas-install \
-		--disable-scrollkeeper \
+	conf_arg=" \
 		--enable-deprecated \
 		--enable-gtk-doc \
 		--enable-gtk-doc-html \
 		--enable-gtk-doc-pdf \
 		--enable-html-manuals \
 		--enable-pdf-manuals \
-		$*
+"
 
 # Build with Gtk+ 3 (actually a 2.97.x unstable version)
 # installed in ~/.local/jhbuild
@@ -49,12 +50,48 @@ done
 #   libnautilus-extension.pc:Requires: glib-2.0 gio-2.0 gtk+-2.0
 #   unique-1.0.pc:Requires: gtk+-2.0
 #
-[ "${target}" = "jhbuild" ] &&
-	export autogen_prefix=${HOME}/data/jhbuild/run &&
-	PKG_CONFIG_PATH=${autogen_prefix}/lib/pkgconfig \
-	LD_LIBRARY_PATH=${autogen_prefix}/lib \
-		exec ./autogen.sh \
-			--prefix=${autogen_prefix} \
-			--sysconfdir=/etc \
-			--disable-schemas-install \
-			$*
+#[ "${target}" = "jhbuild" ] &&
+#	export autogen_prefix=${HOME}/data/jhbuild/run &&
+#	PKG_CONFIG_PATH=${autogen_prefix}/lib/pkgconfig \
+#	LD_LIBRARY_PATH=${autogen_prefix}/lib \
+#		exec ./autogen.sh \
+#			--prefix=${autogen_prefix} \
+#			--sysconfdir=/etc \
+#			--disable-schemas-install \
+#			$*
+
+NOCONFIGURE=1 ${srcdir}/autogen.sh
+
+runconf=${srcdir}/run-configure.sh
+echo "
+Generating ${runconf}"
+
+cat <<EOF >${runconf}
+#!/bin/sh
+
+# srcdir here is the root of the source directory
+target=\${target:-normal}
+srcdir=\$(cd \${0%/*}; pwd)
+
+# heredir is the root of the _build/_install directories
+heredir=\$(pwd)
+
+mkdir -p \${heredir}/_build
+cd \${heredir}/_build
+
+\${srcdir}/configure \
+		--prefix=\${heredir}/_install \
+		--sysconfdir=/etc \
+		--with-nautilus-extdir=\${heredir}/_install/lib/nautilus \
+		--disable-schemas-install \
+		--disable-scrollkeeper \
+		--enable-maintainer-mode \
+		\$* &&
+make &&
+make install
+EOF
+
+echo "Executing ${runconf}
+"
+chmod a+x ${runconf}
+exec ${runconf}
diff --git a/run-distcheck.sh b/run-distcheck.sh
index 8585fd3..fc26d8d 100755
--- a/run-distcheck.sh
+++ b/run-distcheck.sh
@@ -3,9 +3,6 @@
 srcdir=$(cd ${0%/*}; pwd)
 
 target=doc ${srcdir}/run-autogen.sh &&
-	make clean &&
-	make &&
-	make install &&
 	${srcdir}/tools/check-po.sh -nodummy &&
 	${srcdir}/tools/check-headers.sh -nodummy &&
-	make distcheck
+	make -C _build distcheck



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]