aboutsummaryrefslogtreecommitdiffstats
path: root/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile19
1 files changed, 16 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 1680919..ab39a5c 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -50,9 +50,22 @@ all: $(COMPONENTS)
$(foreach component, $(COMPONENTS), $(eval $(call BUILD_RULE,$(component))))
-pre-build:
-
-pre-submit: check-format lint test vet
+pre-build: eth-dep
+
+pre-submit: eth-dep check-format lint test vet
+
+eth-dep:
+ @rm -rf vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1
+ @if [ ! -d .dep/libsecp256k1 ]; then \
+ git init .dep/libsecp256k1; \
+ cd .dep/libsecp256k1; \
+ git remote add origin https://github.com/ethereum/go-ethereum.git; \
+ git config core.sparsecheckout true; \
+ echo "crypto/secp256k1/libsecp256k1/*" >> .git/info/sparse-checkout; \
+ cd ../../; \
+ fi
+ @cd .dep/libsecp256k1; git pull --depth=1 origin master; cd ../../
+ @cp -r .dep/libsecp256k1/crypto/secp256k1/libsecp256k1 vendor/github.com/ethereum/go-ethereum/crypto/secp256k1
format:
@go fmt `go list ./... | grep -v 'vendor'`