提交 7104c376 编写于 作者: R Richard Levitte

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...
上级 0638ced5
...@@ -706,9 +706,10 @@ install: all install_docs ...@@ -706,9 +706,10 @@ install: all install_docs
do \ do \
if [ -f "$$i" ]; then \ if [ -f "$$i" ]; then \
( echo installing $$i; \ ( echo installing $$i; \
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
fi; \ fi; \
done; done;
@if [ -n "$(SHARED_LIBS)" ]; then \ @if [ -n "$(SHARED_LIBS)" ]; then \
...@@ -718,14 +719,17 @@ install: all install_docs ...@@ -718,14 +719,17 @@ install: all install_docs
if [ -f "$$i" -o -f "$$i.a" ]; then \ if [ -f "$$i" -o -f "$$i.a" ]; then \
( echo installing $$i; \ ( echo installing $$i; \
if [ "$(PLATFORM)" != "Cygwin" ]; then \ if [ "$(PLATFORM)" != "Cygwin" ]; then \
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
else \ else \
c=`echo $$i | sed 's/^lib/cyg/'`; \ c=`echo $$i | sed 's/^lib/cyg/'`; \
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \ mv $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \ 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 ); \
fi; \ fi; \
done; \ done; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册