aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/make/basic.mk
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-04-30 18:51:47 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-04-30 18:56:21 +0100
commitb0993336112b244ea7e919d96ffdbaf167831b9d (patch)
tree57e00b4bea4f11254e1de31454176bdc4e80c208 /reproduce/software/make/basic.mk
parentcd73f88157764334e96fa6f286687e3fa9b061fd (diff)
End-of-line Backslashs no longer right under each other
When we need to quote the new-line character we end the line with a backslash (`\'). Until now, our convention has been to put all such backslashes under each other to help in visual inspection. But this causes a lot of confusion in version control: if only one line's length is larger, the whole block will be marked as changed and thus makes it hard to visually see the actual change. It also makes debuging the code (adding some temporary lines) hard. With this commit, I went through all the files and tried to fix all such cases so only a single white space character is between the last command character and the backslash. Where there was an empty line (ending with a backslash, to help in visually separating the code into blocks), I put the backslash right under the previous line's. This completes task #15259.
Diffstat (limited to 'reproduce/software/make/basic.mk')
-rw-r--r--reproduce/software/make/basic.mk758
1 files changed, 380 insertions, 378 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index f210d79..f2442ff 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -90,117 +90,117 @@ all: $(foreach p, $(top-level-programs), $(ibidir)/$(p))
# its easier to just keep a with the others.
$(lockdir): | $(BDIR); mkdir $@
downloadwrapper = ./reproduce/analysis/bash/download-multi-try
-tarballs = $(foreach t, bash-$(bash-version).tar.lz \
- binutils-$(binutils-version).tar.lz \
- bzip2-$(bzip2-version).tar.gz \
- cert.pem \
- coreutils-$(coreutils-version).tar.xz \
- curl-$(curl-version).tar.gz \
- diffutils-$(diffutils-version).tar.xz \
- file-$(file-version).tar.gz \
- findutils-$(findutils-version).tar.lz \
- gawk-$(gawk-version).tar.lz \
- gcc-$(gcc-version).tar.xz \
- git-$(git-version).tar.xz \
- gmp-$(gmp-version).tar.lz \
- grep-$(grep-version).tar.xz \
- gzip-$(gzip-version).tar.gz \
- isl-$(isl-version).tar.bz2 \
- libbsd-$(libbsd-version).tar.xz \
- libtool-$(libtool-version).tar.xz \
- lzip-$(lzip-version).tar.gz \
- m4-$(m4-version).tar.gz \
- make-$(make-version).tar.lz \
- metastore-$(metastore-version).tar.gz \
- mpfr-$(mpfr-version).tar.xz \
- mpc-$(mpc-version).tar.gz \
- ncurses-$(ncurses-version).tar.gz \
- openssl-$(openssl-version).tar.gz \
- patchelf-$(patchelf-version).tar.gz \
- pkg-config-$(pkgconfig-version).tar.gz \
- readline-$(readline-version).tar.gz \
- sed-$(sed-version).tar.xz \
- tar-$(tar-version).tar.gz \
- unzip-$(unzip-version).tar.gz \
- wget-$(wget-version).tar.lz \
- which-$(which-version).tar.gz \
- xz-$(xz-version).tar.gz \
- zip-$(zip-version).tar.gz \
- zlib-$(zlib-version).tar.gz \
+tarballs = $(foreach t, bash-$(bash-version).tar.lz \
+ binutils-$(binutils-version).tar.lz \
+ bzip2-$(bzip2-version).tar.gz \
+ cert.pem \
+ coreutils-$(coreutils-version).tar.xz \
+ curl-$(curl-version).tar.gz \
+ diffutils-$(diffutils-version).tar.xz \
+ file-$(file-version).tar.gz \
+ findutils-$(findutils-version).tar.lz \
+ gawk-$(gawk-version).tar.lz \
+ gcc-$(gcc-version).tar.xz \
+ git-$(git-version).tar.xz \
+ gmp-$(gmp-version).tar.lz \
+ grep-$(grep-version).tar.xz \
+ gzip-$(gzip-version).tar.gz \
+ isl-$(isl-version).tar.bz2 \
+ libbsd-$(libbsd-version).tar.xz \
+ libtool-$(libtool-version).tar.xz \
+ lzip-$(lzip-version).tar.gz \
+ m4-$(m4-version).tar.gz \
+ make-$(make-version).tar.lz \
+ metastore-$(metastore-version).tar.gz \
+ mpfr-$(mpfr-version).tar.xz \
+ mpc-$(mpc-version).tar.gz \
+ ncurses-$(ncurses-version).tar.gz \
+ openssl-$(openssl-version).tar.gz \
+ patchelf-$(patchelf-version).tar.gz \
+ pkg-config-$(pkgconfig-version).tar.gz \
+ readline-$(readline-version).tar.gz \
+ sed-$(sed-version).tar.xz \
+ tar-$(tar-version).tar.gz \
+ unzip-$(unzip-version).tar.gz \
+ wget-$(wget-version).tar.lz \
+ which-$(which-version).tar.gz \
+ xz-$(xz-version).tar.gz \
+ zip-$(zip-version).tar.gz \
+ zlib-$(zlib-version).tar.gz \
, $(tdir)/$(t) )
$(tarballs): $(tdir)/%: | $(lockdir)
- if [ -f $(DEPENDENCIES-DIR)/$* ]; then \
- cp $(DEPENDENCIES-DIR)/$* $@; \
- else \
- n=$$(echo $* | sed -e's/[0-9\-]/ /g' \
- -e's/\./ /g' \
- | awk '{print $$1}' ); \
- \
- mergenames=1; \
- if [ $$n = bash ]; then w=http://akhlaghi.org/src; \
+ if [ -f $(DEPENDENCIES-DIR)/$* ]; then \
+ cp $(DEPENDENCIES-DIR)/$* $@; \
+ else \
+ n=$$(echo $* | sed -e's/[0-9\-]/ /g' \
+ -e's/\./ /g' \
+ | awk '{print $$1}' ); \
+ \
+ mergenames=1; \
+ if [ $$n = bash ]; then w=http://akhlaghi.org/src; \
elif [ $$n = binutils ]; then w=http://ftp.gnu.org/gnu/binutils; \
- elif [ $$n = bzip ]; then w=http://akhlaghi.org/src; \
- elif [ $$n = cert ]; then w=http://akhlaghi.org/src; \
+ elif [ $$n = bzip ]; then w=http://akhlaghi.org/src; \
+ elif [ $$n = cert ]; then w=http://akhlaghi.org/src; \
elif [ $$n = coreutils ]; then w=http://ftp.gnu.org/gnu/coreutils;\
- elif [ $$n = curl ]; then w=https://curl.haxx.se/download; \
+ elif [ $$n = curl ]; then w=https://curl.haxx.se/download; \
elif [ $$n = diffutils ]; then w=http://ftp.gnu.org/gnu/diffutils;\
- elif [ $$n = file ]; then w=ftp://ftp.astron.com/pub/file; \
- elif [ $$n = findutils ]; then w=http://akhlaghi.org/src; \
- elif [ $$n = gawk ]; then w=http://ftp.gnu.org/gnu/gawk; \
+ elif [ $$n = file ]; then w=ftp://ftp.astron.com/pub/file; \
+ elif [ $$n = findutils ]; then w=http://akhlaghi.org/src; \
+ elif [ $$n = gawk ]; then w=http://ftp.gnu.org/gnu/gawk; \
elif [ $$n = gcc ]; then w=http://ftp.gnu.org/gnu/gcc/gcc-$(gcc-version); \
elif [ $$n = git ]; then w=http://mirrors.edge.kernel.org/pub/software/scm/git; \
elif [ $$n = gmp ]; then w=https://gmplib.org/download/gmp; \
- elif [ $$n = grep ]; then w=http://ftp.gnu.org/gnu/grep; \
- elif [ $$n = gzip ]; then w=http://ftp.gnu.org/gnu/gzip; \
+ elif [ $$n = grep ]; then w=http://ftp.gnu.org/gnu/grep; \
+ elif [ $$n = gzip ]; then w=http://ftp.gnu.org/gnu/gzip; \
elif [ $$n = isl ]; then w=ftp://gcc.gnu.org/pub/gcc/infrastructure; \
elif [ $$n = libbsd ]; then w=http://libbsd.freedesktop.org/releases; \
- elif [ $$n = libtool ]; then w=http://ftp.gnu.org/gnu/libtool; \
+ elif [ $$n = libtool ]; then w=http://ftp.gnu.org/gnu/libtool; \
elif [ $$n = lzip ]; then w=http://download.savannah.gnu.org/releases/lzip; \
- elif [ $$n = m ]; then \
- mergenames=0; \
- w=http://akhlaghi.org/src/m4-1.4.18-patched.tar.gz; \
- elif [ $$n = make ]; then w=http://akhlaghi.org/src; \
- elif [ $$n = metastore ]; then w=http://akhlaghi.org/src; \
+ elif [ $$n = m ]; then \
+ mergenames=0; \
+ w=http://akhlaghi.org/src/m4-1.4.18-patched.tar.gz; \
+ elif [ $$n = make ]; then w=http://akhlaghi.org/src; \
+ elif [ $$n = metastore ]; then w=http://akhlaghi.org/src; \
elif [ $$n = mpfr ]; then w=http://www.mpfr.org/mpfr-current;\
- elif [ $$n = mpc ]; then w=http://ftp.gnu.org/gnu/mpc; \
- elif [ $$n = ncurses ]; then w=http://ftp.gnu.org/gnu/ncurses; \
- elif [ $$n = openssl ]; then w=http://www.openssl.org/source; \
+ elif [ $$n = mpc ]; then w=http://ftp.gnu.org/gnu/mpc; \
+ elif [ $$n = ncurses ]; then w=http://ftp.gnu.org/gnu/ncurses; \
+ elif [ $$n = openssl ]; then w=http://www.openssl.org/source; \
elif [ $$n = patchelf ]; then w=http://nixos.org/releases/patchelf/patchelf-$(patchelf-version); \
elif [ $$n = pkg ]; then w=http://pkg-config.freedesktop.org/releases; \
elif [ $$n = readline ]; then w=http://ftp.gnu.org/gnu/readline; \
- elif [ $$n = sed ]; then w=http://ftp.gnu.org/gnu/sed; \
- elif [ $$n = tar ]; then w=http://ftp.gnu.org/gnu/tar; \
- elif [ $$n = unzip ]; then \
- mergenames=0; v=$$(echo $(unzip-version) | sed -e's/\.//'); \
- w=ftp://ftp.info-zip.org/pub/infozip/src/unzip$$v.tgz; \
- elif [ $$n = wget ]; then w=http://ftp.gnu.org/gnu/wget; \
- elif [ $$n = which ]; then w=http://ftp.gnu.org/gnu/which; \
- elif [ $$n = xz ]; then w=http://tukaani.org/xz; \
- elif [ $$n = zip ]; then \
- mergenames=0; v=$$(echo $(zip-version) | sed -e's/\.//'); \
- w=ftp://ftp.info-zip.org/pub/infozip/src/zip$$v.tgz; \
- elif [ $$n = zlib ]; then w=http://www.zlib.net; \
- else \
- echo; echo; echo; \
- echo "'$$n' not a basic dependency name (for downloading)." \
- echo; echo; echo; \
- exit 1; \
- fi; \
- \
- if [ $$mergenames = 1 ]; then tarballurl=$$w/"$*"; \
- else tarballurl=$$w; \
- fi; \
- \
- echo "Downloading $$tarballurl"; \
- if [ -f $(ibdir)/wget ]; then \
- downloader="wget --no-use-server-timestamps -O"; \
- else \
- downloader="$(DOWNLOADER)"; \
- fi; \
- \
- touch $(lockdir)/download; \
- $(downloadwrapper) "$$downloader" $(lockdir)/download \
- $$tarballurl $@; \
+ elif [ $$n = sed ]; then w=http://ftp.gnu.org/gnu/sed; \
+ elif [ $$n = tar ]; then w=http://ftp.gnu.org/gnu/tar; \
+ elif [ $$n = unzip ]; then \
+ mergenames=0; v=$$(echo $(unzip-version) | sed -e's/\.//'); \
+ w=ftp://ftp.info-zip.org/pub/infozip/src/unzip$$v.tgz; \
+ elif [ $$n = wget ]; then w=http://ftp.gnu.org/gnu/wget; \
+ elif [ $$n = which ]; then w=http://ftp.gnu.org/gnu/which; \
+ elif [ $$n = xz ]; then w=http://tukaani.org/xz; \
+ elif [ $$n = zip ]; then \
+ mergenames=0; v=$$(echo $(zip-version) | sed -e's/\.//'); \
+ w=ftp://ftp.info-zip.org/pub/infozip/src/zip$$v.tgz; \
+ elif [ $$n = zlib ]; then w=http://www.zlib.net; \
+ else \
+ echo; echo; echo; \
+ echo "'$$n' not a basic dependency name (for downloading)." \
+ echo; echo; echo; \
+ exit 1; \
+ fi; \
+ \
+ if [ $$mergenames = 1 ]; then tarballurl=$$w/"$*"; \
+ else tarballurl=$$w; \
+ fi; \
+ \
+ echo "Downloading $$tarballurl"; \
+ if [ -f $(ibdir)/wget ]; then \
+ downloader="wget --no-use-server-timestamps -O"; \
+ else \
+ downloader="$(DOWNLOADER)"; \
+ fi; \
+ \
+ touch $(lockdir)/download; \
+ $(downloadwrapper) "$$downloader" $(lockdir)/download \
+ $$tarballurl $@; \
fi
@@ -221,20 +221,22 @@ $(tarballs): $(tdir)/%: | $(lockdir)
# is very annoying and can cause many complications. We thus remove any
# part of PATH of that has `ccache' in it before making symbolic links to
# the programs we are not building ourselves.
-makelink = origpath="$$PATH"; \
- export PATH=$$(echo $(syspath) | tr : '\n' | grep -v ccache \
- | tr '\n' :); \
- a=$$(which $(1) 2> /dev/null); \
- if [ -e $(ibdir)/$(1) ]; then rm $(ibdir)/$(1); fi; \
- if [ x$$a = x ]; then \
- if [ "x$(strip $(2))" = xmandatory ]; then \
- echo "'$(1)' is necessary for higher-level tools."; \
+makelink = origpath="$$PATH"; \
+ export PATH=$$(echo $(syspath) \
+ | tr : '\n' \
+ | grep -v ccache \
+ | tr '\n' :); \
+ a=$$(which $(1) 2> /dev/null); \
+ if [ -e $(ibdir)/$(1) ]; then rm $(ibdir)/$(1); fi; \
+ if [ x$$a = x ]; then \
+ if [ "x$(strip $(2))" = xmandatory ]; then \
+ echo "'$(1)' is necessary for higher-level tools."; \
echo "Please install it for the configuration to continue."; \
- exit 1; \
- fi; \
- else \
- ln -s $$a $(ibdir)/$(1); \
- fi; \
+ exit 1; \
+ fi; \
+ else \
+ ln -s $$a $(ibdir)/$(1); \
+ fi; \
export PATH="$$origpath"
$(ibdir) $(ildir):; mkdir $@
$(ibidir)/low-level-links: | $(ibdir) $(ildir)
@@ -264,11 +266,11 @@ $(ibidir)/low-level-links: | $(ibdir) $(ildir)
# Necessary libraries:
# Libdl (for dynamic loading libraries at runtime)
# POSIX Threads library for multi-threaded programs.
- for l in dl pthread; do \
- rm -f $(ildir)/lib$$l*; \
- if [ -f /usr/lib/lib$$l.a ]; then \
- ln -s /usr/lib/lib$$l.* $(ildir)/; \
- fi; \
+ for l in dl pthread; do \
+ rm -f $(ildir)/lib$$l*; \
+ if [ -f /usr/lib/lib$$l.a ]; then \
+ ln -s /usr/lib/lib$$l.* $(ildir)/; \
+ fi; \
done
# We want this to be empty (so it doesn't interefere with the other
@@ -319,48 +321,48 @@ $(ibidir)/bzip2: $(tdir)/bzip2-$(bzip2-version).tar.gz
#
# NOTE: the major version number appears in the final symbolic
# link.
- tdir=bzip2-$(bzip2-version); \
- if [ $(static_build) = yes ]; then \
- makecommand="make LDFLAGS=-static"; \
- makeshared="echo no-shared"; \
- else \
- makecommand="make"; \
- if [ x$(on_mac_os) = xyes ]; then \
- makeshared="echo no-shared"; \
- else \
- makeshared="make -f Makefile-libbz2_so"; \
- fi; \
- fi; \
- cd $(ddir) && rm -rf $$tdir && tar xf $< && cd $$tdir \
- && sed -e 's@\(ln -s -f \)$$(PREFIX)/bin/@\1@' Makefile \
- > Makefile.sed \
- && mv Makefile.sed Makefile \
- && $$makeshared \
- && cp -a libbz2* $(ildir)/ \
- && make clean \
- && $$makecommand \
- && make install PREFIX=$(idir) \
- && cd .. \
- && rm -rf $$tdir \
- && cd $(ildir) \
- && ln -fs libbz2.so.1.0 libbz2.so \
+ tdir=bzip2-$(bzip2-version); \
+ if [ $(static_build) = yes ]; then \
+ makecommand="make LDFLAGS=-static"; \
+ makeshared="echo no-shared"; \
+ else \
+ makecommand="make"; \
+ if [ x$(on_mac_os) = xyes ]; then \
+ makeshared="echo no-shared"; \
+ else \
+ makeshared="make -f Makefile-libbz2_so"; \
+ fi; \
+ fi; \
+ cd $(ddir) && rm -rf $$tdir && tar xf $< && cd $$tdir \
+ && sed -e 's@\(ln -s -f \)$$(PREFIX)/bin/@\1@' Makefile \
+ > Makefile.sed \
+ && mv Makefile.sed Makefile \
+ && $$makeshared \
+ && cp -a libbz2* $(ildir)/ \
+ && make clean \
+ && $$makecommand \
+ && make install PREFIX=$(idir) \
+ && cd .. \
+ && rm -rf $$tdir \
+ && cd $(ildir) \
+ && ln -fs libbz2.so.1.0 libbz2.so \
&& echo "Bzip2 $(bzip2-version)" > $@
$(ibidir)/unzip: $(tdir)/unzip-$(unzip-version).tar.gz
- v=$$(echo $(unzip-version) | sed -e's/\.//'); \
- $(call gbuild, $<, unzip$$v, static,, \
- -f unix/Makefile generic_gcc \
- CFLAGS="-DBIG_MEM -DMMAP",,pwd, \
- -f unix/Makefile \
+ v=$$(echo $(unzip-version) | sed -e's/\.//'); \
+ $(call gbuild, $<, unzip$$v, static,, \
+ -f unix/Makefile generic_gcc \
+ CFLAGS="-DBIG_MEM -DMMAP",,pwd, \
+ -f unix/Makefile \
BINDIR=$(ibdir) MANDIR=$(idir)/man/man1 ) \
&& echo "Unzip $(unzip-version)" > $@
$(ibidir)/zip: $(tdir)/zip-$(zip-version).tar.gz
- v=$$(echo $(zip-version) | sed -e's/\.//'); \
- $(call gbuild, $<, zip$$v, static,, \
- -f unix/Makefile generic_gcc \
- CFLAGS="-DBIG_MEM -DMMAP",,pwd, \
- -f unix/Makefile \
+ v=$$(echo $(zip-version) | sed -e's/\.//'); \
+ $(call gbuild, $<, zip$$v, static,, \
+ -f unix/Makefile generic_gcc \
+ CFLAGS="-DBIG_MEM -DMMAP",,pwd, \
+ -f unix/Makefile \
BINDIR=$(ibdir) MANDIR=$(idir)/man/man1 ) \
&& echo "Zip $(zip-version)" > $@
@@ -379,12 +381,12 @@ $(ibidir)/zlib: $(tdir)/zlib-$(zlib-version).tar.gz
# Tar to be the last compression-related software (the first-set of
# software to be built).
$(ibidir)/tar: $(tdir)/tar-$(tar-version).tar.gz \
- $(ibidir)/bzip2 \
- $(ibidir)/unzip \
- $(ibidir)/gzip \
- $(ibidir)/lzip \
- $(ibidir)/zlib \
- $(ibidir)/zip \
+ $(ibidir)/bzip2 \
+ $(ibidir)/unzip \
+ $(ibidir)/gzip \
+ $(ibidir)/lzip \
+ $(ibidir)/zlib \
+ $(ibidir)/zip \
$(ibidir)/xz
# Since all later programs depend on Tar, the configuration will be
# stuck here, only making Tar. So its more efficient to built it on
@@ -434,9 +436,9 @@ $(ibidir)/ncurses: $(tdir)/ncurses-$(ncurses-version).tar.gz \
rm -f $(ibdir)/bash* $(ibdir)/awk* $(ibdir)/gawk*
# Standard build process.
- $(call gbuild, $<, ncurses-$(ncurses-version), static, \
- --with-shared --enable-rpath --without-normal \
- --without-debug --with-cxx-binding \
+ $(call gbuild, $<, ncurses-$(ncurses-version), static, \
+ --with-shared --enable-rpath --without-normal \
+ --without-debug --with-cxx-binding \
--with-cxx-shared --enable-widec --enable-pc-files \
--with-pkg-config=$(ildir)/pkgconfig, -j$(numthreads))
@@ -477,39 +479,39 @@ $(ibidir)/ncurses: $(tdir)/ncurses-$(ncurses-version).tar.gz \
#
# 5. A link is made to also be able to include files from the
# `ncurses' headers.
- if [ x$(on_mac_os) = xyes ]; then so="dylib"; else so="so"; fi; \
- if [ -f $(ildir)/libncursesw.$$so ]; then \
- \
- sov=$$(ls -l $(ildir)/libncursesw* \
- | awk '/^-/{print $$NF}' \
- | sed -e's|'$(ildir)/libncursesw.'||'); \
- \
- cd "$(ildir)"; \
- for lib in ncurses ncurses++ form panel menu; do \
- ln -fs lib$$lib"w".$$sov lib$$lib.$$so; \
- ln -fs $(ildir)/pkgconfig/"$$lib"w.pc pkgconfig/$$lib.pc; \
- done; \
- for lib in tic tinfo; do \
- ln -fs libncursesw.$$sov lib$$lib.$$so; \
- ln -fs libncursesw.$$sov lib$$lib.$$sov; \
- ln -fs $(ildir)/pkgconfig/ncursesw.pc pkgconfig/$$lib.pc; \
- done; \
- ln -fs libncursesw.$$sov libcurses.$$so; \
- ln -fs libncursesw.$$sov libcursesw.$$sov; \
- ln -fs $(ildir)/pkgconfig/ncursesw.pc pkgconfig/curses.pc; \
- ln -fs $(ildir)/pkgconfig/ncursesw.pc pkgconfig/cursesw.pc; \
- \
- ln -fs $(idir)/include/ncursesw $(idir)/include/ncurses; \
- echo "GNU NCURSES $(ncurses-version)" > $@; \
- else \
- exit 1; \
+ if [ x$(on_mac_os) = xyes ]; then so="dylib"; else so="so"; fi; \
+ if [ -f $(ildir)/libncursesw.$$so ]; then \
+ \
+ sov=$$(ls -l $(ildir)/libncursesw* \
+ | awk '/^-/{print $$NF}' \
+ | sed -e's|'$(ildir)/libncursesw.'||'); \
+ \
+ cd "$(ildir)"; \
+ for lib in ncurses ncurses++ form panel menu; do \
+ ln -fs lib$$lib"w".$$sov lib$$lib.$$so; \
+ ln -fs $(ildir)/pkgconfig/"$$lib"w.pc pkgconfig/$$lib.pc; \
+ done; \
+ for lib in tic tinfo; do \
+ ln -fs libncursesw.$$sov lib$$lib.$$so; \
+ ln -fs libncursesw.$$sov lib$$lib.$$sov; \
+ ln -fs $(ildir)/pkgconfig/ncursesw.pc pkgconfig/$$lib.pc; \
+ done; \
+ ln -fs libncursesw.$$sov libcurses.$$so; \
+ ln -fs libncursesw.$$sov libcursesw.$$sov; \
+ ln -fs $(ildir)/pkgconfig/ncursesw.pc pkgconfig/curses.pc; \
+ ln -fs $(ildir)/pkgconfig/ncursesw.pc pkgconfig/cursesw.pc; \
+ \
+ ln -fs $(idir)/include/ncursesw $(idir)/include/ncurses; \
+ echo "GNU NCURSES $(ncurses-version)" > $@; \
+ else \
+ exit 1; \
fi
-$(ibidir)/readline: $(tdir)/readline-$(readline-version).tar.gz \
+$(ibidir)/readline: $(tdir)/readline-$(readline-version).tar.gz \
$(ibidir)/ncurses
- $(call gbuild, $<, readline-$(readline-version), static, \
- --with-curses --disable-install-examples, \
- SHLIB_LIBS="-lncursesw" -j$(numthreads)) \
+ $(call gbuild, $<, readline-$(readline-version), static, \
+ --with-curses --disable-install-examples, \
+ SHLIB_LIBS="-lncursesw" -j$(numthreads)) \
&& echo "GNU Readline $(readline-version)" > $@
$(ibidir)/patchelf: $(tdir)/patchelf-$(patchelf-version).tar.gz \
@@ -577,9 +579,9 @@ $(ibidir)/bash: $(tdir)/bash-$(bash-version).tar.lz \
# you disable them all with `--enable-minimal-config' and enable a
# subset using the `--enable' options.
if [ "x$(static_build)" = xyes ]; then stopt="--enable-static-link";\
- else stopt=""; \
- fi; \
- $(call gbuild, $<, bash-$(bash-version),, \
+ else stopt=""; \
+ fi; \
+ $(call gbuild, $<, bash-$(bash-version),, \
--with-installed-readline=$(ildir) $$stopt, \
-j$(numthreads))
@@ -587,8 +589,8 @@ $(ibidir)/bash: $(tdir)/bash-$(bash-version).tar.lz \
# default. So, we have to manually include it, currently we are
# only doing this on GNU/Linux systems (using the `patchelf'
# program).
- if [ "x$(needpatchelf)" != x ]; then \
- if [ -f $(ibdir)/bash ]; then \
+ if [ "x$(needpatchelf)" != x ]; then \
+ if [ -f $(ibdir)/bash ]; then \
$(ibdir)/patchelf --set-rpath $(ildir) $(ibdir)/bash; fi \
fi
@@ -600,10 +602,10 @@ $(ibidir)/bash: $(tdir)/bash-$(bash-version).tar.lz \
# Just to be sure that the installation step above went well,
# before making the link, we'll see if the file actually exists
# there.
- if [ -f $(ibdir)/bash ]; then \
- ln -fs $(ibdir)/bash $(ibdir)/sh; \
- echo "GNU Bash $(bash-version)" > $@; \
- else \
+ if [ -f $(ibdir)/bash ]; then \
+ ln -fs $(ibdir)/bash $(ibdir)/sh; \
+ echo "GNU Bash $(bash-version)" > $@; \
+ else \
echo "GNU Bash not built!"; exit 1; fi
@@ -624,23 +626,23 @@ $(ibidir)/bash: $(tdir)/bash-$(bash-version).tar.lz \
# this project is avoid dependency on the host as much as possible.
$(ibidir)/curl: $(tdir)/curl-$(curl-version).tar.gz \
$(ibidir)/openssl
- $(call gbuild, $<, curl-$(curl-version), , \
- LIBS="-pthread" \
- --with-zlib=$(ildir) \
- --with-ssl=$(idir) \
- --without-mesalink \
- --with-ca-fallback \
- --without-librtmp \
- --without-libidn2 \
- --without-wolfssl \
- --without-brotli \
- --without-gnutls \
- --without-cyassl \
- --without-libpsl \
- --without-axtls \
- --disable-ldaps \
- --disable-ldap \
- --without-nss, V=1) \
+ $(call gbuild, $<, curl-$(curl-version), , \
+ LIBS="-pthread" \
+ --with-zlib=$(ildir) \
+ --with-ssl=$(idir) \
+ --without-mesalink \
+ --with-ca-fallback \
+ --without-librtmp \
+ --without-libidn2 \
+ --without-wolfssl \
+ --without-brotli \
+ --without-gnutls \
+ --without-cyassl \
+ --without-libpsl \
+ --without-axtls \
+ --disable-ldaps \
+ --disable-ldap \
+ --without-nss, V=1) \
&& echo "cURL $(curl-version)" > $@
# OpenSSL
@@ -659,8 +661,8 @@ $(ibidir)/curl: $(tdir)/curl-$(curl-version).tar.gz \
#openssl-static = no-dso no-dynamic-engine no-shared
#endif
$(idir)/etc:; mkdir $@
-$(ibidir)/openssl: $(tdir)/openssl-$(openssl-version).tar.gz \
- $(tdir)/cert.pem \
+$(ibidir)/openssl: $(tdir)/openssl-$(openssl-version).tar.gz \
+ $(tdir)/cert.pem \
$(ibidir)/bash | $(idir)/etc
# According to OpenSSL's Wiki (link bellow), it can't automatically
# detect Mac OS's structure. It will need some help. So we'll use
@@ -669,27 +671,27 @@ $(ibidir)/openssl: $(tdir)/openssl-$(openssl-version).tar.gz \
# environment variable.
#
# https://wiki.openssl.org/index.php/Compilation_and_Installation
- if [ x$(on_mac_os) = xyes ]; then \
- export KERNEL_BITS=64; \
+ if [ x$(on_mac_os) = xyes ]; then \
+ export KERNEL_BITS=64; \
copt="shared no-ssl2 no-ssl3 enable-ec_nistp_64_gcc_128"; \
- fi; \
- $(call gbuild, $<, openssl-$(openssl-version), , \
- zlib \
- $$copt \
- $(rpath_command) \
- --openssldir=$(idir)/etc/ssl \
- --with-zlib-lib=$(ildir) \
- --with-zlib-include=$(idir)/include, , , \
- ./config ) && \
- cp $(tdir)/cert.pem $(idir)/etc/ssl/cert.pem; \
- if [ $$? = 0 ]; then \
- if [ x$(on_mac_os) = xyes ]; then \
- echo "No need to fix rpath in libssl"; \
- else \
- patchelf --set-rpath $(ildir) $(ildir)/libssl.so; \
- fi; \
- echo "OpenSSL $(openssl-version)" > $@; \
- fi
+ fi; \
+ $(call gbuild, $<, openssl-$(openssl-version), , \
+ zlib \
+ $$copt \
+ $(rpath_command) \
+ --openssldir=$(idir)/etc/ssl \
+ --with-zlib-lib=$(ildir) \
+ --with-zlib-include=$(idir)/include, , , \
+ ./config ) \
+ && cp $(tdir)/cert.pem $(idir)/etc/ssl/cert.pem \
+ && if [ $$? = 0 ]; then \
+ if [ x$(on_mac_os) = xyes ]; then \
+ echo "No need to fix rpath in libssl"; \
+ else \
+ patchelf --set-rpath $(ildir) $(ildir)/libssl.so; \
+ fi; \
+ echo "OpenSSL $(openssl-version)" > $@; \
+ fi
# GNU Wget
#
@@ -705,22 +707,22 @@ $(ibidir)/openssl: $(tdir)/openssl-$(openssl-version).tar.gz \
# host system (especially a crash when these libraries are updated on the
# host), they are disabled here.
$(ibidir)/wget: $(tdir)/wget-$(wget-version).tar.lz \
- $(ibidir)/pkg-config \
+ $(ibidir)/pkg-config \
$(ibidir)/openssl
- libs="-pthread"; \
+ libs="-pthread"; \
if [ x$(needs_ldl) = xyes ]; then libs="$$libs -ldl"; fi; \
- $(call gbuild, $<, wget-$(wget-version), , \
- LIBS="$$LIBS $$libs" \
- --with-libssl-prefix=$(idir) \
- --with-ssl=openssl \
- --with-openssl=yes \
- --without-metalink \
- --without-libuuid \
- --without-libpsl \
- --without-libidn \
- --disable-pcre2 \
- --disable-pcre \
- --disable-iri ) \
+ $(call gbuild, $<, wget-$(wget-version), , \
+ LIBS="$$LIBS $$libs" \
+ --with-libssl-prefix=$(idir) \
+ --with-ssl=openssl \
+ --with-openssl=yes \
+ --without-metalink \
+ --without-libuuid \
+ --without-libpsl \
+ --without-libidn \
+ --disable-pcre2 \
+ --disable-pcre \
+ --disable-iri ) \
&& echo "GNU Wget $(wget-version)" > $@
@@ -752,16 +754,16 @@ $(ibidir)/coreutils: $(tdir)/coreutils-$(coreutils-version).tar.xz \
# The echo after the PatchELF loop is to avoid a crash if the last
# file that PatchELF encounters is not usable (and it returns with
# an error).
- $(call gbuild, $<, coreutils-$(coreutils-version), static, \
- LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
- --disable-silent-rules --with-openssl=yes, \
- -j$(numthreads)) \
- && if [ x$(on_mac_os) != xyes ]; then \
- for f in $(ibdir)/*; do \
- $(ibdir)/patchelf --set-rpath $(ildir) $$f; \
- done; \
- echo "PatchELF applied to all programs."; \
- fi \
+ $(call gbuild, $<, coreutils-$(coreutils-version), static, \
+ LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
+ --disable-silent-rules --with-openssl=yes, \
+ -j$(numthreads)) \
+ && if [ x$(on_mac_os) != xyes ]; then \
+ for f in $(ibdir)/*; do \
+ $(ibdir)/patchelf --set-rpath $(ildir) $$f; \
+ done; \
+ echo "PatchELF applied to all programs."; \
+ fi \
&& echo "GNU Coreutils $(coreutils-version)" > $@
$(ibidir)/diffutils: $(tdir)/diffutils-$(diffutils-version).tar.xz \
@@ -775,32 +777,32 @@ $(ibidir)/findutils: $(tdir)/findutils-$(findutils-version).tar.lz \
&& echo "GNU Findutils $(findutils-version)" > $@
$(ibidir)/gawk: $(tdir)/gawk-$(gawk-version).tar.lz \
- $(ibidir)/bash \
- $(ibidir)/mpfr \
+ $(ibidir)/bash \
+ $(ibidir)/mpfr \
$(ibidir)/gmp
# AWK doesn't include RPATH by default, so we'll have to manually
# include it using the `patchelf' program (which was a dependency
# of Bash). Just note that AWK produces two executables (for
# example `gawk-4.2.1' and `gawk') and a symbolic link `awk' to one
# of those executables.
- $(call gbuild, $<, gawk-$(gawk-version), static, \
- --with-readline=$(idir)) \
- && if [ "x$(needpatchelf)" != x ]; then \
- if [ -f $(ibdir)/gawk ]; then \
- $(ibdir)/patchelf --set-rpath $(ildir) $(ibdir)/gawk; \
- fi; \
- if [ -f $(ibdir)/gawk-$(gawk-version) ]; then \
- $(ibdir)/patchelf --set-rpath $(ildir) \
- $(ibdir)/gawk-$(gawk-version); \
- fi; \
- fi \
+ $(call gbuild, $<, gawk-$(gawk-version), static, \
+ --with-readline=$(idir)) \
+ && if [ "x$(needpatchelf)" != x ]; then \
+ if [ -f $(ibdir)/gawk ]; then \
+ $(ibdir)/patchelf --set-rpath $(ildir) $(ibdir)/gawk; \
+ fi; \
+ if [ -f $(ibdir)/gawk-$(gawk-version) ]; then \
+ $(ibdir)/patchelf --set-rpath $(ildir) \
+ $(ibdir)/gawk-$(gawk-version); \
+ fi; \
+ fi \
&& echo "GNU AWK $(gawk-version)" > $@
$(ibidir)/git: $(tdir)/git-$(git-version).tar.xz \
$(ibidir)/curl
- $(call gbuild, $<, git-$(git-version), static, \
+ $(call gbuild, $<, git-$(git-version), static, \
--without-tcltk --with-shell=$(ibdir)/bash, \
- V=1) \
+ V=1) \
&& echo "Git $(git-version)" > $@
$(ibidir)/gmp: $(tdir)/gmp-$(gmp-version).tar.lz \
@@ -813,7 +815,7 @@ $(ibidir)/gmp: $(tdir)/gmp-$(gmp-version).tar.lz \
$(ibidir)/glibtool: $(tdir)/libtool-$(libtool-version).tar.xz \
$(ibidir)/m4
$(call gbuild, $<, libtool-$(libtool-version), static, \
- --program-prefix=g) \
+ --program-prefix=g) \
&& echo "GNU Libtool $(libtool-version)" > $@
$(ibidir)/grep: $(tdir)/grep-$(grep-version).tar.xz \
@@ -854,10 +856,10 @@ else
needlibbsd = $(ibidir)/libbsd
endif
$(ibidir)/metastore: $(tdir)/metastore-$(metastore-version).tar.gz \
- $(ibidir)/coreutils \
- $(ibidir)/gawk \
- $(ibidir)/git \
- $(ibidir)/sed \
+ $(ibidir)/coreutils \
+ $(ibidir)/gawk \
+ $(ibidir)/git \
+ $(ibidir)/sed \
$(needlibbsd)
# The build command below will change the current directory of this
@@ -879,29 +881,29 @@ $(ibidir)/metastore: $(tdir)/metastore-$(metastore-version).tar.gz \
# Note that the -O and -G options used here are currently only in a
# fork of `metastore' currently hosted at:
# https://github.com/mohammad-akhlaghi/metastore
- user=$$(whoami); \
- group=$$(groups | awk '{print $$1}'); \
- cd $$current_dir; \
- if [ -f $(ibdir)/metastore ]; then \
- for f in pre-commit post-checkout; do \
- sed -e's|@USER[@]|'$$user'|g' \
- -e's|@GROUP[@]|'$$group'|g' \
- -e's|@BINDIR[@]|$(ibdir)|g' \
- -e's|@TOP_PROJECT_DIR[@]|'$$current_dir'|g' \
+ user=$$(whoami); \
+ group=$$(groups | awk '{print $$1}'); \
+ cd $$current_dir; \
+ if [ -f $(ibdir)/metastore ]; then \
+ for f in pre-commit post-checkout; do \
+ sed -e's|@USER[@]|'$$user'|g' \
+ -e's|@GROUP[@]|'$$group'|g' \
+ -e's|@BINDIR[@]|$(ibdir)|g' \
+ -e's|@TOP_PROJECT_DIR[@]|'$$current_dir'|g' \
reproduce/software/bash/git-$$f > .git/hooks/$$f; \
- chmod +x .git/hooks/$$f; \
- echo "Metastore (forked) $(metastore-version)" > $@; \
- done; \
- else \
- echo; echo; echo; \
- echo "*****************"; \
- echo "metastore couldn't be installed!"; \
- echo; \
+ chmod +x .git/hooks/$$f; \
+ echo "Metastore (forked) $(metastore-version)" > $@; \
+ done; \
+ else \
+ echo; echo; echo; \
+ echo "*****************"; \
+ echo "metastore couldn't be installed!"; \
+ echo; \
echo "Its used for preserving timestamps on Git commits."; \
echo "Its useful for development, not simple running of "; \
echo "the project. So we won't stop the configuration "; \
- echo "because it wasn't built."; \
- echo "*****************"; \
+ echo "because it wasn't built."; \
+ echo "*****************"; \
fi
$(ibidir)/mpfr: $(tdir)/mpfr-$(mpfr-version).tar.xz \
@@ -916,11 +918,11 @@ $(ibidir)/pkg-config: $(tdir)/pkg-config-$(pkgconfig-version).tar.gz \
# building Glib (as part of pkg-config). So to be safe, for Mac
# systems, we'll make sure it will use LLVM's Clang.
if [ x$(on_mac_os) = xyes ]; then export compiler="CC=clang"; \
- else export compiler=""; \
- fi; \
- $(call gbuild, $<, pkg-config-$(pkgconfig-version), static, \
- $$compiler --with-internal-glib \
- --with-pc-path=$(ildir)/pkgconfig) \
+ else export compiler=""; \
+ fi; \
+ $(call gbuild, $<, pkg-config-$(pkgconfig-version), static, \
+ $$compiler --with-internal-glib \
+ --with-pc-path=$(ildir)/pkgconfig) \
&& echo "pkg-config $(pkgconfig-version)" > $@
$(ibidir)/sed: $(tdir)/sed-$(sed-version).tar.xz \
@@ -955,17 +957,17 @@ binutils-prerequisites = $(tdir)/binutils-$(binutils-version).tar.lz \
$(ibidir)/bash
endif
$(ibidir)/binutils: $(binutils-prerequisites)
- if [ x$(on_mac_os) = xyes ]; then \
- $(call makelink,as) \
- $(call makelink,ar) \
- $(call makelink,ld) \
- $(call makelink,nm) \
- $(call makelink,ps) \
- $(call makelink,ranlib) \
- echo "" > $@; \
- else \
+ if [ x$(on_mac_os) = xyes ]; then \
+ $(call makelink,as); \
+ $(call makelink,ar); \
+ $(call makelink,ld); \
+ $(call makelink,nm); \
+ $(call makelink,ps); \
+ $(call makelink,ranlib); \
+ echo "" > $@; \
+ else \
$(call gbuild, $<, binutils-$(binutils-version), static) \
- && echo "GNU Binutils $(binutils-version)" > $@; \
+ && echo "GNU Binutils $(binutils-version)" > $@; \
fi
# `file' is not a prerequisite of GCC. However, since it is low level, it is
@@ -1002,21 +1004,21 @@ ifeq ($(host_cc),1)
gcc-prerequisites =
else
gcc-prerequisites = $(tdir)/gcc-$(gcc-version).tar.xz \
- $(ibidir)/binutils \
- $(ibidir)/isl \
+ $(ibidir)/binutils \
+ $(ibidir)/isl \
$(ibidir)/mpc
endif
-$(ibidir)/gcc: $(gcc-prerequisites) \
- $(ibidir)/sed \
- $(ibidir)/bash \
- $(ibidir)/file \
- $(ibidir)/gawk \
- $(ibidir)/grep \
- $(ibidir)/which \
- $(ibidir)/glibtool \
- $(ibidir)/binutils \
- $(ibidir)/coreutils \
- $(ibidir)/diffutils \
+$(ibidir)/gcc: $(gcc-prerequisites) \
+ $(ibidir)/sed \
+ $(ibidir)/bash \
+ $(ibidir)/file \
+ $(ibidir)/gawk \
+ $(ibidir)/grep \
+ $(ibidir)/which \
+ $(ibidir)/glibtool \
+ $(ibidir)/binutils \
+ $(ibidir)/coreutils \
+ $(ibidir)/diffutils \
$(ibidir)/findutils
# GCC builds is own libraries in '$(idir)/lib64'. But all other
@@ -1024,57 +1026,57 @@ $(ibidir)/gcc: $(gcc-prerequisites) \
# single architecture, we can trick GCC into building its libraries
# in '$(idir)/lib' by defining the '$(idir)/lib64' as a symbolic
# link to '$(idir)/lib'.
- if [ $(host_cc) = 1 ]; then \
- $(call makelink,gcc); \
- $(call makelink,g++,mandatory); \
- $(call makelink,gfortran,mandatory); \
- $(call makelink,strip,mandatory); \
- ln -sf $$(which gcc) $(ibdir)/cc; \
- ccinfo=$$(gcc --version | awk 'NR==1'); \
- echo "C compiler (""$$ccinfo"")" > $@; \
- else \
+ if [ $(host_cc) = 1 ]; then \
+ $(call makelink,gcc); \
+ $(call makelink,g++,mandatory); \
+ $(call makelink,gfortran,mandatory); \
+ $(call makelink,strip,mandatory); \
+ ln -sf $$(which gcc) $(ibdir)/cc; \
+ ccinfo=$$(gcc --version | awk 'NR==1'); \
+ echo "C compiler (""$$ccinfo"")" > $@; \
+ else \
rm -f $(ibdir)/gcc* $(ibdir)/g++ $(ibdir)/gfortran $(ibdir)/gcov*;\
- rm -rf $(ildir)/gcc $(ildir)/libcc* $(ildir)/libgcc*; \
+ rm -rf $(ildir)/gcc $(ildir)/libcc* $(ildir)/libgcc*; \
rm -rf $(ildir)/libgfortran* $(ildir)/libstdc* rm $(idir)/x86_64*;\
- \
- ln -fs $(ildir) $(idir)/lib64; \
- \
- cd $(ddir); \
- rm -rf gcc-build gcc-$(gcc-version); \
- tar xf $< \
- && mkdir $(ddir)/gcc-build \
- && cd $(ddir)/gcc-build \
- && ../gcc-$(gcc-version)/configure SHELL=$(ibdir)/bash \
- --prefix=$(idir) \
- --with-mpc=$(idir) \
- --with-mpfr=$(idir) \
- --with-gmp=$(idir) \
- --with-isl=$(idir) \
- --with-build-time-tools=$(idir) \
- --enable-shared \
- --disable-multilib \
- --disable-multiarch \
- --enable-threads=posix \
- --with-local-prefix=$(idir) \
- --enable-languages=c,c++,fortran,objc,obj-c++ \
- --disable-libada \
- --disable-nls \
- --enable-default-pie \
- --enable-default-ssp \
- --enable-cet=auto \
- --enable-decimal-float \
- && make SHELL=$(ibdir)/bash -j$$(nproc) \
- && make SHELL=$(ibdir)/bash install \
- && cd .. \
- && rm -rf gcc-build gcc-$(gcc-version) \
- \
- && if [ "x$(on_mac_os)" != xyes ]; then \
- for f in $$(find $(idir)/libexec/gcc); do \
- if ldd $$f &> /dev/null; then \
- patchelf --set-rpath $(ildir) $$f; \
- fi; \
- done; \
- fi; \
- ln -sf $(ibdir)/gcc $(ibdir)/cc \
- && echo "GNU Compiler Collection (GCC) $(gcc-version)" > $@; \
+ \
+ ln -fs $(ildir) $(idir)/lib64; \
+ \
+ cd $(ddir); \
+ rm -rf gcc-build gcc-$(gcc-version); \
+ tar xf $< \
+ && mkdir $(ddir)/gcc-build \
+ && cd $(ddir)/gcc-build \
+ && ../gcc-$(gcc-version)/configure SHELL=$(ibdir)/bash \
+ --prefix=$(idir) \
+ --with-mpc=$(idir) \
+ --with-mpfr=$(idir) \
+ --with-gmp=$(idir) \
+ --with-isl=$(idir) \
+ --with-build-time-tools=$(idir) \
+ --enable-shared \
+ --disable-multilib \
+ --disable-multiarch \
+ --enable-threads=posix \
+ --with-local-prefix=$(idir) \
+ --enable-languages=c,c++,fortran,objc,obj-c++ \
+ --disable-libada \
+ --disable-nls \
+ --enable-default-pie \
+ --enable-default-ssp \
+ --enable-cet=auto \
+ --enable-decimal-float \
+ && make SHELL=$(ibdir)/bash -j$$(nproc) \
+ && make SHELL=$(ibdir)/bash install \
+ && cd .. \
+ && rm -rf gcc-build gcc-$(gcc-version) \
+ \
+ && if [ "x$(on_mac_os)" != xyes ]; then \
+ for f in $$(find $(idir)/libexec/gcc); do \
+ if ldd $$f &> /dev/null; then \
+ patchelf --set-rpath $(ildir) $$f; \
+ fi; \
+ done; \
+ fi; \
+ ln -sf $(ibdir)/gcc $(ibdir)/cc \
+ && echo "GNU Compiler Collection (GCC) $(gcc-version)" > $@; \
fi