Add fixes for Makefile wrapper. This is a really bad idea.

This commit is contained in:
Laurence Withers 2008-03-01 17:01:45 +00:00
parent 0cb10a9bfd
commit 99d36b9980
3 changed files with 21 additions and 9 deletions

View File

@ -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, ...

View File

@ -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

View File

@ -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