[libsecret] build: Add redirect Makefile for when $srcdir != $builddir
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsecret] build: Add redirect Makefile for when $srcdir != $builddir
- Date: Sat, 13 Feb 2016 11:27:54 +0000 (UTC)
commit a3a6f5c9d842bc7a6c578bccd277368fd21faf96
Author: Stef Walter <stefw redhat com>
Date: Sat Feb 13 12:27:18 2016 +0100
build: Add redirect Makefile for when $srcdir != $builddir
autogen.sh | 8 +++++++-
build/Makefile.redirect | 9 +++++++++
2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 8a2a1f2..75857de 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -104,6 +104,12 @@ cd $ORIGDIR || exit $?
if test -z "$NOCONFIGURE"; then
$srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
- echo
+ # Put a redirect makefile here
+ if [ ! -f $srcdir/Makefile ]; then
+ cat $srcdir/build/Makefile.redirect > $srcdir/Makefile
+ printf "\nREDIRECT = %s\n" "$(realpath $ORIGDIR)" >> $srcdir/Makefile
+ fi
+
+ echo
echo "Now type 'make' to compile $PROJECT."
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]