[libgee] Use automake 1.11 vala support + cleaning of the Makefile.am:
- From: Maciej Marcin Piechotka <mpiechotka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgee] Use automake 1.11 vala support + cleaning of the Makefile.am:
- Date: Mon, 2 Aug 2010 18:22:35 +0000 (UTC)
commit ac71a0a279eff5f1d5eb8550a96e65e776bd1ee6
Author: Maciej Piechotka <uzytkownik2 gmail com>
Date: Thu Jul 15 01:25:48 2010 +0200
Use automake 1.11 vala support + cleaning of the Makefile.am:
- Checks the vala version
- All flags are 'local' (i.e. taget_name_(VALA|C|LD)FLAGS)
- Target variables are next to each other
- All lists are one-item-per-line with $(NULL) at the end
- No newline at the end of file
Makefile.decl | 3 ++
autogen.sh | 4 ++-
benchmark/Makefile.am | 42 ++++++++++++++---------------------
configure.ac | 2 +-
doc/Makefile.am | 4 +--
gee/Makefile.am | 57 +++++++++++++++++-------------------------------
tests/Makefile.am | 43 ++++++++++++++++--------------------
7 files changed, 64 insertions(+), 91 deletions(-)
---
diff --git a/Makefile.decl b/Makefile.decl
index 20ad96d..f93ba04 100644
--- a/Makefile.decl
+++ b/Makefile.decl
@@ -7,6 +7,9 @@ GTESTER_REPORT = gtester-report
EXTRA_DIST =
TEST_PROGS =
+# useful constants
+NULL =
+
### testing rules
# test: run all tests in cwd and subdirs
diff --git a/autogen.sh b/autogen.sh
index 3b188da..42ca34c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,6 +9,8 @@ cd $srcdir
# Automake requires that ChangeLog exists.
touch ChangeLog
-REQUIRED_M4MACROS=introspection.m4 gnome-autogen.sh "$@" || exit 1
+REQUIRED_M4MACROS=introspection.m4 \
+ REQUIRED_AUTOMAKE_VERSION=1.11 \
+ gnome-autogen.sh "$@" || exit 1
cd $ORIGDIR || exit $?
diff --git a/benchmark/Makefile.am b/benchmark/Makefile.am
index 6043188..2a869a7 100644
--- a/benchmark/Makefile.am
+++ b/benchmark/Makefile.am
@@ -1,37 +1,29 @@
include $(top_srcdir)/Makefile.decl
-NULL =
-
-AM_CPPFLAGS = \
- -I$(top_srcdir)/gee \
- $(GLIB_CFLAGS) \
- $(NULL)
-
-AM_LDFLAGS = \
- -lm
- $(NULL)
-
noinst_PROGRAMS = benchmarks
-progs_ldadd = $(GLIB_LIBS) ../gee/libgee.la
-
-BUILT_SOURCES = benchmarks.vala.stamp
-
-benchmarks_VALASOURCES = \
+benchmarks_SOURCES = \
benchmark.vala \
benchmarksorts.vala \
mergesort.vala \
$(NULL)
-benchmarks_SOURCES = benchmarks.vala.stamp $(benchmarks_VALASOURCES:.vala=.c)
-benchmarks.vala.stamp: $(benchmarks_VALASOURCES)
- $(VALAC) -C --basedir $(top_srcdir) --vapidir $(top_srcdir)/gee --pkg gee-internals-1.0 $^
- touch $@
-benchmarks_LDADD = $(progs_ldadd)
-EXTRA_DIST += $(benchmarks_VALASOURCES)
+benchmarks_VALAFLAGS = \
+ --basedir $(top_srcdir) \
+ --vapidir $(top_srcdir)/gee \
+ --pkg gee-internals-1.0 \
+ $(NULL)
-MAINTAINERCLEANFILES = \
- $(benchmarks_VALASOURCES:.vala=.c) \
- benchmarks.vala.stamp \
+benchmarks_CPPFLAGS = \
+ -I$(top_srcdir)/gee \
+ $(GLIB_CFLAGS) \
$(NULL)
+benchmarks_LDADD = \
+ $(GLIB_LIBS) \
+ ../gee/libgee.la \
+ $(NULL)
+
+benchmarks_LDFLAGS = \
+ -lm \
+ $(NULL)
diff --git a/configure.ac b/configure.ac
index 82e0618..2d47f3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,7 @@ AC_PROG_LIBTOOL
LIBGEE_LT_VERSION="2:0:0"
AC_SUBST(LIBGEE_LT_VERSION)
-AC_PATH_PROG(VALAC, valac, valac)
+AM_PROG_VALAC([0.9.3])
AC_SUBST(VALAC)
AC_SUBST(VALAFLAGS)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index bce1117..90d18b9 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,7 +1,5 @@
include $(top_srcdir)/Makefile.decl
-NULL =
-
SRC_DIR = $(top_srcdir)/gee
docdir=$(datadir)/devhelp/references/gee-1.0
@@ -34,4 +32,4 @@ gee-1.0/index.html:
EXTRA_DIST += \
index.wiki \
- $(NULL)
\ No newline at end of file
+ $(NULL)
diff --git a/gee/Makefile.am b/gee/Makefile.am
index 2a6bde7..75c6951 100644
--- a/gee/Makefile.am
+++ b/gee/Makefile.am
@@ -1,19 +1,10 @@
include $(top_srcdir)/Makefile.decl
-NULL =
-
-AM_CPPFLAGS = \
- $(GLIB_CFLAGS) \
- $(COVERAGE_CFLAGS) \
- $(NULL)
-
-BUILT_SOURCES = gee.vala.stamp
-
lib_LTLIBRARIES = \
libgee.la
$(NULL)
-libgee_la_VALASOURCES = \
+libgee_la_SOURCES = \
abstractcollection.vala \
abstractlist.vala \
abstractmap.vala \
@@ -55,18 +46,7 @@ libgee_la_VALASOURCES = \
treeset.vala \
$(NULL)
-libgee_la_SOURCES = \
- gee.vala.stamp \
- $(libgee_la_VALASOURCES:.vala=.c) \
- $(NULL)
-
-geeincludedir = $(includedir)/gee-1.0
-
-geeinclude_HEADERS = \
- gee.h \
- $(NULL)
-
-AM_VALAFLAGS = \
+libgee_la_VALAFLAGS = \
-H gee.h --vapi gee-1.0.vapi \
-h gee-internals.h \
--internal-vapi gee-internals-1.0.vapi \
@@ -75,16 +55,26 @@ AM_VALAFLAGS = \
$(VALAFLAGS) \
$(NULL)
-Gee-1.0.gir gee-internals-1.0.vapi gee-1.0.vapi gee.vala.stamp: $(libgee_la_VALASOURCES)
- $(VALAC) -C $(AM_VALAFLAGS) $^
- touch $@
+libgee_la_CPPFLAGS = \
+ $(GLIB_CFLAGS) \
+ $(COVERAGE_CFLAGS) \
+ $(NULL)
libgee_la_LIBADD = \
$(GLIB_LIBS) \
$(COVERAGE_LIBS) \
$(NULL)
-libgee_la_LDFLAGS = -version-info $(LIBGEE_LT_VERSION) -no-undefined
+libgee_la_LDFLAGS = \
+ -version-info $(LIBGEE_LT_VERSION) \
+ -no-undefined \
+ $(NULL)
+
+geeincludedir = $(includedir)/gee-1.0
+
+geeinclude_HEADERS = \
+ gee.h \
+ $(NULL)
vapidir = $(datadir)/vala/vapi
@@ -108,19 +98,12 @@ Gee-1.0.typelib: Gee-1.0.gir
@INTROSPECTION_COMPILER@ --shared-library=libgee -o $@ $^
endif
-EXTRA_DIST += $(libgee_la_VALASOURCES) gee-1.0.vapi Gee-1.0.gir gee.vala.stamp
-
-MAINTAINERCLEANFILES = \
- $(libgee_la_VALASOURCES:.vala=.c) \
- gee.vala.stamp \
- gee-internals-1.0.vapi \
- gee-1.0.vapi \
- Gee-1.0.gir \
- gee.h \
- gee-internals.h \
- $(NULL)
+Gee-1.0.gir gee-internals-1.0.vapi gee-1.0.vapi: libgee.la
CLEANFILES = \
+ gee-1.0.vapi \
+ gee-internals-1.0.vapi \
Gee-1.0.typelib \
+ Gee-1.0.gir \
$(NULL)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b4bfffd..f517efb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,20 +1,10 @@
include $(top_srcdir)/Makefile.decl
-NULL =
-
-AM_CPPFLAGS = \
- -I$(top_srcdir)/gee \
- $(GLIB_CFLAGS) \
- $(NULL)
-
noinst_PROGRAMS = $(TEST_PROGS)
-progs_ldadd = $(GLIB_LIBS) ../gee/libgee.la
-
-BUILT_SOURCES = tests.vala.stamp
-
TEST_PROGS += tests
-tests_VALASOURCES = \
+
+tests_SOURCES = \
testarraylist.vala \
testcase.vala \
testcollection.vala \
@@ -45,14 +35,24 @@ tests_VALASOURCES = \
testtreeset.vala \
$(NULL)
-tests_DEPENDENCIES = $(top_srcdir)/gee/gee-1.0.vapi
+tests_DEPENDENCIES = \
+ $(top_srcdir)/gee/gee-1.0.vapi \
+ $(NULL)
+
+tests_VALAFLAGS = \
+ --basedir $(top_srcdir) \
+ --vapidir $(top_srcdir)/gee \
+ --pkg gee-1.0 --pkg posix \
+ $(NULL)
-tests_SOURCES = tests.vala.stamp $(tests_VALASOURCES:.vala=.c)
-tests.vala.stamp: $(tests_VALASOURCES)
- $(VALAC) -C --basedir $(top_srcdir) --vapidir $(top_srcdir)/gee --pkg gee-1.0 --pkg posix $^
- touch $@
-tests_LDADD = $(progs_ldadd)
-EXTRA_DIST += $(tests_VALASOURCES)
+tests_CPPFLAGS = \
+ -I$(top_srcdir)/gee \
+ $(GLIB_CFLAGS) \
+ $(NULL)
+
+tests_LDADD = \
+ $(GLIB_LIBS) ../gee/libgee.la \
+ $(NULL)
coverage-reset:
lcov --base-directory= top_srcdir@ --directory @top_srcdir@/gee --zerocounters
@@ -76,11 +76,6 @@ coverage-report:
@echo 'file://@abs_top_builddir@/tests/coverage/index.html'
@echo
-MAINTAINERCLEANFILES = \
- $(tests_VALASOURCES:.vala=.c) \
- tests.vala.stamp \
- $(NULL)
-
clean-local:
-rm -rf coverage
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]