Module Name:    src
Committed By:   njoly
Date:           Sat Feb 18 14:26:27 UTC 2012

Modified Files:
        src/distrib/common: Makefile.makedev

Log Message:
Tweak MAKEDEVSPEC target to properly report MAKEDEV failures:
- No need to ignore `rm -f' failures which should not happen.
- Do not pipe MAKEDEV output, but use a temp file.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/distrib/common/Makefile.makedev

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

Modified files:

Index: src/distrib/common/Makefile.makedev
diff -u src/distrib/common/Makefile.makedev:1.15 src/distrib/common/Makefile.makedev:1.16
--- src/distrib/common/Makefile.makedev:1.15	Sat Oct 25 22:27:34 2008
+++ src/distrib/common/Makefile.makedev	Sat Feb 18 14:26:27 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.makedev,v 1.15 2008/10/25 22:27:34 apb Exp $
+#	$NetBSD: Makefile.makedev,v 1.16 2012/02/18 14:26:27 njoly Exp $
 #
 # Makefile snippet to add ${MAKEDEVTARGETS} devices to the mtree list
 # (if set), otherwise copy .OBJDIR-of-etc/MAKEDEV to ./dev
@@ -43,12 +43,12 @@ MTREECONF+=	${MAKEDEVSPEC}
 
 ${MAKEDEVSPEC}:	${MAKEDEVSCRIPT}
 	${_MKTARGET_CREATE}
-	-rm -f ${.TARGET} ${.TARGET}.tmp
+	rm -f ${.TARGET} ${.TARGET}.tmp
 	MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
 	    ${HOST_SH} ${MAKEDEVSCRIPT} -s ${MAKEDEVTARGETS} \
-	    | ${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' \
-	    > ${.TARGET}.tmp \
-	&& sort -o ${.TARGET} ${.TARGET}.tmp
+	    > ${.TARGET}.tmp
+	${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' ${.TARGET}.tmp \
+	    | sort -o ${.TARGET}
 
 .else	# ! MAKEDEVTARGETS
 

Reply via email to