Source-Changes-HG archive

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

[src/trunk]: src/distrib/sets Rework a little. test MKCOMPATMODULES for KMOD...



details:   https://anonhg.NetBSD.org/src/rev/b8e50e9fb29a
branches:  trunk
changeset: 809156:b8e50e9fb29a
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jun 22 07:07:10 2015 +0000

description:
Rework a little.  test MKCOMPATMODULES for KMOD entry autogeneration.

diffstat:

 distrib/sets/sets.subr |  34 +++++++++++++++++++---------------
 1 files changed, 19 insertions(+), 15 deletions(-)

diffs (59 lines):

diff -r aff0a552b536 -r b8e50e9fb29a distrib/sets/sets.subr
--- a/distrib/sets/sets.subr    Mon Jun 22 06:47:26 2015 +0000
+++ b/distrib/sets/sets.subr    Mon Jun 22 07:07:10 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: sets.subr,v 1.165 2015/06/22 05:59:59 matt Exp $
+#      $NetBSD: sets.subr,v 1.166 2015/06/22 07:07:10 matt Exp $
 #
 
 #
@@ -179,7 +179,7 @@
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-#      # $NetBSD: sets.subr,v 1.165 2015/06/22 05:59:59 matt Exp $
+#      # $NetBSD: sets.subr,v 1.166 2015/06/22 07:07:10 matt Exp $
 #      .                       base-sys-root   [keyword[,...]]
 #      ./altroot               base-sys-root
 #      ./bin                   base-sys-root
@@ -309,23 +309,27 @@
                                sub(/^mk/, "", kw)
                                sub(/^have_/, "", kw)
                                sub(/^target_endianness/, "endian", kw)
-                               if (kw == "compat" && ENVIRON[nv] != "no") {
-                                       doingcompat = 1;
-                                       split("'"${COMPATARCHDIRS}"'", compatarchdirs, ",");
+                               if (nv != "HAVE_GCC" && nv != "HAVE_GDB" && ENVIRON[nv] != "no" && nv != "COMPATDIRS" && nv != "MODULEARCHDIRS")
                                        wanted[kw] = 1 
-                                       compatdirkeywords["compatdir"] = 1
-                                       compatfilekeywords["compatfile"] = 1
-                               } else if (kw == "compattests" && ENVIRON[nv] != "no") {
+                       }
+
+                       if (wanted["compat"]) {
+                               doingcompat = 1;
+                               split("'"${COMPATARCHDIRS}"'", compatarchdirs, ",");
+                               compatdirkeywords["compatdir"] = 1
+                               compatfilekeywords["compatfile"] = 1
+
+                               if (wanted["compattests"]) {
                                        doingcompattests = 1;
                                        compatdirkeywords["compattestdir"] = 1
                                        compatfilekeywords["compattestfile"] = 1
-                               } else if (kw == "kmod" && ENVIRON[nv] != "no") {
-                                       split("'"${KMODARCHDIRS}"'", kmodarchdirs, ",");
-                                       wanted[kw] = 1
-                                       kmodpat = "./stand/" ENVIRON["MACHINE"]
-                                       l_kmodpat = length(kmodpat)
-                               } else if (nv != "HAVE_GCC" && nv != "HAVE_GDB" && ENVIRON[nv] != "no" && nv != "COMPATDIRS" && nv != "MODULEARCHDIRS")
-                                       wanted[kw] = 1 
+                               }
+                       }
+
+                       if (wanted["kmod"] && wanted["compatmodules"]) {
+                               split("'"${KMODARCHDIRS}"'", kmodarchdirs, ",");
+                               kmodpat = "./stand/" ENVIRON["MACHINE"]
+                               l_kmodpat = length(kmodpat)
                        }
 
                        if ("'"${TOOLCHAIN_MISSING}"'" != "yes") {



Home | Main Index | Thread Index | Old Index