From d6d20de8b7ff6da6f3d29c5edb0ae3070f997f30 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 6 Aug 2015 04:14:56 -0400 Subject: gawk: fix gensub usage The third arg can either be a string with "g" or "G", or it is a number. The empty string elicits a warning with newer versions like so: gawk: scripts/sysd-rules.awk:56: warning: gensub: third argument `' treated as 1 --- scripts/sysd-rules.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/sysd-rules.awk b/scripts/sysd-rules.awk index cc14334..cebc9d3 100644 --- a/scripts/sysd-rules.awk +++ b/scripts/sysd-rules.awk @@ -53,7 +53,7 @@ BEGIN { if (target_pattern == "%") { command_suffix = ""; } else { - prefix = gensub(/%/, "", "", target_pattern); + prefix = gensub(/%/, "", 1, target_pattern); command_suffix = " $(" prefix "CPPFLAGS)"; } target = "$(objpfx)" target_pattern o ":"; -- cgit v1.1