diff options
author | bapt <bapt@FreeBSD.org> | 2013-07-05 21:32:31 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2013-07-05 21:32:31 +0800 |
commit | fde8d225baec550babca88cd47f6809f2c52cc95 (patch) | |
tree | 5adc75298bfc194b39d13c22d8f8c04ea48cb72f | |
parent | 68df37980efc945f616f73246a5aebaaf06cd9ab (diff) | |
download | freebsd-ports-gnome-fde8d225baec550babca88cd47f6809f2c52cc95.tar.gz freebsd-ports-gnome-fde8d225baec550babca88cd47f6809f2c52cc95.tar.zst freebsd-ports-gnome-fde8d225baec550babca88cd47f6809f2c52cc95.zip |
Import new gmake.mk and rip out USE_GMAKE from bsd.port.mk
A USE_GMAKE stub as be created to help migration please now use USES=gmake
Reviewed by: bdrewery
Exp-run by: bdrewery
-rw-r--r-- | Mk/Uses/gmake.mk | 42 | ||||
-rw-r--r-- | Mk/bsd.port.mk | 29 |
2 files changed, 48 insertions, 23 deletions
diff --git a/Mk/Uses/gmake.mk b/Mk/Uses/gmake.mk new file mode 100644 index 000000000000..f17382d21789 --- /dev/null +++ b/Mk/Uses/gmake.mk @@ -0,0 +1,42 @@ +# $FreeBSD$ +# +# Provide support to use the GNU make +# +# MAINTAINER: portmgr@FreeBSD.org +# +# Feature: gmake +# Usage: USES=gmake +# + +.if !defined(_INCLUDE_USES_GMAKE_MK) +_INCLUDE_USES_GMAKE_MK= yes + +.if defined(gmake_ARGS) +IGNORE= Incorrect 'USES+= gmake:${gmake_ARGS}' gmake takes no arguments +.endif + +BUILD_DEPENDS+= gmake:${PORTSDIR}/devel/gmake +CONFIGURE_ENV+= MAKE=${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 diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index dd1251bbe83a..361fed521a63 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -320,9 +320,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # the system or installed from a port. # USE_CSTD - Override the default C language standard (gnu89, gnu99) # USE_BINUTILS - Use binutils suite from port instead of the version in base. -# USE_GMAKE - If set, this port uses gmake. -# GMAKE - Set to path of GNU make if not in $PATH. -# Default: gmake ## # USE_GHOSTSCRIPT # - If set, this port needs ghostscript to both @@ -1501,6 +1498,10 @@ PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg .include "${PORTSDIR}/Mk/bsd.pbi.mk" +.if defined(USE_GMAKE) +USES+= gmake +.endif + # Loading features .for f in ${USES} _f=${f:C/\:.*//g} @@ -1545,7 +1546,7 @@ _POSTMKINCLUDED= yes .for f in ${_USES_POST} _f=${f:C/\:.*//g} .if ${_f} != ${f} -${_f}_ARGS:= ${f:C/^[^\:]*\://g} +${_f}_ARGS:= ${f:C/^[^\:]*\://g} .endif .include "${USESDIR}/${_f}.mk" .endfor @@ -1696,10 +1697,6 @@ EXTRACT_DEPENDS+= ${LOCALBASE}/bin/xz:${PORTSDIR}/archivers/xz .if defined(USE_MAKESELF) EXTRACT_DEPENDS+= unmakeself:${PORTSDIR}/archivers/unmakeself .endif -.if defined(USE_GMAKE) -BUILD_DEPENDS+= gmake:${PORTSDIR}/devel/gmake -CONFIGURE_ENV+= MAKE=${GMAKE} -.endif .if defined(USE_GCC) || defined(USE_FORTRAN) .include "${PORTSDIR}/Mk/bsd.gcc.mk" @@ -3710,24 +3707,14 @@ do-configure: .if !target(do-build) do-build: -.if defined(USE_GMAKE) - @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}; then \ - if [ x != x${BUILD_FAIL_MESSAGE} ] ; then \ - ${ECHO_MSG} "===> Compilation failed unexpectedly."; \ - (${ECHO_CMD} ${BUILD_FAIL_MESSAGE}) | ${FMT} 75 79 ; \ - fi; \ - ${FALSE}; \ - fi) -.else @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}; then \ - if [ x != x${BUILD_FAIL_MESSAGE} ] ; then \ + if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ ${ECHO_MSG} "===> Compilation failed unexpectedly."; \ (${ECHO_CMD} ${BUILD_FAIL_MESSAGE}) | ${FMT} 75 79 ; \ fi; \ ${FALSE}; \ fi) .endif -.endif # Check conflicts @@ -3847,12 +3834,8 @@ check-install-conflicts: .if !target(do-install) do-install: -.if defined(USE_GMAKE) - @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) -.else # !defined(USE_GMAKE) @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) .endif -.endif # Package |