Commit 324f2d2e authored by Stef Walter's avatar Stef Walter

build: Make it easy to run 'make' when $srcdir != $builddir

parent 562a3f5e
......@@ -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
# This redirects all make targets to builddir
all:
$(MAKE) -C $(REDIRECT) all
%:
$(MAKE) -C $(REDIRECT) $@
ifeq ($(MAKEFLAGS), )
JOBARG = -j4
endif
# REDIRECT=build
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment