Module Name:    src
Committed By:   apb
Date:           Wed Oct 30 15:17:01 UTC 2013

Modified Files:
        src/distrib/sets: Makefile

Log Message:
In "make sortlists", if the file was already sorted then don't
change its timestamp.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/distrib/sets/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/Makefile
diff -u src/distrib/sets/Makefile:1.89 src/distrib/sets/Makefile:1.90
--- src/distrib/sets/Makefile:1.89	Sun Oct 27 09:29:42 2013
+++ src/distrib/sets/Makefile	Wed Oct 30 15:17:01 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.89 2013/10/27 09:29:42 apb Exp $
+#	$NetBSD: Makefile,v 1.90 2013/10/30 15:17:01 apb Exp $
 
 # Experimental RCS METALOG versioning
 # (Needs host's rcs(1) commands)
@@ -314,8 +314,13 @@ sortlists: .PHONY
 	    ${_MKSHMSG} "sorting $${f#${.CURDIR}/}" ; \
 	    { grep '^#' "$$f" ; \
 	      grep -v '^#' "$$f" | sort ; \
-	    } >"$$f".tmp \
-	    && mv "$$f".tmp "$$f" ; \
+	    } >"$$f".tmp; \
+	    if cmp "$$f" "$$f".tmp >/dev/null; then \
+	      : "$$f is unchanged" ; \
+	      rm "$$f".tmp ; \
+	    else \
+	      mv "$$f".tmp "$$f" ; \
+	    fi ; \
 	  done
 
 #

Reply via email to