mirror of
https://github.com/logos-messaging/nim-sds.git
synced 2026-01-02 14:13:07 +00:00
setting up nimbus-build-system
This commit is contained in:
parent
e7a6435407
commit
415d0d8a42
7
.gitignore
vendored
7
.gitignore
vendored
@ -7,3 +7,10 @@ for_reference
|
||||
do_not_commit
|
||||
build/*
|
||||
sds.nims
|
||||
/.update.timestamp
|
||||
|
||||
# Nimbus Build System
|
||||
nimbus-build-system.paths
|
||||
|
||||
# Nimble packages
|
||||
/vendor/.nimble
|
||||
|
||||
55
.gitmodules
vendored
Normal file
55
.gitmodules
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
[submodule "vendor/nimbus-build-system"]
|
||||
path = vendor/nimbus-build-system
|
||||
url = https://github.com/status-im/nimbus-build-system.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
[submodule "vendor/nim-chronos"]
|
||||
path = vendor/nim-chronos
|
||||
url = https://github.com/status-im/nim-chronos.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
[submodule "vendor/nim-results"]
|
||||
path = vendor/nim-results
|
||||
url = https://github.com/arnetheduck/nim-results.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
[submodule "vendor/nim-stew"]
|
||||
path = vendor/nim-stew
|
||||
url = https://github.com/status-im/nim-stew.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
[submodule "vendor/nim-chronicles"]
|
||||
path = vendor/nim-chronicles
|
||||
url = https://github.com/status-im/nim-chronicles.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
[submodule "vendor/nim-faststreams"]
|
||||
path = vendor/nim-faststreams
|
||||
url = https://github.com/status-im/nim-faststreams.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
[submodule "vendor/nim-json-serialization"]
|
||||
path = vendor/nim-json-serialization
|
||||
url = https://github.com/status-im/nim-json-serialization.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
[submodule "vendor/nim-serialization"]
|
||||
path = vendor/nim-serialization
|
||||
url = https://github.com/status-im/nim-serialization.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
[submodule "vendor/nim-taskpools"]
|
||||
path = vendor/nim-taskpools
|
||||
url = https://github.com/status-im/nim-taskpools.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
[submodule "vendor/nim-confutils"]
|
||||
path = vendor/nim-confutils
|
||||
url = https://github.com/status-im/nim-confutils.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
[submodule "vendor/nim-libp2p"]
|
||||
path = vendor/nim-libp2p
|
||||
url = https://github.com/vacp2p/nim-libp2p.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
32
Makefile
32
Makefile
@ -1,10 +1,41 @@
|
||||
.PHONY: libsds
|
||||
|
||||
export BUILD_SYSTEM_DIR := vendor/nimbus-build-system
|
||||
# we don't want an error here, so we can handle things later, in the ".DEFAULT" target
|
||||
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk
|
||||
|
||||
ifeq ($(NIM_PARAMS),)
|
||||
# "variables.mk" was not included, so we update the submodules.
|
||||
GIT_SUBMODULE_UPDATE := git submodule update --init --recursive
|
||||
.DEFAULT:
|
||||
+@ echo -e "Git submodules not found. Running '$(GIT_SUBMODULE_UPDATE)'.\n"; \
|
||||
$(GIT_SUBMODULE_UPDATE); \
|
||||
echo
|
||||
# Now that the included *.mk files appeared, and are newer than this file, Make will restart itself:
|
||||
# https://www.gnu.org/software/make/manual/make.html#Remaking-Makefiles
|
||||
#
|
||||
# After restarting, it will execute its original goal, so we don't have to start a child Make here
|
||||
# with "$(MAKE) $(MAKECMDGOALS)". Isn't hidden control flow great?
|
||||
|
||||
else # "variables.mk" was included. Business as usual until the end of this file.
|
||||
|
||||
# default target, because it's the first one that doesn't start with '.'
|
||||
all: | libsds
|
||||
|
||||
sds.nims:
|
||||
ln -s sds.nimble $@
|
||||
|
||||
update: | update-common
|
||||
rm -rf sds.nims && \
|
||||
$(MAKE) sds.nims $(HANDLE_OUTPUT)
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
|
||||
deps: | sds.nims
|
||||
|
||||
# must be included after the default target
|
||||
-include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk
|
||||
|
||||
STATIC ?= 0
|
||||
|
||||
@ -16,4 +47,5 @@ ifeq ($(STATIC), 1)
|
||||
else
|
||||
echo -e $(BUILD_MSG) "build/$@.so" && \
|
||||
$(ENV_SCRIPT) nim libsdsDynamic $(NIM_PARAMS) sds.nims
|
||||
endif
|
||||
endif
|
||||
20
add_submodule.sh
Executable file
20
add_submodule.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2018-2020 Status Research & Development GmbH. Licensed under
|
||||
# either of:
|
||||
# - Apache License, version 2.0
|
||||
# - MIT license
|
||||
# at your option. This file may not be copied, modified, or distributed except
|
||||
# according to those terms.
|
||||
|
||||
[ -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 untracked
|
||||
git config -f .gitmodules submodule.${DEST}.branch master
|
||||
|
||||
1
vendor/nim-chronicles
vendored
Submodule
1
vendor/nim-chronicles
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit a8fb38a10bcb548df78e9a70bd77b26bb50abd12
|
||||
1
vendor/nim-chronos
vendored
Submodule
1
vendor/nim-chronos
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit b55e2816eb45f698ddaca8d8473e401502562db2
|
||||
1
vendor/nim-confutils
vendored
Submodule
1
vendor/nim-confutils
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e214b3992a31acece6a9aada7d0a1ad37c928f3b
|
||||
1
vendor/nim-faststreams
vendored
Submodule
1
vendor/nim-faststreams
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 2b08c774afaafd600cf4c6f994cf78b8aa090c0c
|
||||
1
vendor/nim-json-serialization
vendored
Submodule
1
vendor/nim-json-serialization
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 2b1c5eb11df3647a2cee107cd4cce3593cbb8bcf
|
||||
1
vendor/nim-libp2p
vendored
Submodule
1
vendor/nim-libp2p
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit ac25da6cea158768bbc060b7be2fbe004206f3bb
|
||||
1
vendor/nim-results
vendored
Submodule
1
vendor/nim-results
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit df8113dda4c2d74d460a8fa98252b0b771bf1f27
|
||||
1
vendor/nim-serialization
vendored
Submodule
1
vendor/nim-serialization
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 548d0adc9797a10b2db7f788b804330306293088
|
||||
1
vendor/nim-stew
vendored
Submodule
1
vendor/nim-stew
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit d7a6868ba84165e7fdde427af9a1fc3f5f5cc151
|
||||
1
vendor/nim-taskpools
vendored
Submodule
1
vendor/nim-taskpools
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 7b74a716a40249720fd7da428113147942b9642d
|
||||
1
vendor/nimbus-build-system
vendored
Submodule
1
vendor/nimbus-build-system
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 5f10509cf880dc035e517ca7bac3163cd5206ba8
|
||||
Loading…
x
Reference in New Issue
Block a user