diff options
author | Stef Walter <stefw@redhat.com> | 2016-02-13 12:27:18 +0100 |
---|---|---|
committer | Stef Walter <stefw@redhat.com> | 2016-02-13 12:27:18 +0100 |
commit | a3a6f5c9d842bc7a6c578bccd277368fd21faf96 (patch) | |
tree | 9b48cd132ecb96b5516a58d09a7dca175eaeb17b | |
parent | ba2c57d842a1e40cc8e410e33c28b42ed5a4e3b6 (diff) | |
download | libsecret-a3a6f5c9d842bc7a6c578bccd277368fd21faf96.tar.gz |
build: Add redirect Makefile for when $srcdir != $builddir
-rwxr-xr-x | autogen.sh | 8 | ||||
-rw-r--r-- | build/Makefile.redirect | 9 |
2 files changed, 16 insertions, 1 deletions
@@ -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 |