aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses/fmake.mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2013-06-20 17:48:08 +0800
committerbapt <bapt@FreeBSD.org>2013-06-20 17:48:08 +0800
commite6c57e0b86d6658fa269a9e899378b52e032617f (patch)
tree4b69e359c22ec2c9fd2979f29da86012373959d2 /Mk/Uses/fmake.mk
parentc41713132e54482f1cd5c2f28c67023e04144832 (diff)
downloadfreebsd-ports-gnome-e6c57e0b86d6658fa269a9e899378b52e032617f.tar.gz
freebsd-ports-gnome-e6c57e0b86d6658fa269a9e899378b52e032617f.tar.zst
freebsd-ports-gnome-e6c57e0b86d6658fa269a9e899378b52e032617f.zip
Add a new USES: fmake
This uses will allow to build ports using the legacy FreeBSD make, for ports not compatible with bmake
Diffstat (limited to 'Mk/Uses/fmake.mk')
-rw-r--r--Mk/Uses/fmake.mk39
1 files changed, 39 insertions, 0 deletions
diff --git a/Mk/Uses/fmake.mk b/Mk/Uses/fmake.mk
new file mode 100644
index 000000000000..3eb07038b017
--- /dev/null
+++ b/Mk/Uses/fmake.mk
@@ -0,0 +1,39 @@
+# $FreeBSD$
+#
+# Provide support to use the legacy FreeBSD make
+#
+# MAINTAINER: portmgr@FreeBSD.org
+#
+# Feature: fmake
+# Usage: USES=fmake
+#
+
+.if !defined(_INCLUDE_USES_FMAKE_MK)
+_INCLUDE_USES_FMAKE_MK= yes
+
+.if defined(fmake_ARGS)
+IGNORE= Incorrect 'USES+= fmake:${fmake_ARGS}' fmake takes no arguments
+.endif
+
+.if defined(.PARSEDIR)
+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
+.endif
+.endif