Date: Tue, 30 Jul 2013 05:33:25 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r323939 - in head/Mk: . Uses Message-ID: <201307300533.r6U5XPRc086812@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Tue Jul 30 05:33:25 2013 New Revision: 323939 URL: http://svnweb.freebsd.org/changeset/ports/323939 Log: Reduce code duplication by overwriting MAKE_CMD when it is different. Modified: head/Mk/Uses/fmake.mk head/Mk/Uses/gmake.mk head/Mk/bsd.port.mk Modified: head/Mk/Uses/fmake.mk ============================================================================== --- head/Mk/Uses/fmake.mk Tue Jul 30 05:32:11 2013 (r323938) +++ head/Mk/Uses/fmake.mk Tue Jul 30 05:33:25 2013 (r323939) @@ -19,21 +19,6 @@ IGNORE= Incorrect 'USES+= fmake:${fmake_ FMAKE= ${LOCALBASE}/bin/fmake BUILD_DEPENDS+= ${FMAKE}:${PORTSDIR}/devel/fmake CONFIGURE_ENV+= MAKE=${FMAKE} - -.if !target(do-build) -do-build: - @set -e ; (cd ${BUILD_WRKSRC}; if ! ${SETENV} ${MAKE_ENV} ${FMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}; then \ - if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ - ${ECHO_MSG} "===> Compilation failed unexpectedly."; \ - (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT} 75 79 ; \ - fi; \ - ${FALSE}; \ - fi) -.endif - -.if !target(do-install) -do-install: - @set -e ; (cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${FMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) -.endif +MAKE_CMD= ${FMAKE} .endif .endif Modified: head/Mk/Uses/gmake.mk ============================================================================== --- head/Mk/Uses/gmake.mk Tue Jul 30 05:32:11 2013 (r323938) +++ head/Mk/Uses/gmake.mk Tue Jul 30 05:33:25 2013 (r323939) @@ -17,26 +17,7 @@ IGNORE= Incorrect 'USES+= gmake:${gmake_ BUILD_DEPENDS+= gmake:${PORTSDIR}/devel/gmake CONFIGURE_ENV+= MAKE=${GMAKE} +MAKE_CMD= ${GMAKE} _USES_POST+= gmake -.endif - -.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GMAKE_MK_POST) -_INCLUDE_USES_GMAKE_MK_POST= yes - -.if !target(do-build) -do-build: - @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}; then \ - if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ - ${ECHO_MSG} "===> Compilation failed unexpectedly."; \ - (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT} 75 79 ; \ - fi; \ - ${FALSE}; \ - fi) -.endif - -.if !target(do-install) -do-install: - @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) -.endif .endif Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Tue Jul 30 05:32:11 2013 (r323938) +++ head/Mk/bsd.port.mk Tue Jul 30 05:33:25 2013 (r323939) @@ -3662,7 +3662,7 @@ do-configure: .if !target(do-build) do-build: - @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}; then \ + @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}; then \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ ${ECHO_MSG} "===> Compilation failed unexpectedly."; \ (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT} 75 79 ; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307300533.r6U5XPRc086812>