diff options
author | Richard Levitte <levitte@openssl.org> | 2002-10-04 13:43:43 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-10-04 13:43:43 +0000 |
commit | 7104c376aed7771ea1d1e4fbd2fe200e274cbc16 (patch) | |
tree | deb66a880b300562365880938d68c589268b2c8a /Makefile.org | |
parent | 0638ced5cce5cab63d09c96d43a1f6cbe71a0b08 (diff) |
Installed libraries should not be overwritten, especially shared ones.
Use mv to make sure the old copy is unlinked instead of overwritten.
PR: 273, and probably others...
Diffstat (limited to 'Makefile.org')
-rw-r--r-- | Makefile.org | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/Makefile.org b/Makefile.org index ab45a851ca..cdeaae66d7 100644 --- a/Makefile.org +++ b/Makefile.org @@ -706,9 +706,10 @@ install: all install_docs do \ if [ -f "$$i" ]; then \ ( echo installing $$i; \ - cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ - $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ fi; \ done; @if [ -n "$(SHARED_LIBS)" ]; then \ @@ -718,14 +719,17 @@ install: all install_docs if [ -f "$$i" -o -f "$$i.a" ]; then \ ( echo installing $$i; \ if [ "$(PLATFORM)" != "Cygwin" ]; then \ - cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ - chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ else \ c=`echo $$i | sed 's/^lib/cyg/'`; \ - cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ - chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ - cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \ + cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ + chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ + mv $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ + cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \ + mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \ fi ); \ fi; \ done; \ |