Module Name:    src
Committed By:   apb
Date:           Mon Sep  5 09:57:02 UTC 2011

Modified Files:
        src/etc/mtree: Makefile

Log Message:
Use ${.OBJDIR}/NetBSD.dist.tmp instead of just NetBSD.dist.tmp.
This fixes a problem in which NetBSD.dist.tmp had been created in
the SRCDIR by an earlier build (performed without an OBJDIR), and
the existence of the file in the SRCDIR confused a subsequent build
(performed with an OBJDIR).


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/etc/mtree/Makefile

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

Modified files:

Index: src/etc/mtree/Makefile
diff -u src/etc/mtree/Makefile:1.20 src/etc/mtree/Makefile:1.21
--- src/etc/mtree/Makefile:1.20	Tue Feb  1 21:28:43 2011
+++ src/etc/mtree/Makefile	Mon Sep  5 09:57:02 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20 2011/02/01 21:28:43 jym Exp $
+#	$NetBSD: Makefile,v 1.21 2011/09/05 09:57:02 apb Exp $
 
 .include <bsd.own.mk>
 
@@ -26,12 +26,13 @@
 EXTRA_DIST_FILES+=	${.CURDIR}/NetBSD.dist.extsrc
 .endif
 
-NetBSD.dist:	NetBSD.dist.tmp
-	cmp -s NetBSD.dist.tmp NetBSD.dist || { \
+NetBSD.dist.tmp=	${.OBJDIR}/NetBSD.dist.tmp
+NetBSD.dist:	${NetBSD.dist.tmp}
+	cmp -s ${NetBSD.dist.tmp} ${.TARGET} || { \
 		echo "Updating NetBSD.dist"; \
-		mv NetBSD.dist.tmp NetBSD.dist; \
+		mv ${NetBSD.dist.tmp} ${.TARGET}; \
 	}
-NetBSD.dist.tmp::
+${NetBSD.dist.tmp}::
 	${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \
 	    ${.TARGET}
 
@@ -71,6 +72,6 @@
 .endif	# MKUNPRIVED							# }
 .endif	# DISTRIBUTION_DONE						# }
 
-CLEANFILES+=	NetBSD.dist NetBSD.dist.tmp
+CLEANFILES+=	NetBSD.dist ${NetBSD.dist.tmp}
 
 .include <bsd.prog.mk>

Reply via email to