From 1e683bb5deebfec6967ddbc9fe052978b4ecc021 Mon Sep 17 00:00:00 2001 From: Jens Thiele Date: Tue, 28 Nov 2006 13:51:01 +0000 Subject: [PATCH] client lib include must not depend on _common.hxx --- example-codegen/Makefile.am | 15 ++++++++++++--- example-codegen/default.cpp | 1 + example-codegen/default.hxx | 2 -- example-codegen/other-1.cpp | 2 ++ example-codegen/other-2.cpp | 1 + example-codegen/other.hxx | 2 -- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/example-codegen/Makefile.am b/example-codegen/Makefile.am index 14cd67d..450f1de 100644 --- a/example-codegen/Makefile.am +++ b/example-codegen/Makefile.am @@ -9,7 +9,8 @@ default_GROUP = default.cpp # example of a command group using multiple cpp files other_GROUP = other-1.cpp other-2.cpp -# foo.hxx must be listed manually +# headers declaring data types used as rpc arguments must be listed manually +# (in this example the class Foo) include_HEADERS = foo.hxx # unfortunately we can't set those from variables @@ -25,8 +26,7 @@ client_LDADD = $(LDADD) libdefault.la libother.la server_SOURCES = server.cpp \ $(other_GROUP) other_server.cpp \ - $(default_GROUP) default_server.cpp \ - foo.hxx + $(default_GROUP) default_server.cpp noinst_PROGRAMS = client server @@ -34,6 +34,9 @@ noinst_PROGRAMS = client server TESTS = test + + + # always the same: include_HEADERS += $(foreach i, $(CMDGROUPS), $(i)_client.hxx $(i).hxx) @@ -77,3 +80,9 @@ pkgconfig_DATA = $(CMDGROUPS:=.pc) $< >$*.pc CLEANFILES = $(BUILT_SOURCES) $(STAMPS) $(pkgconfig_DATA) + +# didn't work (same problem as with _LTLIBRARIES [parsing by automake], +# this time _OBJECTS was not correct) +# server_SOURCES = server.cpp \ +# $(foreach i, $(CMDGROUPS), $(foreach j, $($(i)_GROUP), $(j))) \ +# $(foreach i, $(CMDGROUPS), $(i)_server.cpp) diff --git a/example-codegen/default.cpp b/example-codegen/default.cpp index 7cc63b7..f22250d 100644 --- a/example-codegen/default.cpp +++ b/example-codegen/default.cpp @@ -1,4 +1,5 @@ #include "default.hxx" +#include "default_common.hxx" //! test pass by copy LIBT2N_EXPORT std::string testfunc(std::string str) diff --git a/example-codegen/default.hxx b/example-codegen/default.hxx index 34e71a5..9a8d548 100644 --- a/example-codegen/default.hxx +++ b/example-codegen/default.hxx @@ -7,5 +7,3 @@ // std::vector #include #include - -#include "default_common.hxx" diff --git a/example-codegen/other-1.cpp b/example-codegen/other-1.cpp index 3d50946..054eaed 100644 --- a/example-codegen/other-1.cpp +++ b/example-codegen/other-1.cpp @@ -1,4 +1,6 @@ #include "other.hxx" +#include "other_common.hxx" + using namespace std; //! test function overload diff --git a/example-codegen/other-2.cpp b/example-codegen/other-2.cpp index f67f0b8..adba920 100644 --- a/example-codegen/other-2.cpp +++ b/example-codegen/other-2.cpp @@ -1,4 +1,5 @@ #include "other.hxx" +#include "other_common.hxx" //! test own type LIBT2N_EXPORT bool t3(const Foo &foo) diff --git a/example-codegen/other.hxx b/example-codegen/other.hxx index 4121f04..dd931b5 100644 --- a/example-codegen/other.hxx +++ b/example-codegen/other.hxx @@ -9,5 +9,3 @@ #include #include "foo.hxx" - -#include "other_common.hxx" -- 1.7.1