Bug 416571: use $(NSINSTALL) -t instead of cp to install prcpucfg.h to
authorwtc%google.com
Thu, 21 Feb 2008 02:52:48 +0000
changeset 3931 24eebd53a0cd6bd3684b7775ace659e885222533
parent 3930 84da24c592bc1ea40dd4368c791eaa170075cc6d
child 3932 9bb2a23690c8d47225f189f5280904eb736ef8f1
push idunknown
push userunknown
push dateunknown
bugs416571
Bug 416571: use $(NSINSTALL) -t instead of cp to install prcpucfg.h to avoid updating the last modified time of the installed file. The patch is contributed by jag (Peter Annema) <jag@tty.nl>. r=wtc.
pr/include/md/Makefile.in
--- a/pr/include/md/Makefile.in
+++ b/pr/include/md/Makefile.in
@@ -60,18 +60,27 @@ ifeq ($(OS_ARCH),OpenVMS)
 	    dcl set file /enter=prcpucfg.h $(MDCPUCFG_H); \
 	fi
 else
 	mv -f $(dist_includedir)/$(MDCPUCFG_H) $(dist_includedir)/prcpucfg.h
 endif
 
 install::
 	$(NSINSTALL) -D $(DESTDIR)$(includedir)/md
-	cp $(srcdir)/$(MDCPUCFG_H) $(DESTDIR)$(includedir)/prcpucfg.h
 	$(NSINSTALL) -t -m 644 $(CONFIGS) $(DESTDIR)$(includedir)/md
+	$(NSINSTALL) -t -m 644 $(srcdir)/$(MDCPUCFG_H) $(DESTDIR)$(includedir)
+ifeq ($(OS_ARCH),OpenVMS)
+# On OpenVMS mv updates the file's modified time, so we create a hard link.
+	cd $(DESTDIR)$(includedir); \
+	if test ! -f prcpucfg.h; then \
+	    dcl set file /enter=prcpucfg.h $(MDCPUCFG_H); \
+	fi
+else
+	mv -f $(DESTDIR)$(includedir)/$(MDCPUCFG_H) $(DESTDIR)$(includedir)/prcpucfg.h
+endif
 
 release:: export
 	@echo "Copying machine-dependent prcpucfg.h"
 	@if test -z "$(BUILD_NUMBER)"; then \
 		echo "BUILD_NUMBER must be defined"; \
 		false; \
 	fi
 	@if test ! -d $(RELEASE_INCLUDE_DIR); then \