Moved utf8-locale.* to utf8 directory.
[gedcom-parse.git] / t / Makefile.am
index 2d88839cf327fa85a5cf9a48ca4ba23498309ba0..16854ff9333ae5ad0201de502582823a8a166608 100644 (file)
@@ -3,11 +3,53 @@
 # $Name$
 
 SUBDIRS=input
+INCLUDES = -DPKGDATADIR=\"$(pkgdatadir)\" -I $(srcdir)/../include \
+           -I $(srcdir)/../utf8
+CFLAGS   = -g -O2
 
-TEST_SCRIPT=test_script
+noinst_PROGRAMS = testgedcom pathtest gomtest @EXTRA_PROGS@
+EXTRA_PROGRAMS  = gomtest_static
+
+testgedcom_SOURCES = standalone.c
+testgedcom_LDFLAGS = -L ../gedcom/.libs -lgedcom
+testgedcom_LDADD  = @INTLLIBS@ ../utf8/libutf8.la
+
+pathtest_SOURCES = pathtest.c
+pathtest_LDFLAGS = -L ../gedcom/.libs -lgedcom
+
+gomtest_SOURCES = gomtest.c
+gomtest_LDFLAGS = -L ../gedcom/.libs -L ../gom/.libs -lgedcom_gom -lgedcom
+
+gomtest_static_SOURCES = gomtest.c
+gomtest_static_LDADD = ../gedcom/.libs/libgedcom.a ../gom/.libs/libgedcom_gom.a
+DMALLOC_LOG = dmalloc.log
+
+TEST_SCRIPT=test_script test_gom
 TESTS := $(wildcard $(srcdir)/*.test)
 
 EXTRA_DIST=$(TEST_SCRIPT) $(TESTS)
 
 all-local:
-       rm -f ../testgedcom.out
+       @rm -f testgedcom.out $(DMALLOC_LOG)
+
+check-% :      %.test all-local
+       @srcdir=$(srcdir); export srcdir; \
+        if $(TESTS_ENVIRONMENT) ./$<; then \
+         echo "Test succeeded"; \
+       else \
+         echo "Test failed"; \
+       fi
+
+check-dmalloc-%:       %.test all-local
+       @if [ "@EXTRA_PROGS@" = "" ]; then \
+         echo "Please run './configure --with-dmalloc' first"; \
+         exit; \
+       fi; \
+       srcdir=$(srcdir); export srcdir; \
+       GOM_DMALLOC_TEST=$(DMALLOC_LOG); export GOM_DMALLOC_TEST; \
+        if $(TESTS_ENVIRONMENT) ./$<; then \
+         echo "Test succeeded"; \
+       else \
+         echo "Test failed"; \
+       fi
+