Update with current status
[gnash.git] / testsuite / misc-haxe.all / Makefile.am
blob140c9b7c58ebc57ff8a846be73fae0d12581ad6b
1 ## Process this fill with automake to generate Makefile.in
2
3 #   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
4 #   Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 AUTOMAKE_OPTIONS = dejagnu
22 SUBDIRS = classes.all
24 # These will get executed and parsed for test output
25 SANE_ASTESTS = \
26         $(NULL)
28 # These ones are the ones for which consistency check fail 
29 BOGUS_ASTESTS = \
30         Hello.hx \
31         AddChild.hx \
32         $(NULL)
34 ASTESTS = $(SANE_ASTESTS) $(BOGUS_ASTESTS)
36 EXTRA_DIST = $(ASTESTS) Dejagnu.hx check.as
38 HAXE_FLAGS = -swf-version 9 -cp $(HAXE_CLASSPATH) -cp $(srcdir) 
39 # hopefully preprocessor is builtin in this case
40 HAXE_CPP = $(CPP) -x c -P -I$(srcdir)
42 SANE_ASTESTS_OUT = $(SANE_ASTESTS:.hx=.swf)
43 BOGUS_ASTESTS_OUT = $(BOGUS_ASTESTS:.hx=.swf)
44 ASTESTS_OUT = $(SANE_ASTESTS_OUT) $(BOGUS_ASTESTS_OUT)
46 $(ASTESTS_OUT) : Dejagnu.hx check.as
49 TEST_DRIVERS = ../simple.exp
51 TEST_CASES = \
52         $(NULL)
54 TEST_CASES += \
55         sanetests-runner \
56         bogustests-runner
58 sanetests-runner: $(srcdir)/../generic-testrunner.sh $(SANE_ASTESTS_OUT) Makefile
59         sh $(srcdir)/../generic-testrunner.sh -c __END_OF_TEST__ -r 50 $(top_builddir) $(SANE_ASTESTS_OUT) > $@
60         chmod 755 $@
62 bogustests-runner: $(srcdir)/../generic-testrunner.sh $(BOGUS_ASTESTS_OUT) Makefile
63         sh $(srcdir)/../generic-testrunner.sh -C __END_OF_TEST__ -r 50 $(top_builddir) $(BOGUS_ASTESTS_OUT) > $@
64         chmod 755 $@
66 .hx.swf: 
67         $(HAXE_CPP) $< > $(@:%.swf=PP_%.hx) 
68         $(HAXE) $(HAXE_FLAGS) -swf $@ -main $(@:%.swf=PP_%.hx)
70 CLEANFILES =  \
71         gnash-dbg.log \
72         site.exp.bak \
73         *-runner \
74         testrun.* \
75         *.swf \
76         PP_*.hx \
77         *_testrunner \
78         *_Runner
80 check-DEJAGNU: site-update $(TEST_CASES)
81         @runtest=$(RUNTEST); \
82         if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
83             GNASH_GC_TRIGGER_THRESHOLD=0  GNASHRC=../gnashrc $$runtest $(RUNTESTFLAGS) $(TEST_DRIVERS); true; \
84         else \
85           echo "WARNING: could not find \`runtest'" 1>&2; \
86           for i in "$(TEST_CASES)"; do \
87             GNASH_GC_TRIGGER_THRESHOLD=0  GNASHRC=../gnashrc $(SHELL) $$i; \
88           done; \
89         fi
91 site-update: site.exp
92         @rm -fr site.exp.bak
93         @cp site.exp site.exp.bak
94         @sed -e '/testcases/d' site.exp.bak > site.exp
95         @echo "# This is a list of the pre-compiled testcases" >> site.exp
96         @echo "set testcases \"$(TEST_CASES)\"" >> site.exp