add submodules for csources and Nimble
This commit is contained in:
parent
53acac205a
commit
f98902e2e5
|
@ -108,3 +108,13 @@
|
||||||
url = https://github.com/status-im/nim-blscurve
|
url = https://github.com/status-im/nim-blscurve
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
branch = master
|
branch = master
|
||||||
|
[submodule "vendor/Nim-csources"]
|
||||||
|
path = vendor/Nim-csources
|
||||||
|
url = https://github.com/nim-lang/csources.git
|
||||||
|
ignore = dirty
|
||||||
|
branch = master
|
||||||
|
[submodule "vendor/nimble"]
|
||||||
|
path = vendor/nimble
|
||||||
|
url = https://github.com/nim-lang/nimble.git
|
||||||
|
ignore = dirty
|
||||||
|
branch = master
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -20,10 +20,13 @@ RUN_CMD_IN_ALL_REPOS = git submodule foreach --recursive --quiet 'echo -e "\n\e[
|
||||||
ENV_SCRIPT := "$(CURDIR)/env.sh"
|
ENV_SCRIPT := "$(CURDIR)/env.sh"
|
||||||
# duplicated in "env.sh" to prepend NIM_DIR/bin to PATH
|
# duplicated in "env.sh" to prepend NIM_DIR/bin to PATH
|
||||||
NIM_DIR := vendor/Nim
|
NIM_DIR := vendor/Nim
|
||||||
#- forces an update of csources and Nimble repos and a complete rebuild, in case we're called after pulling a new Nim version
|
#- forces a rebuild of csources, Nimble and a complete compiler rebuild, in case we're called after pulling a new Nim version
|
||||||
|
#- uses our Git submodules for csources and Nimble (Git doesn't let us place them in another submodule)
|
||||||
#- recompiles Nimble with -d:release until we upgrade to nim-0.20 where koch does it by default
|
#- recompiles Nimble with -d:release until we upgrade to nim-0.20 where koch does it by default
|
||||||
BUILD_NIM := cd $(NIM_DIR) && \
|
BUILD_NIM := cd $(NIM_DIR) && \
|
||||||
rm -rf bin/nim_csources csources dist/nimble && \
|
rm -rf bin/nim_csources csources dist/nimble && \
|
||||||
|
ln -sr ../Nim-csources csources && \
|
||||||
|
ln -sr ../nimble dist/nimble && \
|
||||||
sh build_all.sh && \
|
sh build_all.sh && \
|
||||||
$(ENV_SCRIPT) nim c -d:release --noNimblePath -p:compiler --nilseqs:on -o:bin/nimble dist/nimble/src/nimble.nim
|
$(ENV_SCRIPT) nim c -d:release --noNimblePath -p:compiler --nilseqs:on -o:bin/nimble dist/nimble/src/nimble.nim
|
||||||
|
|
||||||
|
@ -65,7 +68,7 @@ $(NIMBLE_DIR): | $(NIM_DIR)/bin/nim
|
||||||
[ `ls -1 *.nimble 2>/dev/null | wc -l ` -gt 0 ] && { \
|
[ `ls -1 *.nimble 2>/dev/null | wc -l ` -gt 0 ] && { \
|
||||||
mkdir -p $$toplevel/$(NIMBLE_DIR)/pkgs/$${sm_path#*/}-#head;\
|
mkdir -p $$toplevel/$(NIMBLE_DIR)/pkgs/$${sm_path#*/}-#head;\
|
||||||
echo -e "$$(pwd)\n$$(pwd)" > $$toplevel/$(NIMBLE_DIR)/pkgs/$${sm_path#*/}-#head/$${sm_path#*/}.nimble-link;\
|
echo -e "$$(pwd)\n$$(pwd)" > $$toplevel/$(NIMBLE_DIR)/pkgs/$${sm_path#*/}-#head/$${sm_path#*/}.nimble-link;\
|
||||||
}'
|
} || true'
|
||||||
|
|
||||||
# builds and runs all tests
|
# builds and runs all tests
|
||||||
test: | build deps
|
test: | build deps
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[ -z "$1" -o `echo "$1" | tr '/' '\n' | wc -l` != 2 ] && \
|
||||||
|
{ echo "usage: `basename $0` some/repo [destdir] # 'destdir' defaults to 'vendor/repo'"; exit 1; }
|
||||||
|
REPO="$1"
|
||||||
|
|
||||||
|
DEST="vendor/${REPO#*/}"
|
||||||
|
[ -n "$2" ] && DEST="$2"
|
||||||
|
|
||||||
|
git submodule add --force https://github.com/${REPO}.git "$DEST"
|
||||||
|
git config -f .gitmodules submodule.${DEST}.ignore dirty
|
||||||
|
git config -f .gitmodules submodule.${DEST}.branch master
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit b56e49bbedf62db22eb26388f98262e2948b2cbc
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 3d6dc90cd4dfc12b8ae9d1958e84610cf21b34bb
|
Loading…
Reference in New Issue