Enable checking out caravel or caravel-lite to specific commit
Defaults to master and main respectively
diff --git a/Makefile b/Makefile
index 16104a7..f576dda 100644
--- a/Makefile
+++ b/Makefile
@@ -23,9 +23,11 @@
ifeq ($(CARAVEL_LITE),1)
CARAVEL_NAME := caravel-lite
CARAVEL_REPO := https://github.com/efabless/caravel-lite
+ CARAVEL_COMMIT := main
else
CARAVEL_NAME := caravel
CARAVEL_REPO := https://github.com/efabless/caravel
+ CARAVEL_COMMIT := master
endif
# Install caravel as submodule, (1): submodule, (0): clone
@@ -74,10 +76,12 @@
@echo "Installing $(CARAVEL_NAME) as a submodule.."
@if [ ! -d $(CARAVEL_ROOT) ]; then git submodule add --name $(CARAVEL_NAME) $(CARAVEL_REPO) $(CARAVEL_ROOT); fi
@git submodule update --init
+ @cd $(CARAVEL_ROOT); git checkout $(CARAVEL_HASH)
$(MAKE) simlink
else
@echo "Installing $(CARAVEL_NAME).."
@git clone $(CARAVEL_REPO) $(CARAVEL_ROOT)
+ @cd $(CARAVEL_ROOT); git checkout $(CARAVEL_HASH)
endif
# Create symbolic links to caravel's main files