1## Process this fill with automake to generate Makefile.in
2#
3# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
19AUTOMAKE_OPTIONS = dejagnu
20
21EXTRA_DIST = DejaGnu.hx
22
23TEST_DRIVERS = classes.exp
24
25# These get there values from the Makefile fragments. Each fragment
26# appends to these.
27check_SCRIPTS =
28HAXE_FLAGS = -cp $(srcdir)
29
30# These classes are in the flash namespace
31include $(srcdir)/accessibility/accessibility.am
32include $(srcdir)/display/display.am
33include $(srcdir)/errors/errors.am
34include $(srcdir)/events/events.am
35include $(srcdir)/external/external.am
36include $(srcdir)/geom/geom.am
37include $(srcdir)/media/media.am
38include $(srcdir)/net/net.am
39include $(srcdir)/printing/printing.am
40include $(srcdir)/system/system.am
41include $(srcdir)/text/text.am
42include $(srcdir)/ui/ui.am
43include $(srcdir)/utils/utils.am
44include $(srcdir)/xml/xml.am
45
46#/usr/bin/haxe -swf-version 9 -cp /home/rob/projects/gnu/gnash-bzr/avm2/testsuite/as3/classes.all -cp /home/rob/projects/gnu/gnash-bzr/avm2/testsuite/as3/classes.all/media -swf Sound_as3.swf -main Sound_as3.hx
47SUFFIXES = hx swf
48
49# build multiple output formats from the same test case. exit with failure if
50# the test case doesn't compile for v9, it's a test cases bug. Not all classes
51# support all versions, so in those cases justy ignore the errors as it's less
52# messy than testing for each test case to see if it supports that version.
53.hx.swf:
54	-@newname=`echo $(@F) | sed -e 's:_as:_asv9:'`; \
55	$(HAXE) -swf-version 9 $(HAXE_FLAGS) -swf $${newname} -main $(@F:%.swf=%.hx)
56	-@newname=`echo $(@F) | sed -e 's:_as:_asv8:'`; \
57	$(HAXE) -swf-version 8  $(HAXE_FLAGS) -swf $${newname} -main $(@F:%.swf=%.hx)
58	-@newname=`echo $(@F) | sed -e 's:_as:_asv7:'`; \
59	$(HAXE) -swf-version 7  $(HAXE_FLAGS) -swf $${newname} -main $(@F:%.swf=%.hx)
60	-@newname=`echo $(@F) | sed -e 's:_as:_asv6:'`; \
61	$(HAXE) -swf-version 6  $(HAXE_FLAGS) -swf $${newname} -main $(@F:%.swf=%.hx)
62
63CLEANFILES =  \
64	gnash-dbg.log \
65	site.exp.bak \
66	*-runner \
67	testrun.* \
68	*.swf \
69	PP_*.hx \
70	*_testrunner \
71	*_Runner
72
73check-DEJAGNU: site.exp $(check_SCRIPTS)
74	@runtest=$(RUNTEST); \
75	if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
76	    GNASH_GC_TRIGGER_THRESHOLD=0 GNASHRC=../../gnashrc $$runtest $(RUNTESTFLAGS) $(TEST_DRIVERS); true; \
77	else \
78	  echo "WARNING: could not find \`runtest'" 1>&2; \
79          for i in "$(TEST_CASES)"; do \
80	    GNASH_GC_TRIGGER_THRESHOLD=0 GNASHRC=../../gnashrc $(SHELL) $$i; \
81	  done; \
82	fi
83
84