diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2018-11-30 17:02:46 +0000 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2018-11-30 17:02:46 +0000 |
commit | e5082a353ead04ec735cfd1c9e60e4fda87da922 (patch) | |
tree | d1ae0690bb4e7a7f8fe1a187b1f532932a4fc768 | |
parent | 7c7b79cae6302999851230cf1d186ad5153b99a9 (diff) |
cURL now also available as downloader with -L flag
The main reason I wasn't using cURL as a downloading tool was that I wasn't
familar with how to ask it to follow a re-direct. But I just found out that
its with the `-L' configure time option. So it is now added as a downloader
tool to the pipeline.
-rwxr-xr-x | configure | 17 | ||||
-rw-r--r-- | reproduce/src/make/dependencies-basic.mk | 6 |
2 files changed, 18 insertions, 5 deletions
@@ -180,8 +180,17 @@ fi # the web address. if [ $rewritepconfig = yes ]; then if type wget > /dev/null 2>/dev/null; then - wgetname=$(which wget) - downloader="$wgetname --no-use-server-timestamps -O"; + name=$(which wget) + + # By default Wget keeps the remote file's timestamp, so we'll have + # to disable it manually. + downloader="$name --no-use-server-timestamps -O"; + elif type curl > /dev/null 2>/dev/null; then + name=$(which curl) + + # - cURL doesn't keep the remote file's timestamp by default. + # - With the `-L' option, we tell cURL to follow redirects. + downloader="$name -L -o" else cat <<EOF @@ -591,8 +600,8 @@ fi # some versions of Make complain about not having enough 'pipe' (memory) on # some systems. After some searching, I found out its because of too many # threads. -if which nproc &> /dev/null; then numthreads=$(nproc --all); -else numthreads=2; +if which nproc > /dev/null 2>/dev/null; then numthreads=$(nproc --all); +else numthreads=2; fi make -f reproduce/src/make/dependencies-basic.mk \ static_build=$static_build -j$numthreads diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk index 74ca429..889ed0b 100644 --- a/reproduce/src/make/dependencies-basic.mk +++ b/reproduce/src/make/dependencies-basic.mk @@ -186,6 +186,7 @@ $(ibdir)/low-level: | $(ibdir) $(call makelink,ld) $(call makelink,nm) $(call makelink,ps) + $(call makelink,ranlib) # On Mac OS, libtool is different compared to GNU Libtool. The # libtool we'll build in the high-level dependencies has the @@ -198,9 +199,12 @@ $(ibdir)/low-level: | $(ibdir) # GNU M4 (for managing building macros) $(call makelink,m4) - # Needed by TeXLive specifically + # Needed by TeXLive specifically. $(call makelink,perl) + + # Downloaders. $(call makelink,wget) + $(call makelink,curl) echo "Low-level program links are setup" > $@ |