Update the make system for installations:
[openssl.git] / Makefile.org
index 5954940..a3ae233 100644 (file)
@@ -15,6 +15,11 @@ OPTIONS=
 CONFIGURE_ARGS=
 SHLIB_TARGET=
 
+# HERE indicates where this Makefile lives.  This can be used to indicate
+# where sub-Makefiles are expected to be.  Currently has very limited usage,
+# and should probably not be bothered with at all.
+HERE=.
+
 # INSTALL_PREFIX is for package builders so that they can configure
 # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
 # Normally it is left empty.
@@ -257,7 +262,7 @@ clean-shared:
 
 link-shared:
        @ for i in ${SHLIBDIRS}; do \
-               $(NEWMAKE) -f Makefile.shared \
+               $(NEWMAKE) -f $(HERE)/Makefile.shared \
                        LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
                        LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
                        symlink.$(SHLIB_TARGET); \
@@ -496,7 +501,7 @@ install: all install_docs
                        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 ); \
+                       mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
                fi; \
        done;
        @if [ -n "$(SHARED_LIBS)" ]; then \
@@ -508,21 +513,21 @@ install: all install_docs
                                if [ "$(PLATFORM)" != "Cygwin" ]; then \
                                        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; \
+                                       mv -f $(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.new; \
                                        chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
-                                       mv $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
+                                       mv -f $(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; \
+                                       mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
                                fi ); \
                        fi; \
                done; \
                (       here="`pwd`"; \
                        cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
-                       $(NEWMAKE) -f $$here/Makefile link-shared ); \
+                       $(NEWMAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
        fi
        cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkginfo