aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src/make/dependencies-basic.mk
diff options
context:
space:
mode:
authorRaul Infante-Sainz <infantesainz@gmail.com>2019-03-22 17:58:45 +0000
committerRaul Infante-Sainz <infantesainz@gmail.com>2019-03-22 17:58:45 +0000
commit8748d3e93fbe60511912fbe6ac424a6d6352de4f (patch)
treea521738c63213ba0d95ea4c85edb7a0cdd9a665b /reproduce/src/make/dependencies-basic.mk
parent30e422bdebaee600ef3b5ebc6313429760d88004 (diff)
On Mac systems, using a copy of GCC, not a link
Until now we were using a symbolic link to replace GCC, but Make doesn't treat symbolic links like files. So it would rebuild the links every time. With this commit, only for GCC on Mac systems, we are actually copying the host's GCC executable to avoid this problem. Also, a wrong comment for cURL was removed.
Diffstat (limited to 'reproduce/src/make/dependencies-basic.mk')
-rw-r--r--reproduce/src/make/dependencies-basic.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk
index 4d39141..76bfa16 100644
--- a/reproduce/src/make/dependencies-basic.mk
+++ b/reproduce/src/make/dependencies-basic.mk
@@ -206,8 +206,9 @@ makelink = origpath="$$PATH"; \
export PATH=$$(echo $(syspath) | tr : '\n' | grep -v ccache \
| paste -s -d:); \
a=$$(which $(1) 2> /dev/null); \
- if [ -f $(ibdir)/$(1) ]; then rm $(ibdir)/$(1); fi; \
- if [ x$$a != x ]; then ln -s $$a $(ibdir)/$(1); fi; \
+ if [ -e $(ibdir)/$(1) ]; then rm $(ibdir)/$(1); fi; \
+ if [ x"$(2)" = xcopy ]; then c=cp; else c="ln -s"; fi; \
+ if [ x$$a != x ]; then $$c $$a $(ibdir)/$(1); fi; \
export PATH="$$origpath"
$(ibdir) $(ildir):; mkdir $@
$(ibdir)/low-level-links: | $(ibdir) $(ildir)
@@ -768,7 +769,7 @@ $(ibdir)/gcc: $(gcc-prerequisites) \
if [ "x$(on_mac_os)" = xyes ]; then \
$(call makelink,gfortran); \
$(call makelink,g++); \
- $(call makelink,gcc); \
+ $(call makelink,gcc,copy); \
else \
\
rm -f $(ibdir)/gcc* $(ibdir)/g++ $(ibdir)/gfortran $(ibdir)/gcov*;\