summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-07-25 18:00:18 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-07-26 17:17:19 +0200
commit284281fa320434ac10c3557ad68a858038e4e27f (patch)
tree8166eab2e6ddf0957cff0634c6936d8e8415bc73
parentc26f1331c8823c9555fc698217225bbe981d5cb9 (diff)
Makefile: submodules sync with Fuel@OPNFV
Upstream change [1] pinned Fuel components to Fuel 9.0.1 specific commits. While armband used to track remote branch HEAD, we now need to sync with Fuel's config.mk before applying our patches. Unfortunately, the commit variables are not consistently named, so one could infer a relationship between the variable names and targeted git submodule (e.g. fuel-web commit var is named NAILGUN_COMMIT), so we have to hardcode the module list in our Makefile. [1] https://gerrit.opnfv.org/gerrit/#/c/17225 Closes: ARMBAND-58 Change-Id: Ifdce1c9a5afbd70db3b5703da21b30e8792b3e97 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-rw-r--r--.gitignore1
-rw-r--r--Makefile24
2 files changed, 22 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 751b1d07..b7d93b2a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
build.log
+config.mk
diff --git a/Makefile b/Makefile
index 922b72ea..df14ef68 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,18 @@
root:=$(shell pwd)
+include config.mk
all: build
+config.mk: submodules-init
+ @ln -s -f ${root}/upstream/fuel/build/config.mk ${root}/config.mk
+
.PHONY: submodules-init submodules-clean
submodules-init:
- @git submodule -q init
- @git submodule -q sync
- @git submodule update --remote
+ @if [ ! -d ${root}/upstream/fuel/build ]; then \
+ git submodule -q init; \
+ git submodule -q sync; \
+ git submodule update --remote; \
+ fi
# Cleans any changes made to submodules
submodules-clean:
@@ -28,6 +34,18 @@ patches-export:
# apply patches from patches/* to respective submodules
patches-import:
+ @cd ${root}/upstream/fuel-agent && \
+ git checkout -q ${FUEL_AGENT_COMMIT}
+ @cd ${root}/upstream/fuel-astute && \
+ git checkout -q ${ASTUTE_COMMIT}
+ @cd ${root}/upstream/fuel-library && \
+ git checkout -q ${FUELLIB_COMMIT}
+ @cd ${root}/upstream/fuel-mirror && \
+ git checkout -q ${FUEL_MIRROR_COMMIT}
+ @cd ${root}/upstream/fuel-nailgun-agent && \
+ git checkout -q ${FUEL_NAILGUN_AGENT_COMMIT}
+ @cd ${root}/upstream/fuel-web && \
+ git checkout -q ${NAILGUN_COMMIT}
@git submodule -q foreach 'mkdir -p ${root}/patches/$$name'
@git submodule -q foreach 'git tag armband-workbench-root'
@git submodule -q foreach 'git checkout -q -b armband-workbench'