From: Jens Thiele Date: Mon, 27 Nov 2006 14:25:54 +0000 (+0000) Subject: use BUILT_SOURCES to avoid listing client.cpp and server.cpp dependencies manually... X-Git-Tag: v0.2~92 X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=commitdiff_plain;h=acf4b39c788662838737763ffc48906a3435a1a0 use BUILT_SOURCES to avoid listing client.cpp and server.cpp dependencies manually. See also automake manual --- diff --git a/example-codegen/Makefile.am b/example-codegen/Makefile.am index 3d710d5..28f9e75 100644 --- a/example-codegen/Makefile.am +++ b/example-codegen/Makefile.am @@ -6,12 +6,12 @@ libdefault_la_SOURCES = default_client.cpp libother_la_SOURCES = other_client.cpp noinst_LTLIBRARIES = libdefault.la libother.la + +CMDGROUPS = default other + client_SOURCES = client.cpp client_LDADD = $(LDADD) libdefault.la libother.la -client.cpp : default_client.hxx other_client.hxx -server.cpp : default_client.hxx other_client.hxx - server_SOURCES = server.cpp \ other.cpp other_server.cpp \ default.cpp default_server.cpp \ @@ -21,12 +21,12 @@ noinst_PROGRAMS = client server codegen.stamp: default.cpp other.cpp $(top_builddir)/codegen/codegen # assuming we have some unix like shell - for i in default other; do \ + for i in $(CMDGROUPS); do \ cp -v $(top_srcdir)/codegen/codegen-stubhead.hxx $${i}_common.hxx; \ cp -v $(top_srcdir)/codegen/codegen-stubhead.hxx $${i}_server.hxx; \ done # todo use tmp file for xml file - for i in default other; do \ + for i in $(CMDGROUPS); do \ gccxml $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $${i}.cpp -fxml=$${i}.xml; \ $(top_builddir)/codegen/codegen $${i}.cpp $${i}.xml $${i}; \ done; touch $@ @@ -37,9 +37,11 @@ $(DEFAULT_GENERATED): codegen.stamp OTHER_GENERATED = other_common.hxx other_common.cpp other_client.hxx other_client.cpp other_server.hxx other_server.cpp $(OTHER_GENERATED): codegen.stamp +BUILT_SOURCES = $(DEFAULT_GENERATED) $(OTHER_GENERATED) + TESTS = test -CLEANFILES = $(DEFAULT_GENERATED) $(OTHER_GENERATED) codegen.stamp +CLEANFILES = codegen.stamp # TODO: # howto generate Makefile(.in) from something like this: