# To enable remote tracking, set the following var to any non-empty string.
# Leaving this var empty will bind each git submodule to its saved commit.
-FUEL_TRACK_REMOTES ?= yes
+FUEL_TRACK_REMOTES ?=
.PHONY: all
all: release
@if [ -n "${FUEL_TRACK_REMOTES}" ]; then \
cd ${F_GIT_ROOT} && git submodule update --init --remote 2>/dev/null; \
else \
- git submodule update --init 2>/dev/null; \
+ cd ${F_GIT_ROOT} && git submodule update --init 2>/dev/null; \
fi
@touch $@
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`"; \
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:
.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