improve the build rules for installing /lib/ld-musl-$ARCH.so
authorRich Felker <dalias@aerifal.cx>
Sat, 5 May 2012 01:54:57 +0000 (21:54 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 5 May 2012 01:54:57 +0000 (21:54 -0400)
these new rules should avoid spurious error messages when the
directory (usually /lib) and the dynamic linker symlink already exist,
and minimize the spam when they can't be created.

Makefile

index 4f93049..1bdea61 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -124,10 +124,12 @@ $(DESTDIR)$(libdir)/%: lib/%
 $(DESTDIR)$(includedir)/%: include/%
        install -D -m 644 $< $@
 
-$(DESTDIR)$(LDSO_PATHNAME): lib/libc.so
-       install -d -m 755 $(DESTDIR)$(syslibdir) || true
+$(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(syslibdir)
        ln -sf $(libdir)/libc.so $@ || true
 
+$(DESTDIR)$(syslibdir):
+       install -d -m 755 $(DESTDIR)$(syslibdir)
+
 .PRECIOUS: $(CRT_LIBS:lib/%=crt/%)
 
 .PHONY: all clean install