Framework: allow MFC from subdir
This commit is contained in:
parent
0319179a35
commit
6a265fb987
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2016-2021 Franco Fichtner <franco@opnsense.org>
|
# Copyright (c) 2016-2022 Franco Fichtner <franco@opnsense.org>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
@ -121,18 +121,22 @@ ensure-stable:
|
||||||
git config branch.stable/${PLUGIN_ABI}.remote origin; \
|
git config branch.stable/${PLUGIN_ABI}.remote origin; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
diff_ARGS?= .
|
||||||
|
|
||||||
diff: ensure-stable
|
diff: ensure-stable
|
||||||
@git diff --stat -p stable/${PLUGIN_ABI} ${.CURDIR}/${diff_ARGS:[1]}
|
@git diff --stat -p stable/${PLUGIN_ABI} ${.CURDIR}/${diff_ARGS:[1]}
|
||||||
|
|
||||||
|
mfc_ARGS?= .
|
||||||
|
|
||||||
mfc: ensure-stable
|
mfc: ensure-stable
|
||||||
.for MFC in ${mfc_ARGS}
|
.for MFC in ${mfc_ARGS}
|
||||||
.if exists(${MFC})
|
.if exists(${MFC})
|
||||||
@git diff --stat -p stable/${PLUGIN_ABI} ${.CURDIR}/${MFC} > /tmp/mfc.diff
|
@git diff --stat -p stable/${PLUGIN_ABI} ${.CURDIR}/${MFC} > /tmp/mfc.diff
|
||||||
@git checkout stable/${PLUGIN_ABI}
|
@git checkout stable/${PLUGIN_ABI}
|
||||||
@git apply /tmp/mfc.diff
|
@git apply /tmp/mfc.diff
|
||||||
@git add ${.CURDIR}
|
@git add ${.CURDIR}/${MFC}
|
||||||
@if ! git diff --quiet HEAD; then \
|
@if ! git diff --quiet HEAD; then \
|
||||||
git commit -m "${MFC}: sync with master"; \
|
git commit -m "${MFC:S/^.$/${PLUGIN_DIR}/}: sync with master"; \
|
||||||
fi
|
fi
|
||||||
.else
|
.else
|
||||||
@git checkout stable/${PLUGIN_ABI}
|
@git checkout stable/${PLUGIN_ABI}
|
||||||
|
|
|
@ -80,6 +80,10 @@ PLUGIN_CONFLICTS+= ${${_PLUGIN_VARIANT}_NAME}
|
||||||
PLUGIN_DEPENDS+= ${${PLUGIN_VARIANT}_DEPENDS}
|
PLUGIN_DEPENDS+= ${${PLUGIN_VARIANT}_DEPENDS}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if !empty(PLUGIN_NAME)
|
||||||
|
PLUGIN_DIR?= ${.CURDIR:S/\// /g:[-2]}/${.CURDIR:S/\// /g:[-1]}
|
||||||
|
.endif
|
||||||
|
|
||||||
PLUGIN_PKGNAMES= ${PLUGIN_PREFIX}${PLUGIN_NAME}${PLUGIN_SUFFIX} \
|
PLUGIN_PKGNAMES= ${PLUGIN_PREFIX}${PLUGIN_NAME}${PLUGIN_SUFFIX} \
|
||||||
${PLUGIN_PREFIX}${PLUGIN_NAME}
|
${PLUGIN_PREFIX}${PLUGIN_NAME}
|
||||||
.for CONFLICT in ${PLUGIN_CONFLICTS}
|
.for CONFLICT in ${PLUGIN_CONFLICTS}
|
||||||
|
|
Loading…
Reference in New Issue