From 24e5059aec315c7c6baa7668d352965315487629 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 21 Feb 2004 15:55:26 +0000 Subject: Create a simple Makefile when building outside the source tree (Needs improvement, but works well enough in most cases) svn-id: r12972 --- configure | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/configure b/configure index 81ccfb0815..0808696ce5 100755 --- a/configure +++ b/configure @@ -843,3 +843,21 @@ OBJS += $OBJS DEFINES += $DEFINES LDFLAGS += $LDFLAGS EOF + +# +# Create a custom Makefile when building outside the source tree +# TODO: Add a better check than just looking for 'Makefile' +# +if test ! -f Makefile ; then +_srcdir=`dirname $0` +echo "Creating Makefile" + +cat > Makefile << EOF +# -------- Generated by configure ----------- +srcdir = $_srcdir +vpath %.cpp \$(srcdir) +vpath %.h \$(srcdir) +include \$(srcdir)/Makefile +EOF + +fi -- cgit v1.2.3