summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-05-14 04:26:15 +0000
committerjlam <jlam@pkgsrc.org>2005-05-14 04:26:15 +0000
commitd85f4605d715b2848c6b0b5d557e69c5c722cf34 (patch)
tree760d766792b6a8bb2a931924505f1c34d657585f /mk
parentfcf10f8e3373563b02877323880025a7027360fa (diff)
downloadpkgsrc-d85f4605d715b2848c6b0b5d557e69c5c722cf34.tar.gz
Simplify the check for whether we need a patch tool or not -- we simply
check for whether ${PATCHDIR} exists or not, or whether PATCHFILES is defined or not. This avoids the use of != in a variable definition just to find out if we need patch or not.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk21
1 files changed, 3 insertions, 18 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 112d84bf928..a4e3b0216cd 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1647 2005/05/14 02:03:00 rillig Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1648 2005/05/14 04:26:15 jlam Exp $
#
# This file is in the public domain.
#
@@ -446,23 +446,8 @@ CONFIGURE_ENV+= M4=${TOOLS_M4:Q} YACC=${TOOLS_YACC:Q}
TOUCH_FLAGS?= -f
-.if !defined(_PKGSRC_USE_PATCH)
-. if defined(PATCHFILES) && !empty(PATCHFILES)
-_PKGSRC_USE_PATCH= yes
-. elif !exists(${PATCHDIR})
-_PKGSRC_USE_PATCH= no
-. else
-_PKGSRC_USE_PATCH!= \
- if ${TEST} "`${ECHO} ${PATCHDIR}/patch-*`" != "${PATCHDIR}/patch-*"; then \
- ${ECHO} yes; \
- else \
- ${ECHO} no; \
- fi
-. endif
-.endif
-MAKEVARS+= _PKGSRC_USE_PATCH
-
-.if !empty(_PKGSRC_USE_PATCH:M[yY][eE][sS])
+.if (defined(PATCHFILES) && !empty(PATCHFILES)) || \
+ (defined(PATCHDIR) && exists(${PATCHDIR}))
. if empty(_USE_NEW_TOOLS:M[yY][eE][sS])
USE_GNU_TOOLS+= patch
. else