diff options
author | Satoshi Asami <asami@FreeBSD.org> | 1995-06-24 10:27:23 +0000 |
---|---|---|
committer | Satoshi Asami <asami@FreeBSD.org> | 1995-06-24 10:27:23 +0000 |
commit | 9688e7d314996de30b87685f76c328a1a1064cd3 (patch) | |
tree | d44dc876757e9e3a9ba2cae4edff69470b6a9892 /Mk/bsd.port.mk | |
parent | Added kon. (diff) |
Add a "checkpatch" target that does a "patch -C" instead of a "patch".
Note that the two "touch"s I took out from do-patch shouldn't have
been there in the first place.
This target may give incorrent results if two separate patches deal
with the same file, and their hunks overlap. (But having those kinds
of patches are bad, and they should be merged anyway.)
Reviewed by: hsu
Notes
Notes:
svn path=/head/; revision=1870
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r-- | Mk/bsd.port.mk | 23 |
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 |