testsuite: Fix cross compiling of orcc test
authorDavid Schleef <ds@schleef.org>
Mon, 30 Aug 2010 01:01:58 +0000 (18:01 -0700)
committerDavid Schleef <ds@schleef.org>
Mon, 30 Aug 2010 01:13:44 +0000 (18:13 -0700)
testsuite/Makefile.am
testsuite/orcc/Makefile.am

index d6beddc..e6fc972 100644 (file)
@@ -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-*
index 4d339f7..41134fc 100644 (file)
@@ -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 $<