# Generated automatically from Makefile.in by configure.
TOP = ../..
srcdir = .

include $(TOP)/config/Makedefs

T = TESTS
LCLOBBER = theta_generated/* \
	$(T).externs.h $(T).externs.h~ \
	$(T)_types.data $(T).data $(T).data~ \
	$(T)_types.pth $(T).pth $(T).pth~ \
	$(T).th $(T).c

THETA_SOURCES = \
	$(srcdir)/bool_tests.th \
	$(srcdir)/char_tests.th \
	$(srcdir)/int_tests.th \
	$(srcdir)/null_tests.th \
	$(srcdir)/string_tests.th \
	$(srcdir)/param_test.th

CCINCS = -I. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. -I$(TOP) \
	 -Itheta_generated -I$(srcdir)/../types

CCCINCS = $(CCINCS)

CCSRCS = TESTS.c

TESTS.th: $(THETA_SOURCES)
	rm -f TESTS.th
	cat $(THETA_SOURCES) > TESTS.th 

stamp:  TESTS.th
	@if [ ! -d theta_generated ]; then mkdir theta_generated; fi
	cd theta_generated; rm -f *; theta -c ../TESTS.th
	$(TOPSRC)/bin/th_link theta_generated 
	$(TOPSRC)/bin/process_user_types TESTS
	touch stamp

TESTS.c: stamp
	rm -f TESTS.c
	cat theta_generated/*.c-th > TESTS.c
	$(TOPSRC)/bin/fix_includes TESTS.c

tests-th.a: TESTS.th

init-src:
	@if [ -d CVS ]; then mv CVS .CVS; fi
	tar cf - -C $(srcdir)/../../initdir/tests-th . \
	|(tar xf - ; $(TOPSRC)/bin/th_link theta_generated;);
	@if [ -d .CVS ]; then /bin/rm -rf CVS ; mv .CVS CVS; fi
	@if [ -d theta_generated/CVS ]; then /bin/rm -rf theta_generated/CVS; fi

THISLIB = tests-th.a
CONDITIONAL_BUILD = TESTS_TH
include $(TOPSRC)/config/libdefs
include $(TOPSRC)/config/libinitdefs
