Update the make system for installations:
[openssl.git] / apps / Makefile.ssl
index 1908f8d..7819236 100644 (file)
@@ -99,17 +99,20 @@ install:
        @for i in $(EXE); \
        do  \
        (echo installing $$i; \
-        cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
-        chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
+        cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
+        chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
+        mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
         done;
        @for i in $(SCRIPTS); \
        do  \
        (echo installing $$i; \
-        cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
-        chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
+        cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
+        chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
+        mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/misc/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/misc/$$i ); \
         done
-       @cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR); \
-       chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
+       @cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
+       chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
+       mv -f  $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
 
 tags:
        ctags $(SRC)