-# $(MAKE) -C opendaylight validate-cache
-# if [ $? -ne 0 ]; then\
- echo "Cache does not match current OpenDaylight version, cach must be rebuilt";\
- exit 1;\
- fi;
+# Once the Make structure is refactored, this should go in as a validate-cache
+# taget in the fuel Makefile
+
+ @REMOTE_ID=$(shell git ls-remote $(FUEL_MAIN_REPO) $(FUEL_MAIN_TAG)^{} | awk '{print $$(NF-1)}'); \
+ if [ -z $$REMOTE_ID ] || [ $$REMOTE_ID = " " ]; \
+ then \
+ REMOTE_ID=$(shell git ls-remote $(FUEL_MAIN_REPO) $(FUEL_MAIN_TAG) | awk '{print $$(NF-1)}'); \
+ fi; \
+ if [[ $$REMOTE_ID != $(shell cat $(VERSION_FILE) | grep fuel | awk '{print $$NF}') ]]; \
+ then \
+ echo "Cache does not match upstream Fuel, cache must be rebuilt!"; \
+ exit 1; \
+ fi