X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=mcp%2Fpatches%2FMakefile;h=e0a1c34ced9b31c783f75cd749140f73777adc68;hb=4e4b7928649577beed448004acb9ed5f33700301;hp=dc87832b8f78e9cbc435cb0f9b1e4b581dd4020a;hpb=a1a413ad65c31ebf5dc42924f7ed04ab02a04872;p=fuel.git diff --git a/mcp/patches/Makefile b/mcp/patches/Makefile index dc87832b8..e0a1c34ce 100644 --- a/mcp/patches/Makefile +++ b/mcp/patches/Makefile @@ -25,7 +25,7 @@ FPATCHES = $(shell find ${F_PATCH_DIR} -name '*.patch') # In order to keep things sort of separate, we should only pass up (to main # Makefile) the fully-patched repos, and gather any fingerprinting info here. -# Fuel@OPNFV relies on upstream git repos (one per component) in 1 of 2 ways: +# OPNFV Fuel relies on upstream git repos (one per component) in 1 of 2 ways: # - pinned down to tag objects (e.g. "9.0.1") # - tracking upstream remote HEAD on a stable or master branch # FIXME(alav): Should we support mixed cases? (e.g. pin down only fuel-main) @@ -59,6 +59,7 @@ sub: .cachefuelinfo patches-export: sub @git submodule -q foreach ' \ SUB_DIR=${F_PATCH_DIR}/$$name; \ + rm -rf $$SUB_DIR/*; \ git tag | awk "!/root/ && /${F_OPNFV_TAG}-fuel/" | while read F_TAG; do \ SUB_FEATURE=`dirname $${F_TAG#${F_OPNFV_TAG}-fuel/}`; \ echo "`tput setaf 2`-- exporting $$name ($$F_TAG)`tput sgr0`"; \ @@ -95,6 +96,15 @@ patches-import: sub .cachepatched git tag ${F_OPNFV_TAG}' @touch $@ +# Add copyright header to patch files if not already present +.PHONY: patches-copyright +patches-copyright: + @grep -e "Copyright (c)" -L ${FPATCHES} | while read p_file; do \ + ptmp=`mktemp` && \ + cat fuel-patch-copyright.template $$p_file > $$ptmp && \ + mv $$ptmp $$p_file; \ + done + # Clean any changes made to submodules, checkout upstream Fuel root commit .PHONY: clean clean: @@ -109,7 +119,7 @@ clean: .PHONY: deepclean deepclean: clean - @git submodule deinit -f ${F_GIT_ROOT} + @cd ${F_GIT_ROOT} && git submodule deinit -f ${F_GIT_ROOT} @rm -f .cache* .PHONY: release