Merge branch 'master' of lwithers.me.uk:git/lw-build-system

This commit is contained in:
Laurence Withers 2008-03-06 23:56:36 +00:00
commit b8cd5a7079
3 changed files with 21 additions and 9 deletions

View File

@ -5,8 +5,7 @@
# http://www.gnu.org/copyleft/gpl.html for details. # http://www.gnu.org/copyleft/gpl.html for details.
# #
# Build project, object files go into MAKE_OBJDIR. Uses CC, CFLAGS, etc. # Build files.
# from `@P@/config'.
default: default:
# Install files according to PREFIX, INSTALL_PREFIX, BINDIR, LIBDIR, ... # 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@" export MAKE_OBJDIR="$(pwd)/obj/@NAME@"
mkdir -p "${MAKE_OBJDIR}" mkdir -p "${MAKE_OBJDIR}"
# @TODO@ pass additional flags here # @TODO@ pass in additional arguments here (in particular CFLAGS and LDLIBS)
make -C "src/@NAME@/" install \ VPATH="$(pwd)/src/@NAME@" \
make -f "$(pwd)/src/@NAME@/Makefile" \
-C "${MAKE_OBJDIR}" \
MAKE_OBJDIR="${MAKE_OBJDIR}" \ MAKE_OBJDIR="${MAKE_OBJDIR}" \
INSTALL_PREFIX="${INSTALL_PREFIX}" \ INSTALL_PREFIX="${INSTALL_PREFIX}" \
PREFIX="${PREFIX}" \ PREFIX="${PREFIX}" \
BINDIR="${BINDIR}" \ BINDIR="${BINDIR}" \
LIBDIR="${LIBDIR}" SBINDIR="${SBINDIR}" \
LIBDIR="${LIBDIR}" \
CGIDIR="${CGIDIR}" \
WEBDIR="${WEBDIR}" \
SHAREDIR="${SHAREDIR}" \
CC="${CC}" \
CFLAGS="${CFLAGS}" \
LDLIBS="${LDLIBS}" \
install
if [ "$?" -eq 0 ] if [ "$?" -eq 0 ]
then then

View File

@ -2,11 +2,14 @@ echo "Building @NAME@ (via Makefile)"
export MAKE_OBJDIR="$(pwd)/obj/@NAME@" export MAKE_OBJDIR="$(pwd)/obj/@NAME@"
mkdir -p "${MAKE_OBJDIR}" mkdir -p "${MAKE_OBJDIR}"
# @TODO@ pass in additional arguments here # @TODO@ pass in additional arguments here (in particular CFLAGS and LDLIBS)
make -C "src/@NAME@/" default \ VPATH="$(pwd)/src/@NAME@" \
MAKE_OBJDIR="${MAKE_OBJDIR}" \ make -f "$(pwd)/src/@NAME@/Makefile" \
-C "${MAKE_OBJDIR}" \
CC="${CC}" \ CC="${CC}" \
CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS}" \
LDLIBS="" \
default
if [ "$?" -eq 0 ] if [ "$?" -eq 0 ]
then then