From 3fc2e883124b3efa628f4e3c983ee0124245095c Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 16 Sep 2018 13:58:41 +0200 Subject: [PATCH] make: add diff and mfc targets --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Makefile b/Makefile index 70ad29f3c..62cd8a2fa 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,8 @@ PAGER?= less +PLUGIN_ABI= 18.7 + all: @cat ${.CURDIR}/README.md | ${PAGER} @@ -51,6 +53,32 @@ ${TARGET}: . endfor .endfor +diff: + @git diff --stat -p stable/${PLUGIN_ABI} + +ARGS= mfc + +# handle argument expansion for required targets +.for TARGET in ${.TARGETS} +_TARGET= ${TARGET:C/\-.*//} +.if ${_TARGET} != ${TARGET} +.for ARGUMENT in ${ARGS} +.if ${_TARGET} == ${ARGUMENT} +${_TARGET}_ARGS+= ${TARGET:C/^[^\-]*(\-|\$)//:S/,/ /g} +${TARGET}: ${_TARGET} +.endif +.endfor +${_TARGET}_ARG= ${${_TARGET}_ARGS:[0]} +.endif +.endfor + +mfc: + @git checkout stable/${PLUGIN_ABI} +.for MFC in ${mfc_ARGS} + @git cherry-pick -x ${MFC} +.endfor + @git checkout master + license: @${.CURDIR}/Scripts/license . > ${.CURDIR}/LICENSE