aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2013-10-03 14:25:13 +0800
committerbapt <bapt@FreeBSD.org>2013-10-03 14:25:13 +0800
commit3eb9f01ecf777dfb068f125c089d30af1d0d3639 (patch)
tree8a6034db45137e5d09a31c41995b2293023fb1f9 /Mk
parent46b673a192436f3742235c5bdc78f6c561c1c651 (diff)
downloadfreebsd-ports-graphics-3eb9f01ecf777dfb068f125c089d30af1d0d3639.tar.gz
freebsd-ports-graphics-3eb9f01ecf777dfb068f125c089d30af1d0d3639.tar.zst
freebsd-ports-graphics-3eb9f01ecf777dfb068f125c089d30af1d0d3639.zip
Introduce the new "scons" USES. The goal is to replace the old bsd.scons.mk
Instead of redifining the building target, let's just reuse the existing ones. Bonus, MAKE_JOBS is now respected
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/scons.mk30
-rw-r--r--Mk/bsd.sanity.mk4
2 files changed, 34 insertions, 0 deletions
diff --git a/Mk/Uses/scons.mk b/Mk/Uses/scons.mk
new file mode 100644
index 00000000000..65247fdb63e
--- /dev/null
+++ b/Mk/Uses/scons.mk
@@ -0,0 +1,30 @@
+# $FreeBSD$
+#
+# Provide support to use the scons
+#
+# MAINTAINER: python@FreeBSD.org
+#
+# Feature: scons
+# Usage: USES=scons
+#
+
+.if !defined(_INCLUDE_USES_SCONS_MK)
+_INCLUDE_USES_SCONS_MK= yes
+
+.if defined(scons_ARGS)
+IGNORE= Incorrect 'USES+= scons:${scons_ARGS}' scons takes no arguments
+.endif
+
+MAKEFILE= #
+MAKE_FLAGS= #
+ALL_TARGET= #
+LIBPATH?= ${LOCALBASE}/lib
+CPPPATH?= ${LOCALBASE}/include
+SCONS= ${LOCALBASE}/bin/scons
+BUILD_DEPENDS+= ${SCONS}:${PORTSDIR}/devel/scons
+MAKE_CMD?= ${SCONS}
+MAKE_ENV+= PKGCONFIGDIR="${PKGCONFIGDIR}" \
+ CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \
+ LIBPATH="${LIBPATH}" CPPPATH="${CPPPATH}"
+
+.endif
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
index 7e255135148..087ba46d8dd 100644
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -100,6 +100,10 @@ DEV_WARNING+= "Please use the new format for LIB_DEPENDS, see handbook for detai
DEV_WARNING+= "USE_TCL and USE_TK are deprecated, please use USES=tcl or USES=tk"
.endif
+.if defined(USE_SCONS)
+DEV_WARNING+= "USE_SCONS=yes is deprecated, please use USES=scons"
+.endif
+
.if !defined(NO_STAGE)
.for a in 1 2 3 4 5 6 7 8 9 L N
.if defined(MAN${a})