diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-05-15 13:11:43 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-05-16 11:53:34 +0800 |
commit | e0a7cb18a4237aa826e5e121ff17373814a1872d (patch) | |
tree | 110f5785d90478752e7a194c4f4ae4c76692f3b1 /test/parser/Makefile.am | |
parent | a5a787c5d170708be5d15ee9418520917653a104 (diff) | |
download | talos-petitboot-e0a7cb18a4237aa826e5e121ff17373814a1872d.tar.gz talos-petitboot-e0a7cb18a4237aa826e5e121ff17373814a1872d.zip |
test/parser: Allow raw config data in test .c files
Add a little post-processing script (extract-config.awk) to allow us to
put the config data directly into the test .c files, without having to
quote the C string.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'test/parser/Makefile.am')
-rw-r--r-- | test/parser/Makefile.am | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/parser/Makefile.am b/test/parser/Makefile.am index aa4591f..2e97fbe 100644 --- a/test/parser/Makefile.am +++ b/test/parser/Makefile.am @@ -47,5 +47,15 @@ LDADD = $(common_libs) $(test_libs) libtest_o_SOURCES = utils.c parser-test.h handler.c main.c $(parser_test_objs) +$(check_PROGRAMS): %: %.embedded-config.o +$(check_PROGRAMS): LDADD += $@.embedded-config.o -EXTRA_DIST = $(check_DATA) +extract_config = $(srcdir)/extract-config.awk + +%.embedded-config.c: %.c $(extract_config) + gawk --file=$(extract_config) $^ > $@ + +EXTRA_DIST = $(check_DATA) $(extract_config) + +CLEANFILES = $(foreach f, $(check_PROGRAMS), \ + $(f).embedded-config.c $(f).embedded-config.o) |