]> git.ozlabs.org Git - petitboot/commitdiff
test/parser: Remove gawk specifics
authorGeoff Levand <geoff@infradead.org>
Wed, 29 May 2013 20:42:16 +0000 (13:42 -0700)
committerGeoff Levand <geoff@infradead.org>
Wed, 29 May 2013 20:42:16 +0000 (13:42 -0700)
Remove the GNU awk specifics to allow the use of a standard
awk program.  Fixes build errors on older distros.

Signed-off-by: Geoff Levand <geoff@infradead.org>
test/parser/Makefile.am
test/parser/extract-config.awk

index af4fbd673221f4524e494b23e1ea592d996a2a76..84ff2e1906263f4a4294eb4ec9dc778b79b82878 100644 (file)
@@ -66,7 +66,7 @@ $(check_PROGRAMS): LDADD += $@.embedded-config.o
 extract_config = $(srcdir)/extract-config.awk
 
 %.embedded-config.c: %.c $(extract_config)
-       gawk --file=$(extract_config) $^ > $@
+       $(AWK) -f $(extract_config) $< > $@
 
 EXTRA_DIST = $(check_DATA) $(extract_config)
 
index e7a5b33e72bbf4d3b0767cff1a5c782661395233..9c858532282cfc3d2342ce2f89a5f4c5e5de2da4 100644 (file)
@@ -2,7 +2,7 @@ BEGIN {
        config=0
 }
 
-/^#if\s*0\s*\/\*\s*PARSER_EMBEDDED_CONFIG/ {
+/^#if[ \t]*0[ \t]*\/\*[ \t]*PARSER_EMBEDDED_CONFIG/ {
        config=1
        print "#include <stdlib.h>"
        print "const char __embedded_config[] = "