diff options
author | Geoff Levand <geoff@infradead.org> | 2013-06-30 13:31:32 -0700 |
---|---|---|
committer | Geoff Levand <geoff@infradead.org> | 2013-06-30 13:31:32 -0700 |
commit | 203254ec7ca2352e898acc9ac5c971bcbf630720 (patch) | |
tree | 642076cf4fc9196f034faf7d76c775df35c85d15 /test/parser/Makefile.am | |
parent | 25040e7122e3b2b5c9f5aa60d2f98db3566a03fe (diff) | |
download | talos-petitboot-203254ec7ca2352e898acc9ac5c971bcbf630720.tar.gz talos-petitboot-203254ec7ca2352e898acc9ac5c971bcbf630720.zip |
test/parser: Cleanup Makefile.am
General cleanup of Makefile.am. This cleanup should retain the same
makefile behavior.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'test/parser/Makefile.am')
-rw-r--r-- | test/parser/Makefile.am | 64 |
1 files changed, 34 insertions, 30 deletions
diff --git a/test/parser/Makefile.am b/test/parser/Makefile.am index b93bd31..e5c32cf 100644 --- a/test/parser/Makefile.am +++ b/test/parser/Makefile.am @@ -21,10 +21,12 @@ AM_CPPFLAGS = \ -DTEST_CONF_BASE='"$(srcdir)/data"' \ -DDEBUG -DPETITBOOT_TEST - AM_CFLAGS = -O0 -ggdb -Wall -Wextra -Werror -TESTS = test-null \ +LDADD = $(top_builddir)/lib/libpbcore.la libtest.o + +TESTS = \ + test-null \ test-grub2-single \ test-grub2-multiple-resolve \ test-grub2-f18-ppc64 \ @@ -34,43 +36,45 @@ TESTS = test-null \ test-yaboot-external \ test-yaboot-rh8-ppc64 -check_PROGRAMS = $(TESTS) -check_LIBRARIES = $(test_libs) -check_DATA = data/grub2-f18-ppc64.conf \ - data/grub2-ubuntu-13_04-x86.conf \ - data/yaboot-rh8-ppc64.conf +$(TESTS): %: %.embedded-config.o +$(TESTS): LDADD += $@.embedded-config.o -common_libs = $(top_builddir)/lib/libpbcore.la -test_libs = libtest.o +extract_config = $(srcdir)/extract-config.awk -libtest.o: $(libtest_o_OBJECTS) - $(LD) -o $@ -r $^ +%.embedded-config.c: %.c $(extract_config) + $(AWK) -f $(extract_config) $< > $@ # objects under test -parser_test_objs = $(top_srcdir)/discover/yaboot-parser.c \ - $(top_srcdir)/discover/kboot-parser.c \ - $(top_srcdir)/discover/grub2-parser.c \ - $(top_srcdir)/discover/resource.c \ - $(top_srcdir)/discover/paths.c \ - $(top_srcdir)/discover/device-handler.c \ - $(top_srcdir)/discover/parser-conf.c - +parser_objs = \ + $(top_srcdir)/discover/yaboot-parser.c \ + $(top_srcdir)/discover/kboot-parser.c \ + $(top_srcdir)/discover/grub2-parser.c \ + $(top_srcdir)/discover/resource.c \ + $(top_srcdir)/discover/paths.c \ + $(top_srcdir)/discover/device-handler.c \ + $(top_srcdir)/discover/parser-conf.c + +libtest_o_SOURCES = \ + main.c \ + utils.c \ + handler.c \ + parser-test.h \ + $(parser_objs) -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 +libtest.o: $(libtest_o_OBJECTS) + $(LD) -o $@ -r $^ -extract_config = $(srcdir)/extract-config.awk +check_PROGRAMS = $(TESTS) +check_LIBRARIES = libtest.o -%.embedded-config.c: %.c $(extract_config) - $(AWK) -f $(extract_config) $< > $@ +check_DATA = \ + data/grub2-f18-ppc64.conf \ + data/grub2-ubuntu-13_04-x86.conf \ + data/yaboot-rh8-ppc64.conf EXTRA_DIST = $(check_DATA) $(extract_config) -CLEANFILES = $(foreach f, $(check_PROGRAMS), \ - $(f).embedded-config.c $(f).embedded-config.o) +CLEANFILES = \ + $(foreach f, $(TESTS), $(f).embedded-config.c $(f).embedded-config.o) MAINTAINERCLEANFILES = Makefile.in |