From b13c02370aa6e85e42f70d5c28c84685c54a91c4 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sun, 29 Aug 2010 18:01:58 -0700 Subject: [PATCH] testsuite: Fix cross compiling of orcc test --- testsuite/Makefile.am | 3 +++ testsuite/orcc/Makefile.am | 25 ++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index d6beddc..e6fc972 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -1,6 +1,8 @@ DIST_SUBDIRS = orcc +SUBDIRS = orcc + TESTS_ENVIRONMENT = \ testfile="$(srcdir)/test.orc" @@ -20,6 +22,7 @@ noinst_PROGRAMS = $(TESTS) generate_xml_table generate_xml_table2 \ compile_opcodes_sys \ show_parse + EXTRA_DIST = test.orc CLEANFILES = temp-orc-test-* diff --git a/testsuite/orcc/Makefile.am b/testsuite/orcc/Makefile.am index 4d339f7..41134fc 100644 --- a/testsuite/orcc/Makefile.am +++ b/testsuite/orcc/Makefile.am @@ -1,19 +1,30 @@ +if CROSS_COMPILING +else +TESTS = orc_test test2 test3 -TESTS = orc_test +noinst_PROGRAMS = orc_test test2 test3 -noinst_PROGRAMS = orc_test +BUILT_SOURCES = testorc.c testorc.h orc_test.c +endif -BUILT_SOURCES = orc_test.c +test2_SOURCES = test2.c testorc.c + +test3_SOURCES = test3.c testorc.c +test3_CFLAGS = -DDISABLE_ORC AM_CFLAGS = $(ORC_CFLAGS) LIBS = $(ORC_LIBS) $(top_builddir)/orc-test/liborc-test-@ORC_MAJORMINOR@.la CLEANFILES = testorc.c testorc.h orc_test.c -orc_test.c: $(srcdir)/test.orc - $(top_builddir)/tools/orcc$(EXEEXT) --header -o testorc.h test.orc - $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o testorc.c test.orc - $(top_builddir)/tools/orcc$(EXEEXT) --test -o orc_test.c test.orc +testorc.h: $(srcdir)/../test.orc + $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --header -o testorc.h $< + +testorc.c: $(srcdir)/../test.orc + $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --implementation -o testorc.c $< + +orc_test.c: $(srcdir)/../test.orc + $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --test -o orc_test.c $< -- 2.7.4