diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2018-12-04 15:16:08 +0000 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2018-12-04 15:16:08 +0000 |
commit | fa912a33396487aa213fbc3cf66305fdbfd312de (patch) | |
tree | 9c8d01caf98be41ceca81d81a7beeb1f0ded144c /reproduce | |
parent | e093f994617f05fd6bd2467cde023b7883ad57a6 (diff) |
Removed already built symbolic links to OS tools
`ln' will complain about a link already existing. So to avoid having to
rely on the `-f' option (which may not be portable across systems), when we
are making symbolic links to the OS tools that we won't be building, we now
remove the file if it exists, then make a new symbolic link.
Diffstat (limited to 'reproduce')
-rw-r--r-- | reproduce/src/make/dependencies-basic.mk | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk index f9b35f8..b007778 100644 --- a/reproduce/src/make/dependencies-basic.mk +++ b/reproduce/src/make/dependencies-basic.mk @@ -188,6 +188,7 @@ $(tarballs): $(tdir)/%: # any C compiler that the system already has and just make a symbolic link # to it. makelink = export PATH=$(syspath); 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 $(ibdir) $(ildir):; mkdir $@ $(ibdir)/low-level-links: | $(ibdir) $(ildir) @@ -228,6 +229,7 @@ $(ibdir)/low-level-links: | $(ibdir) $(ildir) # 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; \ |