Fix test makefile for extensions
authorMarko Kreen <markokr@gmail.com>
Sun, 28 Oct 2012 21:30:32 +0000 (23:30 +0200)
committerMarko Kreen <markokr@gmail.com>
Mon, 29 Oct 2012 15:10:12 +0000 (17:10 +0200)
test/Makefile

index e99734349ec416ade8a27e4ca21cc73083166026..9f362897e1ff81a55418a0deede9feaba6c44f0f 100644 (file)
@@ -1,8 +1,10 @@
 
+AM_FEATURES = libusual
+
 SUBLOC = test
 DIST_SUBDIRS = attregex
 
-USUAL_DIR = $(top_srcdir)
+USUAL_DIR = $(abs_top_srcdir)
 
 regtest_system_SOURCES = \
        test_string.c test_crypto.c test_aatree.c test_heap.c \
@@ -14,7 +16,7 @@ regtest_system_SOURCES = \
        test_socket.c test_getopt.c test_ctype.c \
        test_common.h tinytest.h tinytest_macros.h
 
-regtest_compat_SOURCES = $(regtest_system_SOURCES)
+regtest_compat_SOURCES := $(regtest_system_SOURCES)
 nodist_regtest_compat_SOURCES = test_config.h
 
 regtest_compat_EMBED_LIBUSUAL = 1
@@ -23,8 +25,8 @@ regtest_system_EMBED_LIBUSUAL = 1
 regtest_system_LDADD = -lanl
 regtest_system_LDFLAGS = -pthread
 
-regtest_system_CPPFLAGS = -I$(USUAL_DIR) -I$(top_builddir) -I$(srcdir) -I$(builddir)
-regtest_compat_CPPFLAGS = $(regtest_system_CPPFLAGS) -DUSUAL_TEST_CONFIG
+regtest_system_CPPFLAGS = -I.. -I.
+regtest_compat_CPPFLAGS := $(regtest_system_CPPFLAGS) -DUSUAL_TEST_CONFIG
 regtest_compat_LDFLAGS = -pthread
 
 EXTRA_DIST = Makefile tinytest_demo.c force_compat.sed test_cfparser.ini
@@ -33,7 +35,7 @@ noinst_PROGRAMS = regtest_system regtest_compat
 
 include ../build.mk
 
-$(builddir)/test_config.h: $(srcdir)/force_compat.sed $(top_builddir)/usual/config.h
+test_config.h: force_compat.sed ../usual/config.h
        $(E) "  GEN-COMPAT" $@
        $(Q) sed -f $^ > $@