Skip to content
Snippets Groups Projects
Commit 8e2b334d authored by Maxim Cournoyer's avatar Maxim Cournoyer Committed by Adrien Béraud
Browse files

contrib: Use git_download to fetch the ONNX sources.

* contrib/src/main.mak (git_download): Document procedure.
* contrib/src/onnx/rules.mak (ONNX_URL): Use it.

Change-Id: Ia1759e8d10c79b1109481895dc13166440709228
parent 4760608b
Branches
No related tags found
No related merge requests found
......@@ -326,6 +326,10 @@ HOSTVARS := $(HOSTTOOLS) \
CXXFLAGS="$(CXXFLAGS) $(PIC)" \
LDFLAGS="$(LDFLAGS)"
# git_download procedure
# $1: The URL of the Git repository.
# $2: The remote branch to clone.
# $3: The git refspec to checkout.
ifeq ($(DISABLE_CONTRIB_DOWNLOADS),TRUE)
download_git = $(error Trying to clone $(1) but DISABLE_CONTRIB_DOWNLOADS is TRUE, aborting.)
else
......
......@@ -3,10 +3,7 @@ ONNX_VERSION := v1.6.0
ONNX_URL := https://github.com/microsoft/onnxruntime.git
$(TARBALLS)/onnxruntime-$(ONNX_VERSION).tar.xz:
git clone $(ONNX_URL) ../../contrib/tarballs/onnxruntime-$(ONNX_VERSION)
cd ../../contrib/tarballs/onnxruntime-$(ONNX_VERSION) && git checkout $(ONNX_VERSION)
cd ../../contrib/tarballs/ && tar cJf onnxruntime-$(ONNX_VERSION).tar.xz onnxruntime-$(ONNX_VERSION)
rm -Rf ../../contrib/tarballs/onnxruntime-v1.6.0
$(call download_git,$(ONNX_URL),master,$(ONNX_VERSION))
.sum-onnx: onnxruntime-$(ONNX_VERSION).tar.xz
$(warning $@ not implemented)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment