diff --git a/Makefile b/Makefile index e2fbad5ce..3b1e8feb4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 2015-2018 Franco Fichtner +# Copyright (c) 2015-2019 Franco Fichtner # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -73,11 +73,21 @@ diff: @git diff --stat -p stable/${PLUGIN_ABI} ${.CURDIR}/${diff_ARGS:[1]} mfc: - @git checkout stable/${PLUGIN_ABI} .for MFC in ${mfc_ARGS} +.if exists(${MFC}) + @git diff --stat -p stable/${PLUGIN_ABI} ${.CURDIR}/${MFC} > /tmp/mfc.diff + @git checkout stable/${PLUGIN_ABI} + @git apply /tmp/mfc.diff + @git add ${.CURDIR} + @if ! git diff --quiet HEAD; then \ + git commit -m "${MFC}: sync with master"; \ + fi +.else + @git checkout stable/${PLUGIN_ABI} @git cherry-pick -x ${MFC} -.endfor +.endif @git checkout master +.endfor license: @${.CURDIR}/Scripts/license . > ${.CURDIR}/LICENSE