aboutsummaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIgor Pashev <igor.pashev@nexenta.com>2012-09-26 22:43:22 +0400
committerIgor Pashev <igor.pashev@nexenta.com>2012-09-26 22:43:22 +0400
commite80992f48c4aa8c46c9186f771a19bd7f09604fc (patch)
treeeb83afa63efb3be2afabe2c40d6e216724ca5ddb /rules
parentce7d7fd0f0a40368d9dddcbf972063f6ff4e04b9 (diff)
downloadcibs-e80992f48c4aa8c46c9186f771a19bd7f09604fc.tar.gz
Download from mirrors if any
Diffstat (limited to 'rules')
-rw-r--r--rules/archive.mk5
-rw-r--r--rules/common.mk5
2 files changed, 3 insertions, 7 deletions
diff --git a/rules/archive.mk b/rules/archive.mk
index 411ca27..12dd6d7 100644
--- a/rules/archive.mk
+++ b/rules/archive.mk
@@ -43,12 +43,13 @@ validate: validate-stamp
archive-downloader := /usr/share/cibs/scripts/download-archive
+downloader-mirrors = $(mirrors:%=-m %)
download-%-stamp:
if ! [ -f '$*' ]; then \
if [ -n '$(download_$*)' ]; then \
- $(archive-downloader) '$*' '$(download_$*)'; \
+ $(archive-downloader) -a '$*' $(downloader-mirrors) -d '$(download_$*)'; \
elif [ -n '$(download)' ]; then \
- $(archive-downloader) '$*' '$(download)'; \
+ $(archive-downloader) -a '$*' $(downloader-mirrors) -d '$(download)'; \
else \
echo '** ERROR: No "dowload" variable is set'; false; \
fi; \
diff --git a/rules/common.mk b/rules/common.mk
index c0d1c6c..afbe0cb 100644
--- a/rules/common.mk
+++ b/rules/common.mk
@@ -53,11 +53,6 @@ export PATH := \
/usr/gcc/4.4/bin:/usr/gcc/4.3/bin:/usr/gnu/bin:/usr/sbin:/usr/bin:/sbin
export CFLAGS = -O2
-# Define LOCAL_MIRROR in environment, e. g. in ~/.bash_profile:
-mirrors := $(LOCAL_MIRROR) \
- http://mirror.yandex.ru/gentoo-distfiles/distfiles \
- http://mirror.ovh.net/gentoo-distfiles/distfiles
-
prefix = /usr
libdir.32 = $(prefix)/lib/$(mach32)
libdir.64 = $(prefix)/lib/$(mach64)