Reduce code duplication by overwriting MAKE_CMD when it is different.
This commit is contained in:
parent
b3a72c888c
commit
aa6a847926
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=323939
3 changed files with 3 additions and 37 deletions
|
@ -19,21 +19,6 @@ IGNORE= Incorrect 'USES+= fmake:${fmake_ARGS}' fmake takes no arguments
|
|||
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
|
||||
|
|
|
@ -17,26 +17,7 @@ IGNORE= Incorrect 'USES+= gmake:${gmake_ARGS}' gmake takes no arguments
|
|||
|
||||
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
|
||||
|
|
|
@ -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 ; \
|
||||
|
|
Loading…
Reference in a new issue