From 599c0a77f2a8c40dbccdd604ea3ce08f2f8dc0a8 Mon Sep 17 00:00:00 2001 From: manarabdelaty Date: Apr 22 2021 00:30:27 +0000 Subject: Merge branch pull request #5 into main --- diff --git a/Makefile b/Makefile index f72e180..6006565 100644 --- a/Makefile +++ b/Makefile @@ -23,9 +23,11 @@ CARAVEL_LITE?=1 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 @@ ifeq ($(SUBMODULE),1) @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 @@ -97,7 +101,7 @@ ifeq ($(SUBMODULE),1) @git submodule update --init else cd $(CARAVEL_ROOT)/ && \ - git checkout master && \ + git checkout $(CARAVEL_COMMIT) && \ git pull endif @@ -106,6 +110,7 @@ endif uninstall: ifeq ($(SUBMODULE),1) git submodule deinit -f $(CARAVEL_ROOT) + sed -ie '/\[submodule \"caravel\"\]/,/\url =/d' .gitmodules rm -rf .git/modules/$(CARAVEL_NAME) git rm -f $(CARAVEL_ROOT) else