summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2023-04-06 10:27:37 +0300
committerkx <kx@radix.pro>2023-04-06 10:27:37 +0300
commitcbda8cd8fcffd037f28be2d043a05bef12db485a (patch)
tree433b6a4e92f329fa3145e1ae6c583fe7eea322a9 /tools
parent9bd871e51a3841a92f3dcaf25f132b1a596eb130 (diff)
downloadsources-cbda8cd8fcffd037f28be2d043a05bef12db485a.tar.xz
Synopsys ARC Toolchain
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile24
-rw-r--r--tools/synopsys/Makefile24
-rw-r--r--tools/synopsys/arc-toolchain/Makefile30
-rw-r--r--tools/synopsys/arc-toolchain/binutils-gdb/Makefile73
-rw-r--r--tools/synopsys/arc-toolchain/cgen/Makefile71
-rw-r--r--tools/synopsys/arc-toolchain/gcc/Makefile73
-rw-r--r--tools/synopsys/arc-toolchain/linux/Makefile71
-rw-r--r--tools/synopsys/arc-toolchain/newlib/Makefile73
-rw-r--r--tools/synopsys/arc-toolchain/toolchain/Makefile72
-rw-r--r--tools/synopsys/arc-toolchain/uClibc/Makefile72
10 files changed, 583 insertions, 0 deletions
diff --git a/tools/Makefile b/tools/Makefile
new file mode 100644
index 0000000..1e26fdc
--- /dev/null
+++ b/tools/Makefile
@@ -0,0 +1,24 @@
+
+#
+# Following command helps to cheate SUBDIRS list:
+# $ tree -fid .
+#
+
+SUBDIRS := synopsys
+
+
+all-recursive downloads_clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ local_target="$$target"; \
+ (cd $$subdir && $(MAKE) $$fnord $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; test -z "$$fail"
+
+all: all-recursive
+
+downloads_clean: downloads_clean-recursive
+
+.PHONY: all-recursive downloads_clean-recursive all downloads_clean
diff --git a/tools/synopsys/Makefile b/tools/synopsys/Makefile
new file mode 100644
index 0000000..318157b
--- /dev/null
+++ b/tools/synopsys/Makefile
@@ -0,0 +1,24 @@
+
+#
+# Following command helps to cheate SUBDIRS list:
+# $ tree -fid .
+#
+
+SUBDIRS := arc-toolchain
+
+
+all-recursive downloads_clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ local_target="$$target"; \
+ (cd $$subdir && $(MAKE) $$fnord $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; test -z "$$fail"
+
+all: all-recursive
+
+downloads_clean: downloads_clean-recursive
+
+.PHONY: all-recursive downloads_clean-recursive all downloads_clean
diff --git a/tools/synopsys/arc-toolchain/Makefile b/tools/synopsys/arc-toolchain/Makefile
new file mode 100644
index 0000000..204b12b
--- /dev/null
+++ b/tools/synopsys/arc-toolchain/Makefile
@@ -0,0 +1,30 @@
+
+#
+# Following command helps to cheate SUBDIRS list:
+# $ tree -fid .
+#
+
+SUBDIRS := binutils-gdb \
+ cgen \
+ gcc \
+ linux \
+ newlib \
+ toolchain \
+ uClibc
+
+
+all-recursive downloads_clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ local_target="$$target"; \
+ (cd $$subdir && $(MAKE) $$fnord $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; test -z "$$fail"
+
+all: all-recursive
+
+downloads_clean: downloads_clean-recursive
+
+.PHONY: all-recursive downloads_clean-recursive all downloads_clean
diff --git a/tools/synopsys/arc-toolchain/binutils-gdb/Makefile b/tools/synopsys/arc-toolchain/binutils-gdb/Makefile
new file mode 100644
index 0000000..fc77822
--- /dev/null
+++ b/tools/synopsys/arc-toolchain/binutils-gdb/Makefile
@@ -0,0 +1,73 @@
+#
+# Wiki:
+# ====
+# https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki
+#
+# GitHub:
+# ======
+# https://github.com/foss-for-synopsys-dwc-arc-processors
+#
+# Clone:
+# =====
+# git clone https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb.git
+#
+
+url = https://github.com/foss-for-synopsys-dwc-arc-processors
+
+repo_name = binutils-gdb
+
+#
+# List of tags to be extracted:
+# ============================
+# hash | tag
+# ----------------------------------------+-----
+revisions = 7e4facb46b6ed1e87fdc9e50c7aa76e8e544e15d:arc-2016.09.17
+revisions += afcc795bc21f5d2972e9bd9d5c52eb91834bf0d0:arc-2018.09.12
+revisions += 64e06e5b062a911d87987a7763669a076259a861:arc-2020.03.18
+
+git_repo = .git_clone
+
+suffix = tar.xz
+
+versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(repo_name)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+TARGETS = repository_clean
+
+all: $(TARGETS)
+
+.PHONY: downloads_clean repository_clean
+
+$(git_repo):
+ @echo -e "\n======= Clone $(repo_name).git repository =======\n"
+ @rm -rf $(repo_name)
+ @git clone $(url)/$(repo_name).git $(repo_name)
+ @touch $@
+
+$(tarballs): $(git_repo)
+ @for revision in $(revisions) ; do \
+ hash=`echo $$revision | cut -f 1 -d ':'` ; \
+ version=`echo $$revision | cut -f 2 -d ':'` ; \
+ if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+ echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
+ ( cd $(repo_name) && \
+ git archive --format=tar --prefix=$(repo_name)-$$version/ $$hash | \
+ xz >../$(repo_name)-$$version.$(suffix) ) ; \
+ fi ; \
+ done
+
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+ @for tarball in $< ; do \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
+ sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+ done
+
+repository_clean: $(sha1s)
+ @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
+ @rm -rf $(git_repo) $(repo_name)
+
+downloads_clean:
+ @rm -rf $(tarballs) $(sha1s)
+ @rm -rf $(git_repo) $(repo_name)
diff --git a/tools/synopsys/arc-toolchain/cgen/Makefile b/tools/synopsys/arc-toolchain/cgen/Makefile
new file mode 100644
index 0000000..5e98f49
--- /dev/null
+++ b/tools/synopsys/arc-toolchain/cgen/Makefile
@@ -0,0 +1,71 @@
+#
+# Wiki:
+# ====
+# https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki
+#
+# GitHub:
+# ======
+# https://github.com/foss-for-synopsys-dwc-arc-processors
+#
+# Clone:
+# =====
+# git clone https://github.com/foss-for-synopsys-dwc-arc-processors/cgen.git
+#
+
+url = https://github.com/foss-for-synopsys-dwc-arc-processors
+
+repo_name = cgen
+
+#
+# List of tags to be extracted:
+# ============================
+# hash | tag
+# ----------------------------------------+-----
+revisions = eda052d5db32004d4a0d62b86d80072132c2c855:arc-2016.09.06
+
+git_repo = .git_clone
+
+suffix = tar.xz
+
+versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(repo_name)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+TARGETS = repository_clean
+
+all: $(TARGETS)
+
+.PHONY: downloads_clean repository_clean
+
+$(git_repo):
+ @echo -e "\n======= Clone $(repo_name).git repository =======\n"
+ @rm -rf $(repo_name)
+ @git clone $(url)/$(repo_name).git $(repo_name)
+ @touch $@
+
+$(tarballs): $(git_repo)
+ @for revision in $(revisions) ; do \
+ hash=`echo $$revision | cut -f 1 -d ':'` ; \
+ version=`echo $$revision | cut -f 2 -d ':'` ; \
+ if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+ echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
+ ( cd $(repo_name) && \
+ git archive --format=tar --prefix=$(repo_name)-$$version/ $$hash | \
+ xz >../$(repo_name)-$$version.$(suffix) ) ; \
+ fi ; \
+ done
+
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+ @for tarball in $< ; do \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
+ sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+ done
+
+repository_clean: $(sha1s)
+ @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
+ @rm -rf $(git_repo) $(repo_name)
+
+downloads_clean:
+ @rm -rf $(tarballs) $(sha1s)
+ @rm -rf $(git_repo) $(repo_name)
diff --git a/tools/synopsys/arc-toolchain/gcc/Makefile b/tools/synopsys/arc-toolchain/gcc/Makefile
new file mode 100644
index 0000000..0164e2d
--- /dev/null
+++ b/tools/synopsys/arc-toolchain/gcc/Makefile
@@ -0,0 +1,73 @@
+#
+# Wiki:
+# ====
+# https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki
+#
+# GitHub:
+# ======
+# https://github.com/foss-for-synopsys-dwc-arc-processors
+#
+# Clone:
+# =====
+# git clone https://github.com/foss-for-synopsys-dwc-arc-processors/gcc.git
+#
+
+url = https://github.com/foss-for-synopsys-dwc-arc-processors
+
+repo_name = gcc
+
+#
+# List of tags to be extracted:
+# ============================
+# hash | tag
+# ----------------------------------------+-----
+revisions = 051a4966a7c883a34b8612c0c1c7e2242c495a4e:arc-2016.09.17
+revisions += d470d081a52fc51efc2b0391d44773d31821f674:arc-2018.09.12
+revisions += b5a253d120b3fea698acbd35b185de06aabc03c6:arc-2020.03.16
+
+git_repo = .git_clone
+
+suffix = tar.xz
+
+versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(repo_name)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+TARGETS = repository_clean
+
+all: $(TARGETS)
+
+.PHONY: downloads_clean repository_clean
+
+$(git_repo):
+ @echo -e "\n======= Clone $(repo_name).git repository =======\n"
+ @rm -rf $(repo_name)
+ @git clone $(url)/$(repo_name).git $(repo_name)
+ @touch $@
+
+$(tarballs): $(git_repo)
+ @for revision in $(revisions) ; do \
+ hash=`echo $$revision | cut -f 1 -d ':'` ; \
+ version=`echo $$revision | cut -f 2 -d ':'` ; \
+ if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+ echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
+ ( cd $(repo_name) && \
+ git archive --format=tar --prefix=$(repo_name)-$$version/ $$hash | \
+ xz >../$(repo_name)-$$version.$(suffix) ) ; \
+ fi ; \
+ done
+
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+ @for tarball in $< ; do \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
+ sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+ done
+
+repository_clean: $(sha1s)
+ @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
+ @rm -rf $(git_repo) $(repo_name)
+
+downloads_clean:
+ @rm -rf $(tarballs) $(sha1s)
+ @rm -rf $(git_repo) $(repo_name)
diff --git a/tools/synopsys/arc-toolchain/linux/Makefile b/tools/synopsys/arc-toolchain/linux/Makefile
new file mode 100644
index 0000000..0058d6e
--- /dev/null
+++ b/tools/synopsys/arc-toolchain/linux/Makefile
@@ -0,0 +1,71 @@
+#
+# Wiki:
+# ====
+# https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki
+#
+# GitHub:
+# ======
+# https://github.com/foss-for-synopsys-dwc-arc-processors
+#
+# Clone:
+# =====
+# git clone https://github.com/foss-for-synopsys-dwc-arc-processors/linux.git
+#
+
+url = https://github.com/foss-for-synopsys-dwc-arc-processors
+
+repo_name = linux
+
+#
+# List of tags to be extracted:
+# ============================
+# hash | tag
+# ----------------------------------------+-----
+revisions = b27c1b5fac1d55b669fa7ebb6547d2370a496eea:arc-3.18-4
+
+git_repo = .git_clone
+
+suffix = tar.xz
+
+versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(repo_name)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+TARGETS = repository_clean
+
+all: $(TARGETS)
+
+.PHONY: downloads_clean repository_clean
+
+$(git_repo):
+ @echo -e "\n======= Clone $(repo_name).git repository =======\n"
+ @rm -rf $(repo_name)
+ @git clone $(url)/$(repo_name).git $(repo_name)
+ @touch $@
+
+$(tarballs): $(git_repo)
+ @for revision in $(revisions) ; do \
+ hash=`echo $$revision | cut -f 1 -d ':'` ; \
+ version=`echo $$revision | cut -f 2 -d ':'` ; \
+ if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+ echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
+ ( cd $(repo_name) && \
+ git archive --format=tar --prefix=$(repo_name)-$$version/ $$hash | \
+ xz >../$(repo_name)-$$version.$(suffix) ) ; \
+ fi ; \
+ done
+
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+ @for tarball in $< ; do \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
+ sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+ done
+
+repository_clean: $(sha1s)
+ @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
+ @rm -rf $(git_repo) $(repo_name)
+
+downloads_clean:
+ @rm -rf $(tarballs) $(sha1s)
+ @rm -rf $(git_repo) $(repo_name)
diff --git a/tools/synopsys/arc-toolchain/newlib/Makefile b/tools/synopsys/arc-toolchain/newlib/Makefile
new file mode 100644
index 0000000..c9bceb0
--- /dev/null
+++ b/tools/synopsys/arc-toolchain/newlib/Makefile
@@ -0,0 +1,73 @@
+#
+# Wiki:
+# ====
+# https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki
+#
+# GitHub:
+# ======
+# https://github.com/foss-for-synopsys-dwc-arc-processors
+#
+# Clone:
+# =====
+# git clone https://github.com/foss-for-synopsys-dwc-arc-processors/newlib.git
+#
+
+url = https://github.com/foss-for-synopsys-dwc-arc-processors
+
+repo_name = newlib
+
+#
+# List of tags to be extracted:
+# ============================
+# hash | tag
+# ----------------------------------------+-----
+revisions = ff2d5895c5f910ee9990ddad07ffde4ddd0eb0e0:arc-2016.09.17
+revisions += 05822dea764518b6c20681aadd44e2b091bc4cd1:arc-2018.09.12
+revisions += e73409d4cecd3186ccc7687496d45c6ec9269b56:arc-2020.03.18
+
+git_repo = .git_clone
+
+suffix = tar.xz
+
+versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(repo_name)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+TARGETS = repository_clean
+
+all: $(TARGETS)
+
+.PHONY: downloads_clean repository_clean
+
+$(git_repo):
+ @echo -e "\n======= Clone $(repo_name).git repository =======\n"
+ @rm -rf $(repo_name)
+ @git clone $(url)/$(repo_name).git $(repo_name)
+ @touch $@
+
+$(tarballs): $(git_repo)
+ @for revision in $(revisions) ; do \
+ hash=`echo $$revision | cut -f 1 -d ':'` ; \
+ version=`echo $$revision | cut -f 2 -d ':'` ; \
+ if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+ echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
+ ( cd $(repo_name) && \
+ git archive --format=tar --prefix=$(repo_name)-$$version/ $$hash | \
+ xz >../$(repo_name)-$$version.$(suffix) ) ; \
+ fi ; \
+ done
+
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+ @for tarball in $< ; do \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
+ sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+ done
+
+repository_clean: $(sha1s)
+ @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
+ @rm -rf $(git_repo) $(repo_name)
+
+downloads_clean:
+ @rm -rf $(tarballs) $(sha1s)
+ @rm -rf $(git_repo) $(repo_name)
diff --git a/tools/synopsys/arc-toolchain/toolchain/Makefile b/tools/synopsys/arc-toolchain/toolchain/Makefile
new file mode 100644
index 0000000..59d695c
--- /dev/null
+++ b/tools/synopsys/arc-toolchain/toolchain/Makefile
@@ -0,0 +1,72 @@
+#
+# Wiki:
+# ====
+# https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki
+#
+# GitHub:
+# ======
+# https://github.com/foss-for-synopsys-dwc-arc-processors
+#
+# Clone:
+# =====
+# git clone https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain.git
+#
+
+url = https://github.com/foss-for-synopsys-dwc-arc-processors
+
+repo_name = toolchain
+
+#
+# List of tags to be extracted:
+# ============================
+# hash | tag
+# ----------------------------------------+-----
+revisions = 7f61900ffc2af92a4116cb324649447185837672:arc-2016.09.17
+revisions += bd56e4bbf7a7ea4a9ee3dd1317b6c361c71a7da5:arc-2020.03.18
+
+git_repo = .git_clone
+
+suffix = tar.xz
+
+versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(repo_name)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+TARGETS = repository_clean
+
+all: $(TARGETS)
+
+.PHONY: downloads_clean repository_clean
+
+$(git_repo):
+ @echo -e "\n======= Clone $(repo_name).git repository =======\n"
+ @rm -rf $(repo_name)
+ @git clone $(url)/$(repo_name).git $(repo_name)
+ @touch $@
+
+$(tarballs): $(git_repo)
+ @for revision in $(revisions) ; do \
+ hash=`echo $$revision | cut -f 1 -d ':'` ; \
+ version=`echo $$revision | cut -f 2 -d ':'` ; \
+ if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+ echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
+ ( cd $(repo_name) && \
+ git archive --format=tar --prefix=$(repo_name)-$$version/ $$hash | \
+ xz >../$(repo_name)-$$version.$(suffix) ) ; \
+ fi ; \
+ done
+
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+ @for tarball in $< ; do \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
+ sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+ done
+
+repository_clean: $(sha1s)
+ @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
+ @rm -rf $(git_repo) $(repo_name)
+
+downloads_clean:
+ @rm -rf $(tarballs) $(sha1s)
+ @rm -rf $(git_repo) $(repo_name)
diff --git a/tools/synopsys/arc-toolchain/uClibc/Makefile b/tools/synopsys/arc-toolchain/uClibc/Makefile
new file mode 100644
index 0000000..42ae671
--- /dev/null
+++ b/tools/synopsys/arc-toolchain/uClibc/Makefile
@@ -0,0 +1,72 @@
+#
+# Wiki:
+# ====
+# https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki
+#
+# GitHub:
+# ======
+# https://github.com/foss-for-synopsys-dwc-arc-processors
+#
+# Clone:
+# =====
+# git clone https://github.com/foss-for-synopsys-dwc-arc-processors/uClibc.git
+#
+
+url = https://github.com/foss-for-synopsys-dwc-arc-processors
+
+repo_name = uClibc
+
+#
+# List of tags to be extracted:
+# ============================
+# hash | tag
+# ----------------------------------------+-----
+revisions = 1a50fd884758ec5b5d8a163a704819fbf1760f99:arc-2016.09.17
+revisions += 955c69353480923792ad03023ebf34b574591be9:arc-2018.03.18
+
+git_repo = .git_clone
+
+suffix = tar.xz
+
+versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(repo_name)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+TARGETS = repository_clean
+
+all: $(TARGETS)
+
+.PHONY: downloads_clean repository_clean
+
+$(git_repo):
+ @echo -e "\n======= Clone $(repo_name).git repository =======\n"
+ @rm -rf $(repo_name)
+ @git clone $(url)/$(repo_name).git $(repo_name)
+ @touch $@
+
+$(tarballs): $(git_repo)
+ @for revision in $(revisions) ; do \
+ hash=`echo $$revision | cut -f 1 -d ':'` ; \
+ version=`echo $$revision | cut -f 2 -d ':'` ; \
+ if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+ echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
+ ( cd $(repo_name) && \
+ git archive --format=tar --prefix=$(repo_name)-$$version/ $$hash | \
+ xz >../$(repo_name)-$$version.$(suffix) ) ; \
+ fi ; \
+ done
+
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+ @for tarball in $< ; do \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
+ sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+ done
+
+repository_clean: $(sha1s)
+ @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
+ @rm -rf $(git_repo) $(repo_name)
+
+downloads_clean:
+ @rm -rf $(tarballs) $(sha1s)
+ @rm -rf $(git_repo) $(repo_name)