From a2db1f07f9d2bda6bed34fb359c44d6299cbbf5e Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Mon, 3 Dec 2018 18:00:43 +0000 Subject: Added rpath in basic dependencies, remove input if download fails Until now, we weren't including the `rpath' linking options to the basic dependencies. They are now added. Also, when the download of an input file fails for any reason, an empty file won't be replaced there any more. --- reproduce/src/make/dependencies-basic.mk | 9 ++++++--- reproduce/src/make/download.mk | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'reproduce') diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk index 72f021f..ceaa0f3 100644 --- a/reproduce/src/make/dependencies-basic.mk +++ b/reproduce/src/make/dependencies-basic.mk @@ -59,7 +59,7 @@ syspath := $(PATH) export PATH := $(ibdir):$(PATH) export PKG_CONFIG_PATH := $(ildir)/pkgconfig export PKG_CONFIG_LIBDIR := $(ildir)/pkgconfig -export LDFLAGS := -L$(ildir) $(LDFLAGS) +export LDFLAGS := $(rpath_command) -L$(ildir) $(LDFLAGS) export CPPFLAGS := -I$(idir)/include $(CPPFLAGS) export LD_LIBRARY_PATH := $(ildir):$(LD_LIBRARY_PATH) @@ -334,9 +334,11 @@ $(ilidir)/openssl: $(tdir)/openssl-$(openssl-version).tar.gz \ $(tdir)/cert.pem \ $(ilidir)/zlib | $(idir)/etc $(call gbuild, $<, openssl-$(openssl-version), , \ + zlib \ + $(rpath_command) \ --openssldir=$(idir)/etc/ssl \ --with-zlib-lib=$(ildir) \ - --with-zlib-include=$(idir)/include zlib ) && \ + --with-zlib-include=$(idir)/include ) && \ cp $(tdir)/cert.pem $(idir)/etc/ssl/cert.pem && \ echo "OpenSSL is built and ready" > $@ @@ -384,7 +386,8 @@ $(ibdir)/ls: $(tdir)/coreutils-$(coreutils-version).tar.xz \ $(ilidir)/openssl # Coreutils will use the hashing features of OpenSSL's `libcrypto'. $(call gbuild, $<, coreutils-$(coreutils-version), static, \ - --with-openssl) + LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ + --enable-rpath --disable-silent-rules --with-openssl) $(ibdir)/pkg-config: $(tdir)/pkg-config-$(pkgconfig-version).tar.gz \ $(ibdir)/make diff --git a/reproduce/src/make/download.mk b/reproduce/src/make/download.mk index 260fd0c..5ef6c71 100644 --- a/reproduce/src/make/download.mk +++ b/reproduce/src/make/download.mk @@ -68,7 +68,8 @@ $(inputdatasets): $(indir)/%.fits: | $(indir) $(lockdir) ln -s $(INDIR)/$$origname $@ else touch $(lockdir)/download - flock $(lockdir)/download wget -O$@ $$url/$$origname + flock $(lockdir)/download bash -c \ + "if ! wget -O$@ $$url/$$origname; then rm -f $@; exit 1; fi" fi # Check the md5 sum to see if this is the proper dataset. -- cgit v1.2.1