diff options
Diffstat (limited to 'mk-2nd.awk')
-rw-r--r-- | mk-2nd.awk | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,6 +1,6 @@ -# $Id: mk-2nd.awk,v 1.20 2020/02/02 23:34:34 tom Exp $ +# $Id: mk-2nd.awk,v 1.23 2021/06/17 21:20:30 tom Exp $ ############################################################################## -# Copyright 2020 Thomas E. Dickey # +# Copyright 2020,2021 Thomas E. Dickey # # Copyright 1998-2004,2005 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -53,6 +53,13 @@ # # Fields in src/modules past $3 are dependencies # +function in_subset(value) { + value = " " value " "; + check = subset; + gsub("[+]", " ", check); + check = " " check " "; + return index(check,value); + } BEGIN { found = 0 using = 0 @@ -61,14 +68,14 @@ BEGIN { using = 0 if (subset == "none") { using = 1 - } else if (index(subset,$2) > 0) { + } else if (in_subset($2) > 0) { if (using == 0) { if (found == 0) { print "" print "# generated by mk-2nd.awk" printf "# model: %s\n", model printf "# MODEL: %s\n", MODEL - printf "# echo: %s\n", echo + printf "# echo: %s\n", echo printf "# subset: %s\n", subset printf "# crenames: %s\n", crenames printf "# cxxrenames: %s\n", cxxrenames |