Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/mtree Use ${.OBJDIR}/NetBSD.dist.tmp instead of just Net...



details:   https://anonhg.NetBSD.org/src/rev/3b4a91071939
branches:  trunk
changeset: 769264:3b4a91071939
user:      apb <apb%NetBSD.org@localhost>
date:      Mon Sep 05 09:57:02 2011 +0000

description:
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).

diffstat:

 etc/mtree/Makefile |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (35 lines):

diff -r a3666b2158ae -r 3b4a91071939 etc/mtree/Makefile
--- a/etc/mtree/Makefile        Mon Sep 05 07:38:52 2011 +0000
+++ b/etc/mtree/Makefile        Mon Sep 05 09:57:02 2011 +0000
@@ -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>



Home | Main Index | Thread Index | Old Index