Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/mtree Rework this to auto generate the compat directorie...
details: https://anonhg.NetBSD.org/src/rev/eaf7d9821fc1
branches: trunk
changeset: 338962:eaf7d9821fc1
user: matt <matt%NetBSD.org@localhost>
date: Fri Jun 19 18:16:06 2015 +0000
description:
Rework this to auto generate the compat directories using a template
and the information from compat/archdirs.mk. Also add suport MKCOMPATTESTS
and process the NetBSD.dist.tests to generate appropriate compat directories.
diffstat:
etc/mtree/Makefile | 26 ++++++++++++++++++++++++--
etc/mtree/NetBSD.dist.aarch64 | 35 +----------------------------------
etc/mtree/NetBSD.dist.compat.in | 13 +++++++++++++
etc/mtree/NetBSD.dist.earm | 13 +------------
etc/mtree/NetBSD.dist.mips64eb | 24 +-----------------------
etc/mtree/NetBSD.dist.mips64el | 24 +-----------------------
etc/mtree/NetBSD.dist.powerpc64 | 13 +------------
etc/mtree/NetBSD.dist.riscv64 | 13 +------------
etc/mtree/NetBSD.dist.sparc64 | 13 +------------
etc/mtree/NetBSD.dist.x86_64 | 13 +------------
etc/mtree/mkcompat.awk | 17 +++++++++++++++++
etc/mtree/mkcompattree.awk | 32 ++++++++++++++++++++++++++++++++
12 files changed, 94 insertions(+), 142 deletions(-)
diffs (truncated from 344 to 300 lines):
diff -r 63fb64f6060c -r eaf7d9821fc1 etc/mtree/Makefile
--- a/etc/mtree/Makefile Fri Jun 19 18:13:52 2015 +0000
+++ b/etc/mtree/Makefile Fri Jun 19 18:16:06 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.24 2013/10/16 14:50:43 christos Exp $
+# $NetBSD: Makefile,v 1.25 2015/06/19 18:16:06 matt Exp $
.include <bsd.own.mk>
@@ -13,15 +13,20 @@
# XXX these are only used by compat currently, but they could be used
# by something else; this may need to be fixed properly in the future.
.if ${MKCOMPAT} != "no"
+.include "${NETBSDSRCDIR}/compat/archdirs.mk"
.if exists(NetBSD.dist.${MACHINE_ARCH})
EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.${MACHINE_ARCH}
.elif !empty(MACHINE_ARCH:Mearm*)
EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.earm
.endif
+EXTRA_DIST_FILES+= NetBSD.dist.compat # autogenerated
.endif
.if ${MKATF} != "no"
EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.tests
+.if ${MKCOMPATTESTS} != "no"
+EXTRA_DIST_FILES+= NetBSD.dist.tests.compat
+.endif
.endif
.if ${MKEXTSRC} != "no"
@@ -33,10 +38,25 @@
echo "Updating NetBSD.dist"; \
mv NetBSD.dist.tmp NetBSD.dist; \
}
-NetBSD.dist.tmp::
+NetBSD.dist.tmp:: ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES}
${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \
${.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.tests.compat: ${.CURDIR}/NetBSD.dist.tests \
+ ${.CURDIR}/mkcompattree.awk
+ ${MKCREATE}
+ ${TOOL_AWK} -f ${.CURDIR}/mkcompattree.awk \
+ -v COMPATDIRS=${ARCHDIR_SUBDIR:T:Q} -v S="usr/tests" \
+ ${.CURDIR}/NetBSD.dist.tests \
+ > ${.TARGET}
+
CONFIGFILES= NetBSD.dist special
FILESDIR= /etc/mtree
@@ -74,5 +94,7 @@
.endif # DISTRIBUTION_DONE # }
CLEANFILES+= NetBSD.dist NetBSD.dist.tmp
+CLEANFILES+= NetBSD.dist.compat
+CLEANFILES+= NetBSD.dist.tests.compat
.include <bsd.prog.mk>
diff -r 63fb64f6060c -r eaf7d9821fc1 etc/mtree/NetBSD.dist.aarch64
--- a/etc/mtree/NetBSD.dist.aarch64 Fri Jun 19 18:13:52 2015 +0000
+++ b/etc/mtree/NetBSD.dist.aarch64 Fri Jun 19 18:16:06 2015 +0000
@@ -1,35 +1,2 @@
-# $NetBSD: NetBSD.dist.aarch64,v 1.2 2014/08/10 23:31:41 matt Exp $
+# $NetBSD: NetBSD.dist.aarch64,v 1.3 2015/06/19 18:16:06 matt Exp $
-./lib/eabi
-./lib/eabi/npf
-./lib/eabihf
-./lib/eabihf/npf
-./lib/oabi
-./lib/oabi/npf
-./usr/lib/eabi
-./usr/lib/eabi/i18n
-./usr/lib/eabi/lua
-./usr/lib/eabi/lua/5.3
-./usr/lib/eabi/security
-./usr/lib/eabihf
-./usr/lib/eabihf/i18n
-./usr/lib/eabihf/lua
-./usr/lib/eabihf/lua/5.3
-./usr/lib/eabihf/security
-./usr/lib/oabi
-./usr/lib/oabi/i18n
-./usr/lib/oabi/lua
-./usr/lib/oabi/lua/5.3
-./usr/lib/oabi/security
-./usr/libdata/debug/lib/eabi
-./usr/libdata/debug/lib/eabi/npf
-./usr/libdata/debug/lib/eabihf
-./usr/libdata/debug/lib/eabihf/npf
-./usr/libdata/debug/lib/oabi
-./usr/libdata/debug/lib/oabi/npf
-./usr/libdata/debug/usr/lib/eabi
-./usr/libdata/debug/usr/lib/eabi/i18n
-./usr/libdata/debug/usr/lib/eabihf
-./usr/libdata/debug/usr/lib/eabihf/i18n
-./usr/libdata/debug/usr/lib/oabi
-./usr/libdata/debug/usr/lib/oabi/i18n
diff -r 63fb64f6060c -r eaf7d9821fc1 etc/mtree/NetBSD.dist.compat.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/mtree/NetBSD.dist.compat.in Fri Jun 19 18:16:06 2015 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: NetBSD.dist.compat.in,v 1.1 2015/06/19 18:16:06 matt Exp $
+
+./lib/@ARCH_SUBDIR@
+./lib/@ARCH_SUBDIR@/npf
+./usr/lib/@ARCH_SUBDIR@
+./usr/lib/@ARCH_SUBDIR@/i18n
+./usr/lib/@ARCH_SUBDIR@/lua
+./usr/lib/@ARCH_SUBDIR@/lua/5.3
+./usr/lib/@ARCH_SUBDIR@/security
+./usr/libdata/debug/lib/@ARCH_SUBDIR@
+./usr/libdata/debug/lib/@ARCH_SUBDIR@/npf
+./usr/libdata/debug/usr/lib/@ARCH_SUBDIR@
+./usr/libdata/debug/usr/lib/@ARCH_SUBDIR@/i18n
diff -r 63fb64f6060c -r eaf7d9821fc1 etc/mtree/NetBSD.dist.earm
--- a/etc/mtree/NetBSD.dist.earm Fri Jun 19 18:13:52 2015 +0000
+++ b/etc/mtree/NetBSD.dist.earm Fri Jun 19 18:16:06 2015 +0000
@@ -1,13 +1,2 @@
-# $NetBSD: NetBSD.dist.earm,v 1.2 2014/07/19 18:38:33 lneto Exp $
+# $NetBSD: NetBSD.dist.earm,v 1.3 2015/06/19 18:16:06 matt Exp $
-./lib/oabi
-./lib/oabi/npf
-./usr/lib/oabi
-./usr/lib/oabi/i18n
-./usr/lib/oabi/lua
-./usr/lib/oabi/lua/5.3
-./usr/lib/oabi/security
-./usr/libdata/debug/lib/oabi
-./usr/libdata/debug/lib/oabi/npf
-./usr/libdata/debug/usr/lib/oabi
-./usr/libdata/debug/usr/lib/oabi/i18n
diff -r 63fb64f6060c -r eaf7d9821fc1 etc/mtree/NetBSD.dist.mips64eb
--- a/etc/mtree/NetBSD.dist.mips64eb Fri Jun 19 18:13:52 2015 +0000
+++ b/etc/mtree/NetBSD.dist.mips64eb Fri Jun 19 18:16:06 2015 +0000
@@ -1,27 +1,5 @@
-# $NetBSD: NetBSD.dist.mips64eb,v 1.8 2014/07/19 18:38:33 lneto Exp $
+# $NetBSD: NetBSD.dist.mips64eb,v 1.9 2015/06/19 18:16:06 matt Exp $
-./lib/o32
-./lib/o32/npf
-./lib/64
-./lib/64/npf
./usr/include/g++/bits/mips64
./usr/include/g++/bits/mips32
./usr/include/g++/bits/mipso32
-./usr/lib/o32
-./usr/lib/o32/i18n
-./usr/lib/o32/lua
-./usr/lib/o32/lua/5.3
-./usr/lib/o32/security
-./usr/lib/64
-./usr/lib/64/i18n
-./usr/lib/64/lua
-./usr/lib/64/lua/5.3
-./usr/lib/64/security
-./usr/libdata/debug/lib/o32
-./usr/libdata/debug/lib/o32/npf
-./usr/libdata/debug/lib/64
-./usr/libdata/debug/lib/64/npf
-./usr/libdata/debug/usr/lib/o32
-./usr/libdata/debug/usr/lib/o32/i18n
-./usr/libdata/debug/usr/lib/64
-./usr/libdata/debug/usr/lib/64/i18n
diff -r 63fb64f6060c -r eaf7d9821fc1 etc/mtree/NetBSD.dist.mips64el
--- a/etc/mtree/NetBSD.dist.mips64el Fri Jun 19 18:13:52 2015 +0000
+++ b/etc/mtree/NetBSD.dist.mips64el Fri Jun 19 18:16:06 2015 +0000
@@ -1,27 +1,5 @@
-# $NetBSD: NetBSD.dist.mips64el,v 1.9 2014/07/19 18:38:33 lneto Exp $
+# $NetBSD: NetBSD.dist.mips64el,v 1.10 2015/06/19 18:16:06 matt Exp $
-./lib/o32
-./lib/o32/npf
-./lib/64
-./lib/64/npf
./usr/include/g++/bits/mips64
./usr/include/g++/bits/mips32
./usr/include/g++/bits/mipso32
-./usr/lib/o32
-./usr/lib/o32/i18n
-./usr/lib/o32/lua
-./usr/lib/o32/lua/5.3
-./usr/lib/o32/security
-./usr/lib/64
-./usr/lib/64/i18n
-./usr/lib/64/lua
-./usr/lib/64/lua/5.3
-./usr/lib/64/security
-./usr/libdata/debug/lib/o32
-./usr/libdata/debug/lib/o32/npf
-./usr/libdata/debug/lib/64
-./usr/libdata/debug/lib/64/npf
-./usr/libdata/debug/usr/lib/o32
-./usr/libdata/debug/usr/lib/o32/i18n
-./usr/libdata/debug/usr/lib/64
-./usr/libdata/debug/usr/lib/64/i18n
diff -r 63fb64f6060c -r eaf7d9821fc1 etc/mtree/NetBSD.dist.powerpc64
--- a/etc/mtree/NetBSD.dist.powerpc64 Fri Jun 19 18:13:52 2015 +0000
+++ b/etc/mtree/NetBSD.dist.powerpc64 Fri Jun 19 18:16:06 2015 +0000
@@ -1,15 +1,4 @@
-# $NetBSD: NetBSD.dist.powerpc64,v 1.2 2014/07/19 18:38:33 lneto Exp $
+# $NetBSD: NetBSD.dist.powerpc64,v 1.3 2015/06/19 18:16:06 matt Exp $
-./lib/powerpc
-./lib/powerpc/npf
./usr/include/g++/bits/powerpc
./usr/include/g++/bits/powerpc64
-./usr/lib/powerpc
-./usr/lib/powerpc/i18n
-./usr/lib/powerpc/lua
-./usr/lib/powerpc/lua/5.3
-./usr/lib/powerpc/security
-./usr/libdata/debug/lib/powerpc
-./usr/libdata/debug/lib/powerpc/npf
-./usr/libdata/debug/usr/lib/powerpc
-./usr/libdata/debug/usr/lib/powerpc/i18n
diff -r 63fb64f6060c -r eaf7d9821fc1 etc/mtree/NetBSD.dist.riscv64
--- a/etc/mtree/NetBSD.dist.riscv64 Fri Jun 19 18:13:52 2015 +0000
+++ b/etc/mtree/NetBSD.dist.riscv64 Fri Jun 19 18:16:06 2015 +0000
@@ -1,15 +1,4 @@
-# $NetBSD: NetBSD.dist.riscv64,v 1.1 2014/09/19 17:36:24 matt Exp $
+# $NetBSD: NetBSD.dist.riscv64,v 1.2 2015/06/19 18:16:06 matt Exp $
-./lib/rv32
-./lib/rv32/npf
./usr/include/g++/bits/riscv32
./usr/include/g++/bits/riscv64
-./usr/lib/rv32
-./usr/lib/rv32/i18n
-./usr/lib/rv32/lua
-./usr/lib/rv32/lua/5.3
-./usr/lib/rv32/security
-./usr/libdata/debug/lib/rv32
-./usr/libdata/debug/lib/rv32/npf
-./usr/libdata/debug/usr/lib/rv32
-./usr/libdata/debug/usr/lib/rv32/i18n
diff -r 63fb64f6060c -r eaf7d9821fc1 etc/mtree/NetBSD.dist.sparc64
--- a/etc/mtree/NetBSD.dist.sparc64 Fri Jun 19 18:13:52 2015 +0000
+++ b/etc/mtree/NetBSD.dist.sparc64 Fri Jun 19 18:16:06 2015 +0000
@@ -1,15 +1,4 @@
-# $NetBSD: NetBSD.dist.sparc64,v 1.9 2014/07/19 18:38:33 lneto Exp $
+# $NetBSD: NetBSD.dist.sparc64,v 1.10 2015/06/19 18:16:06 matt Exp $
-./lib/sparc
-./lib/sparc/npf
./usr/include/g++/bits/sparc
./usr/include/g++/bits/sparc64
-./usr/lib/sparc
-./usr/lib/sparc/i18n
-./usr/lib/sparc/lua
-./usr/lib/sparc/lua/5.3
-./usr/lib/sparc/security
-./usr/libdata/debug/lib/sparc
-./usr/libdata/debug/lib/sparc/npf
-./usr/libdata/debug/usr/lib/sparc
-./usr/libdata/debug/usr/lib/sparc/i18n
diff -r 63fb64f6060c -r eaf7d9821fc1 etc/mtree/NetBSD.dist.x86_64
--- a/etc/mtree/NetBSD.dist.x86_64 Fri Jun 19 18:13:52 2015 +0000
+++ b/etc/mtree/NetBSD.dist.x86_64 Fri Jun 19 18:16:06 2015 +0000
@@ -1,18 +1,7 @@
-# $NetBSD: NetBSD.dist.x86_64,v 1.9 2014/12/13 18:55:18 christos Exp $
+# $NetBSD: NetBSD.dist.x86_64,v 1.10 2015/06/19 18:16:06 matt Exp $
-./lib/i386
-./lib/i386/npf
./usr/include/amd64
./usr/include/g++/bits/i386
./usr/include/g++/bits/x86_64
./usr/include/i386
./usr/include/x86
-./usr/lib/i386
-./usr/lib/i386/i18n
-./usr/lib/i386/lua
-./usr/lib/i386/lua/5.3
-./usr/lib/i386/security
-./usr/libdata/debug/lib/i386
-./usr/libdata/debug/lib/i386/npf
-./usr/libdata/debug/usr/lib/i386
-./usr/libdata/debug/usr/lib/i386/i18n
diff -r 63fb64f6060c -r eaf7d9821fc1 etc/mtree/mkcompat.awk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/mtree/mkcompat.awk Fri Jun 19 18:16:06 2015 +0000
@@ -0,0 +1,17 @@
+BEGIN { n = 1 }
+/^#/ { print }
+{
+ if (NF > 0 && substr($0, 1, 1) != "#") {
+ files[n++] = $0;
+ }
+ next;
+}
+END {
Home |
Main Index |
Thread Index |
Old Index