From 130b8f23176c3f3b2724ecedcf7f62fe4df11d2c Mon Sep 17 00:00:00 2001 From: Ade Lovett Date: Thu, 16 Jun 2005 21:52:56 +0000 Subject: [PATCH] Add USE_ACLOCAL_VER= (automake-version), another entry point into using the various GNU autotools, running "aclocal" at configuration time, prior to any other tools. This should allow a number of ports Makefiles to be cleaned up with respect to their explicit calling of ${ACLOCAL} PR: 41945 (reworked for current reality) Submitted by: Bruce M Simpson --- Mk/bsd.autotools.mk | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/Mk/bsd.autotools.mk b/Mk/bsd.autotools.mk index caed6ad08831..43004b0b2fac 100644 --- a/Mk/bsd.autotools.mk +++ b/Mk/bsd.autotools.mk @@ -33,12 +33,21 @@ Autotools_Include_MAINTAINER= ade@FreeBSD.org # - Port wishes to use automake, including the configuration step # - Implies GNU_CONFIGURE?=yes and WANT_AUTOMAKE_VER= # +# USE_ACLOCAL_VER= +# - Port wishes to use aclocal, including the configuration step +# - Implies GNU_CONFIGURE?=yes and WANT_AUTOMAKE_VER= +# # WANT_AUTOMAKE_VER= # - Port needs access to the automake build environment # # AUTOMAKE_ARGS=... # - Extra arguments passed to automake during configure step # +# ACLOCAL_ARGS=... +# - Arguments passed to aclocal during configure step +# Defaults to "--acdir=${ACLOCAL_DIR}" if USE_ACLOCAL_VER specified, +# empty (and unused) otherwise +# #--------------------------------------------------------------------------- # # USE_AUTOCONF_VER= @@ -100,7 +109,7 @@ BROKEN= "WANT_${i} deprecated: replace with WANT_${i}_VER=..." .endfor #--------------------------------------------------------------------------- -# AUTOMAKE +# AUTOMAKE/ACLOCAL #--------------------------------------------------------------------------- .if defined(USE_AUTOMAKE_VER) @@ -108,6 +117,11 @@ WANT_AUTOMAKE_VER?= ${USE_AUTOMAKE_VER} GNU_CONFIGURE?= yes .endif +.if defined(USE_ACLOCAL_VER) +WANT_AUTOMAKE_VER?= ${USE_ACLOCAL_VER} +GNU_CONFIGURE?= yes +.endif + .if defined(WANT_AUTOMAKE_VER) AUTOMAKE_SUFFIX= ${WANT_AUTOMAKE_VER} @@ -130,12 +144,14 @@ AUTOMAKE_VERSION= ${WANT_AUTOMAKE_VER} AUTOMAKE_DEPENDS= ${AUTOMAKE}:${PORTSDIR}/devel/automake${AUTOMAKE_SUFFIX} BUILD_DEPENDS+= ${AUTOMAKE_DEPENDS} -# XXX: here be dragons, for some reason -# . if ${WANT_AUTOMAKE_VER} == 14 AUTOMAKE_ARGS+= -i . endif +. if defined(USE_ACLOCAL_VER) +ACLOCAL_ARGS?= --acdir=${ACLOCAL_DIR} +. endif + .endif #--------------------------------------------------------------------------- @@ -300,6 +316,10 @@ AUTOHEADER_ENV+=${AUTOTOOLS_VARS} # .if !target(run-autotools) run-autotools: +. if defined(USE_ACLOCAL_VER) + @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL} \ + ${ACLOCAL_ARGS}) +. endif . if defined(USE_AUTOMAKE_VER) @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOMAKE} \ ${AUTOMAKE_ARGS})