summaryrefslogtreecommitdiff
path: root/mk/pkgtasks/bsd.pkgtasks.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2017-06-02 19:13:34 +0000
committerjlam <jlam@pkgsrc.org>2017-06-02 19:13:34 +0000
commit992e5debf9edcae6236ea9e986dcb64070b195a1 (patch)
tree247922e21325eab96bff9e1fcd327abac59238c9 /mk/pkgtasks/bsd.pkgtasks.mk
parentd8f9cdd5d0a0a6550530beeac5e9cbddd92cc1e3 (diff)
downloadpkgsrc-992e5debf9edcae6236ea9e986dcb64070b195a1.tar.gz
Be more flexible about adding dependency on pkgtasks.
Check the value of ${USE_PKGTASKS} at the time of reference for the DEPENDS variable to see whether "pkgtasks" needs to be added or not.
Diffstat (limited to 'mk/pkgtasks/bsd.pkgtasks.mk')
-rw-r--r--mk/pkgtasks/bsd.pkgtasks.mk7
1 files changed, 3 insertions, 4 deletions
diff --git a/mk/pkgtasks/bsd.pkgtasks.mk b/mk/pkgtasks/bsd.pkgtasks.mk
index 841b0f310e2..0bcfbe74355 100644
--- a/mk/pkgtasks/bsd.pkgtasks.mk
+++ b/mk/pkgtasks/bsd.pkgtasks.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkgtasks.mk,v 1.2 2017/06/02 19:13:26 jlam Exp $
+# $NetBSD: bsd.pkgtasks.mk,v 1.3 2017/06/02 19:13:34 jlam Exp $
#
# Copyright (c) 2017 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -142,9 +142,8 @@ USE_PKGTASKS= no
.include "${PKGSRCDIR}/mk/pkgtasks/usergroup.mk"
# Add a dependency on pkgtasks if package tasks are needed.
-.if "${USE_PKGTASKS:tl}" == "yes"
-DEPENDS+= pkgtasks-1>=1.9:../../pkgtools/pkgtasks
-.endif
+_PKGTASKS_DEPENDS= pkgtasks-1>=1.9:../../pkgtools/pkgtasks
+DEPENDS+= ${"${USE_PKGTASKS:tl}" == "yes":?${_PKGTASKS_DEPENDS}:}
TASK_MODULE_DIR?= ${LOCALBASE}/share/pkgtasks-1
# PKGTASKS_DATAFILE