[docs] Use RTD links for OPNFV Fuel docs refs
[armband.git] / Makefile
index 43edd22..841b6b7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,14 @@ export REVSTATE
 
 include armband-fuel-config.mk
 
-all: release
+all: upgrade
+
+# Ignore release tag and upgrade Armband to latest change on <branch>/HEAD
+.PHONY: upgrade
+upgrade:
+       @git fetch -u origin ${A_BRANCH}:${A_BRANCH}
+       @git checkout ${A_BRANCH}
+       @$(MAKE) -e submodules-clean patches-import
 
 # Fetch & update git submodules, checkout remote HEAD
 .PHONY: submodules-init
@@ -42,12 +49,11 @@ submodules-init: .submodules-init
        else \
                git submodule update --init 2>/dev/null; \
        fi
-       @ln -sf ${A_FUEL_BASE}/ci/clean_cache.sh ${ARMBAND_BASE}/ci/clean_cache.sh
        @touch $@
 
 # Clean any changes made to submodules, checkout Armband root commit
 .PHONY: submodules-clean
-submodules-clean: .submodules-init
+submodules-clean:
        @git submodule -q foreach ' \
                git am -q --abort 2>/dev/null; \
                git checkout -q -f ${A_OPNFV_TAG}-root 2>/dev/null; \
@@ -55,13 +61,15 @@ submodules-clean: .submodules-init
                git tag | grep ${A_OPNFV_TAG} | xargs git tag -d > /dev/null 2>&1; \
                git reset -q --hard HEAD; \
                git clean -xdff'
-       @rm -f .submodules-patched
+       @rm -f .submodules-*
+       @$(MAKE) -e submodules-init
 
 # Generate patches from submodules
 .PHONY: patches-export
 patches-export: .submodules-init
        @git submodule -q foreach ' \
                SUB_DIR=${A_PATCH_DIR}/$$name; \
+               rm -rf $$SUB_DIR/*; \
                git tag | awk "!/root/ && /${A_OPNFV_TAG}-fuel/" | while read A_TAG; do \
                        SUB_FEATURE=`dirname $${A_TAG#${A_OPNFV_TAG}-fuel/}`; \
                        echo "`tput setaf 2`== exporting $$name ($$A_TAG)`tput sgr0`"; \
@@ -129,10 +137,8 @@ fuel-patches-clean:
 # Add copyright header to patch files if not already present
 .PHONY: patches-copyright
 patches-copyright:
-       grep -e "Copyright (c)" -L ${A_PATCHES} | while read p_file; do \
+       @grep -e "Copyright (c)" -L ${A_PATCHES} | while read p_file; do \
                ptmp=`mktemp` && \
                cat armband-patch-copyright.template $$p_file > $$ptmp && \
                mv $$ptmp $$p_file; \
        done
-
-# TODO: Bring back clean/debug/build after Fuel@OPNFV implements them for MCP