aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1995-06-24 10:27:23 +0000
committerSatoshi Asami <asami@FreeBSD.org>1995-06-24 10:27:23 +0000
commit9688e7d314996de30b87685f76c328a1a1064cd3 (patch)
treed44dc876757e9e3a9ba2cae4edff69470b6a9892 /Mk/bsd.port.mk
parent6510b37ab242b30a477d3f3ce13d544c09b42c69 (diff)
downloadports-9688e7d314996de30b87685f76c328a1a1064cd3.tar.gz
ports-9688e7d314996de30b87685f76c328a1a1064cd3.zip
Notes
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk23
1 files changed, 20 insertions, 3 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index ef9df00c5ed8..76f25614e451 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3,7 +3,7 @@
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
#
-# $Id: bsd.port.mk,v 1.164 1995/05/29 13:46:38 asami Exp $
+# $Id: bsd.port.mk,v 1.165 1995/06/06 10:56:34 asami Exp $
#
# Please view me with 4 column tabs!
@@ -140,6 +140,9 @@
# package - Create a package from an _installed_ port.
# describe - Try to generate a one-line description for each port for
# use in INDEX files and the like.
+# checkpatch - Do a "patch -C" instead of a "patch". Note that it may
+# give incorrect results if multiple patches deal with
+# the same file.
# checksum - Use files/md5 to ensure that your distfiles are valid
# makesum - Generate files/md5 (only do this for your own ports!)
#
@@ -228,6 +231,11 @@ PATCH_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_STRIP}
PATCH_DIST_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP}
.endif
+.if defined(PATCH_CHECK_ONLY)
+PATCH_ARGS+= -C
+PATCH_DIST_ARGS+= -C
+.endif
+
EXTRACT_CMD?= tar
EXTRACT_SUFX?= .tar.gz
# Backwards compatability.
@@ -518,7 +526,6 @@ do-patch:
${PATCH} ${PATCH_ARGS} < $$i; \
done; \
fi
- @${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE}
.else
@if [ -d ${PATCHDIR} ]; then \
${ECHO_MSG} "===> Applying FreeBSD patches for ${PKGNAME}" ; \
@@ -526,7 +533,6 @@ do-patch:
do ${PATCH} ${PATCH_ARGS} < $$i; \
done;\
fi
- @${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE}
.endif
.endif
@@ -679,8 +685,19 @@ ${PATCH_COOKIE}:
DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \
sh ${SCRIPTDIR}/post-patch; \
fi
+.if !defined(PATCH_CHECK_ONLY)
@${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE}
.endif
+.endif
+
+# Checkpatch
+#
+# Special target to verify patches
+
+.if !target(checkpatch)
+checkpatch:
+ @${MAKE} PATCH_CHECK_ONLY=yes ${.MAKEFLAGS} patch
+.endif
# Configure