Source-Changes-HG archive

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

[src/trunk]: src/etc/mtree Avoid most of the .CURDIR hackery by letting make ...



details:   https://anonhg.NetBSD.org/src/rev/24e38b867e06
branches:  trunk
changeset: 345794:24e38b867e06
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jun 09 03:44:01 2016 +0000

description:
Avoid most of the .CURDIR hackery by letting make locate the files.

diffstat:

 etc/mtree/Makefile |  53 +++++++++++++++++++++++------------------------------
 1 files changed, 23 insertions(+), 30 deletions(-)

diffs (112 lines):

diff -r e154a54abf1f -r 24e38b867e06 etc/mtree/Makefile
--- a/etc/mtree/Makefile        Thu Jun 09 03:05:54 2016 +0000
+++ b/etc/mtree/Makefile        Thu Jun 09 03:44:01 2016 +0000
@@ -1,9 +1,9 @@
-#      $NetBSD: Makefile,v 1.32 2016/06/09 00:19:31 mrg Exp $
+#      $NetBSD: Makefile,v 1.33 2016/06/09 03:44:01 christos Exp $
 
 .include <bsd.own.mk>
 
 .if ${MKX11} != "no"
-EXTRA_DIST_FILES=      ${.CURDIR}/NetBSD.dist.Xorg
+EXTRA_DIST_FILES=      NetBSD.dist.Xorg
 .endif
 
 # XXX these are only used by compat currently, but they could be used
@@ -11,9 +11,9 @@
 .if defined(MKCOMPAT) && ${MKCOMPAT} != "no"
 .include "${NETBSDSRCDIR}/compat/archdirs.mk"
 .if exists(NetBSD.dist.${MACHINE_ARCH})
-EXTRA_DIST_FILES+=     ${.CURDIR}/NetBSD.dist.${MACHINE_ARCH}
+EXTRA_DIST_FILES+=     NetBSD.dist.${MACHINE_ARCH}
 .elif !empty(MACHINE_ARCH:Mearm*)
-EXTRA_DIST_FILES+=     ${.CURDIR}/NetBSD.dist.earm
+EXTRA_DIST_FILES+=     NetBSD.dist.earm
 .endif
 EXTRA_DIST_FILES+=     NetBSD.dist.compat      # autogenerated
 .if defined(MKCOMPATX11) && ${MKCOMPATX11} != "no" && ${MKX11} != "no"
@@ -22,18 +22,18 @@
 .endif
 
 .if ${MKATF} != "no"
-EXTRA_DIST_FILES+=     ${.CURDIR}/NetBSD.dist.tests
+EXTRA_DIST_FILES+=     NetBSD.dist.tests
 .if defined(MKCOMPATTESTS) && ${MKCOMPATTESTS} != "no"
 EXTRA_DIST_FILES+=     NetBSD.dist.tests.compat
 .endif
 .endif
 
 .if ${MKDTRACE} != "no"
-EXTRA_DIST_FILES+=     ${.CURDIR}/NetBSD.dist.dtrace
+EXTRA_DIST_FILES+=     NetBSD.dist.dtrace
 .endif
 
 .if ${MKEXTSRC} != "no"
-EXTRA_DIST_FILES+=     ${.CURDIR}/NetBSD.dist.extsrc
+EXTRA_DIST_FILES+=     NetBSD.dist.extsrc
 .endif
 
 #
@@ -41,37 +41,30 @@
 # of the NetBSD.dist.tmp rule, but that needs to have no dependencies
 # so that it is re-run every time, yet it depends upon files existing.
 #
-.BEGIN: ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} 
+.BEGIN: NetBSD.dist.base ${EXTRA_DIST_FILES} 
 NetBSD.dist:   NetBSD.dist.tmp
        cmp -s NetBSD.dist.tmp NetBSD.dist || { \
                echo "Updating NetBSD.dist"; \
                mv NetBSD.dist.tmp NetBSD.dist; \
        }
-NetBSD.dist.tmp::
-       ${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \
-           ${.TARGET}
+NetBSD.dist.tmp: NetBSD.dist.base ${EXTRA_DIST_FILES}
+       ${TOOL_CAT} ${.ALLSRC} > ${.TARGET}
 
-NetBSD.dist.compat: ${.CURDIR}/NetBSD.dist.compat.in ${.CURDIR}/mkcompat.awk
-       ${MKCREATE}
-       ${TOOL_AWK} -f ${.CURDIR}/mkcompat.awk \
-           -v COMPATDIRS=${ARCHDIR_SUBDIR:T:Q} \
-               ${.CURDIR}/NetBSD.dist.compat.in \
-            > ${.TARGET}
-
-NetBSD.dist.xcompat: ${.CURDIR}/NetBSD.dist.xcompat.in ${.CURDIR}/mkcompat.awk
+NetBSD.dist.compat: NetBSD.dist.compat.in mkcompat.awk
        ${MKCREATE}
-       ${TOOL_AWK} -f ${.CURDIR}/mkcompat.awk \
-           -v COMPATDIRS=${ARCHDIR_SUBDIR:T:Q} \
-               ${.CURDIR}/NetBSD.dist.xcompat.in \
-            > ${.TARGET}
+       ${TOOL_AWK} -f ${.ALLSRC:M*.awk} -v COMPATDIRS=${ARCHDIR_SUBDIR:T:Q} \
+           ${.ALLSRC:M*.in} > ${.TARGET}
 
-NetBSD.dist.tests.compat: ${.CURDIR}/NetBSD.dist.tests \
-               ${.CURDIR}/mkcompattree.awk 
+NetBSD.dist.xcompat: NetBSD.dist.xcompat.in mkcompat.awk
        ${MKCREATE}
-       ${TOOL_AWK} -f ${.CURDIR}/mkcompattree.awk \
+       ${TOOL_AWK} -f ${.ALLSRC:M*.awk} -v COMPATDIRS=${ARCHDIR_SUBDIR:T:Q} \
+           ${.ALLSRC:M*.in} > ${.TARGET}
+
+NetBSD.dist.tests.compat: NetBSD.dist.tests mkcompattree.awk 
+       ${MKCREATE}
+       ${TOOL_AWK} -f ${.ALLSRC:M*.awk}/mkcompattree.awk \
            -v COMPATDIRS=${ARCHDIR_SUBDIR:T:Q} -v S="usr/tests" \
-               ${.CURDIR}/NetBSD.dist.tests \
-            > ${.TARGET}
+               ${.ALLSRC:M*.tests} > ${.TARGET}
 
 CONFIGFILES=   NetBSD.dist special
 FILESDIR=      /etc/mtree
@@ -89,8 +82,8 @@
 # /etc/mtree/NetBSD.dist content without duplicating logic from
 # the Makefile.
 #
-emit_dist_file:        ${EXTRA_DIST_FILES}
-       @cat ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES}
+emit_dist_file:        NetBSD.dist.base ${EXTRA_DIST_FILES}
+       @cat ${.ALLSRC}
 
 distrib-dirs: .PHONY check_DESTDIR NetBSD.dist
 .if !defined(DISTRIBUTION_DONE)                                                # {



Home | Main Index | Thread Index | Old Index