[gxml] * remodel test Makefile.am after libfolks



commit 3349101aa03cc549c5f482f38a40e76de2c686b2
Author: Richard Schwarting <aquarichy gmail com>
Date:   Wed Aug 22 03:34:11 2012 -0400

    * remodel test Makefile.am after libfolks

 test/Makefile.am |   60 ++++++++++++++++++++++++-----------------------------
 1 files changed, 27 insertions(+), 33 deletions(-)
---
diff --git a/test/Makefile.am b/test/Makefile.am
index ebd2023..47b1b53 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2,15 +2,12 @@ include $(top_srcdir)/gtester.mk
 
 NULL =
 
-
+### General compilation flags
 AM_CPPFLAGS = \
 	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
 	-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\"
 
-BUILT_SOURCES = gxml_test.vala.stamp
-CLEANFILES = gxml_test.vala.stamp
-
 AM_CFLAGS = \
 	-Wall \
 	-g \
@@ -18,27 +15,16 @@ AM_CFLAGS = \
 	$(GXML_CFLAGS) \
 	$(GEE_CFLAGS) \
 	$(LIBXML_CFLAGS) \
-	-I../gxml \
+	-I$(srcdir)/gxml \
 	$(NULL)
-# TODO: -I../gxml is a problem, find out how $(*_CFLAGS) work
 
+VALAC=valac
 
 noinst_PROGRAMS = $(TEST_PROGS)
 
 TEST_PROGS += gxml_test
 
-VALAFLAGS = \
-	$(top_srcdir)/vapi/config.vapi \
-	--vapidir=$(top_srcdir)/vapi \
-	--vapidir=$(top_srcdir)/gxml \
-	--pkg gio-2.0 \
-	--pkg gee-0.8 \
-	--pkg posix \
-	--pkg gxml-0.3 \
-	--pkg libxml-2.0 \
-	$(NULL)
-
-gxml_test_VALASOURCES = \
+gxml_test_SOURCES = \
 	AttrTest.vala \
 	CharacterDataTest.vala \
 	DocumentTest.vala \
@@ -51,33 +37,41 @@ gxml_test_VALASOURCES = \
 	DomNodeTest.vala \
 	$(NULL)
 
-gxml_test_SOURCES = \
-	gxml_test.vala.stamp \
-	$(gxml_test_VALASOURCES:.vala=.c) \
-	$(NULL)
+gxml_test.vala.stamp: $(gxml_test_SOURCES)
 
-gxml_test.vala.stamp: $(gxml_test_VALASOURCES)
-	$(VALA_COMPILER) $(VALAFLAGS) -C $^
-	@touch $@
-
-gxml_test_LDFLAGS =
+gxml_test_VALAFLAGS = \
+	$(AM_VALAFLAGS) \
+	$(ERROR_VALAFLAGS) \
+	$(top_srcdir)/vapi/config.vapi \
+	--vapidir=$(top_srcdir)/vapi \
+	--vapidir=$(top_srcdir)/gxml \
+	--pkg gio-2.0 \
+	--pkg gee-0.8 \
+	--pkg posix \
+	--pkg gxml \
+	--pkg libxml-2.0 \
+	$(NULL)
 
 gxml_test_LDADD = \
+	$(AM_LDADD) \
 	$(GLIB_LIBS) \
 	$(GXML_LIBS) \
 	-L$(top_srcdir)/gxml -lgxml \
 	$(NULL)
 
-#gxml_test_LIBADD = \
-#	$(NULL)
+gxml_test_LDFLAGS = $(AM_LDFLAGS)
+
 
-include_HEADERS = \
-	$(top_builddir)/gxml/gxml.h \
-	$(NULL)
+
+# include_HEADERS = \
+# 	$(top_builddir)/gxml/gxml.h \
+# 	$(NULL)
 
 #...
 
-CLEANFILES += gxml_test
+BUILT_SOURCES = gxml_test.vala.stamp
+
+CLEANFILES =  $(BUILT_SOURCES) gxml_test
 
 EXTRA_DIST += \
 	$(NULL)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]