[gnome-keyring] build: Make it easy to run 'make' when $srcdir != $builddir
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] build: Make it easy to run 'make' when $srcdir != $builddir
- Date: Sun, 14 Feb 2016 12:11:36 +0000 (UTC)
commit 324f2d2e1a7c7391c9b7d794265c07af7767dd95
Author: Stef Walter <stefw gnome org>
Date: Sat Feb 13 14:30:51 2016 +0100
build: Make it easy to run 'make' when $srcdir != $builddir
autogen.sh | 7 +++++++
build/Makefile.redirect | 9 +++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 6ac30e3..fa86874 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,6 +5,7 @@ PKG_NAME="gnome-keyring"
USE_GNOME2_MACROS=1
REQUIRED_AUTOMAKE_VERSION=1.7
+olddir=`pwd`
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
@@ -21,3 +22,9 @@ which gnome-autogen.sh || {
}
. gnome-autogen.sh
+
+# Put a redirect makefile here
+if [ ! -f $srcdir/Makefile ]; then
+ cat $srcdir/build/Makefile.redirect > $srcdir/Makefile
+ printf "\nREDIRECT = %s\n" "$(realpath $olddir)" >> $srcdir/Makefile
+fi
diff --git a/build/Makefile.redirect b/build/Makefile.redirect
new file mode 100644
index 0000000..db371eb
--- /dev/null
+++ b/build/Makefile.redirect
@@ -0,0 +1,9 @@
+# This redirects all make targets to builddir
+all:
+ $(MAKE) -C $(REDIRECT) all
+%:
+ $(MAKE) -C $(REDIRECT) $@
+ifeq ($(MAKEFLAGS), )
+JOBARG = -j4
+endif
+# REDIRECT=build
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]