From 99d36b9980ffa91e2675719ffc961e2bcc332685 Mon Sep 17 00:00:00 2001 From: Laurence Withers Date: Sat, 1 Mar 2008 17:01:45 +0000 Subject: [PATCH] Add fixes for Makefile wrapper. This is a really bad idea. --- scripts/build.make.none/Makefile | 3 +-- scripts/build.make.none/build.install-make | 16 +++++++++++++--- scripts/build.make.none/build.make | 11 +++++++---- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/scripts/build.make.none/Makefile b/scripts/build.make.none/Makefile index a981545..fe16bad 100644 --- a/scripts/build.make.none/Makefile +++ b/scripts/build.make.none/Makefile @@ -5,8 +5,7 @@ # http://www.gnu.org/copyleft/gpl.html for details. # -# Build project, object files go into MAKE_OBJDIR. Uses CC, CFLAGS, etc. -# from `@P@/config'. +# Build files. default: # Install files according to PREFIX, INSTALL_PREFIX, BINDIR, LIBDIR, ... diff --git a/scripts/build.make.none/build.install-make b/scripts/build.make.none/build.install-make index 9d868c9..1b9408b 100644 --- a/scripts/build.make.none/build.install-make +++ b/scripts/build.make.none/build.install-make @@ -4,13 +4,23 @@ echo "Installing @NAME@ (via Makefile)" export MAKE_OBJDIR="$(pwd)/obj/@NAME@" mkdir -p "${MAKE_OBJDIR}" -# @TODO@ pass additional flags here -make -C "src/@NAME@/" install \ +# @TODO@ pass in additional arguments here (in particular CFLAGS and LDLIBS) +VPATH="$(pwd)/src/@NAME@" \ + make -f "$(pwd)/src/@NAME@/Makefile" \ + -C "${MAKE_OBJDIR}" \ MAKE_OBJDIR="${MAKE_OBJDIR}" \ INSTALL_PREFIX="${INSTALL_PREFIX}" \ PREFIX="${PREFIX}" \ BINDIR="${BINDIR}" \ - LIBDIR="${LIBDIR}" + SBINDIR="${SBINDIR}" \ + LIBDIR="${LIBDIR}" \ + CGIDIR="${CGIDIR}" \ + WEBDIR="${WEBDIR}" \ + SHAREDIR="${SHAREDIR}" \ + CC="${CC}" \ + CFLAGS="${CFLAGS}" \ + LDLIBS="${LDLIBS}" \ + install if [ "$?" -eq 0 ] then diff --git a/scripts/build.make.none/build.make b/scripts/build.make.none/build.make index e1aab86..8207c2c 100644 --- a/scripts/build.make.none/build.make +++ b/scripts/build.make.none/build.make @@ -2,11 +2,14 @@ echo "Building @NAME@ (via Makefile)" export MAKE_OBJDIR="$(pwd)/obj/@NAME@" mkdir -p "${MAKE_OBJDIR}" -# @TODO@ pass in additional arguments here -make -C "src/@NAME@/" default \ - MAKE_OBJDIR="${MAKE_OBJDIR}" \ +# @TODO@ pass in additional arguments here (in particular CFLAGS and LDLIBS) +VPATH="$(pwd)/src/@NAME@" \ + make -f "$(pwd)/src/@NAME@/Makefile" \ + -C "${MAKE_OBJDIR}" \ CC="${CC}" \ - CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS}" \ + LDLIBS="" \ + default if [ "$?" -eq 0 ] then