From 1f0aa49ffeccf4ac8562a82a941b17c63503c4cc Mon Sep 17 00:00:00 2001 From: Jens Thiele Date: Mon, 4 Dec 2006 10:32:11 +0000 Subject: [PATCH] use pkgincludedir for headers (to avoid file name collisions), renamed LIBT2N_CLIENT_PC_IN to LIBT2N_CLIENT_PCTEMPLATE and removed harmfull whitespace, remove empty file other.cpp --- codegen/TODO | 4 ++-- codegen/codegen.make | 2 +- configure.in | 8 ++++---- example-codegen/Makefile.am | 6 +++--- libt2n.pc.in | 2 +- src/Makefile.am | 3 +-- 6 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 example-codegen/other.cpp diff --git a/codegen/TODO b/codegen/TODO index dd9baca..7519db7 100644 --- a/codegen/TODO +++ b/codegen/TODO @@ -11,5 +11,5 @@ open questions: - makefile snippet must work for builds outside of libt2n (=> some variables must be set by configure, the snippet must be installed => pc file template must be installed, too) - - +- it would really be much nicer if the client lib includes would not depend upon boost serialization + a solution would be to provide this optionally by wrapping the corresponding includes in a #ifdef diff --git a/codegen/codegen.make b/codegen/codegen.make index 02c2873..450597f 100644 --- a/codegen/codegen.make +++ b/codegen/codegen.make @@ -35,7 +35,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = $(CMDGROUPS:=.pc) # .pc files (one pc file for each command group) -%.pc : $(LIBT2N_CLIENT_PC_IN) Makefile +%.pc : $(LIBT2N_CLIENT_PCTEMPLATE) Makefile sed \ -e 's,@CMDGROUP@,$*,g' \ -e 's,\@prefix\@,$(prefix),g' \ diff --git a/configure.in b/configure.in index 65137d8..1d07fab 100644 --- a/configure.in +++ b/configure.in @@ -27,18 +27,18 @@ PKG_CHECK_MODULES(XMLPP, libxml++-2.6 >= 2.8.1) AC_SUBST(XMLPP_CFLAGS) AC_SUBST(XMLPP_LIBS) -dnl fake installed libt2n (codegen) +dnl fake installed libt2n (codegen) for example-codegen dnl todo: remove codegen include path (codegen-stubhead.hxx will be removed) LIBT2N_CPPFLAGS="-I\$(top_srcdir)/src @BOOST_CPPFLAGS@ @CPPUNIT_CFLAGS@ -I\$(top_srcdir)/codegen" LIBT2N_LIBS="\$(top_builddir)/src/libt2n.la @BOOST_SERIALIZATION_LIB@ @BOOST_LDFLAGS@" LIBT2N_CODEGEN="\$(top_builddir)/codegen/libt2n-codegen" -LIBT2N_CLIENT_PC_IN = "\$(top_srcdir)/codegen/clientlib.pc.in" -LIBT2N_CODEGEN_MAKESNIPPET="\$(top_srcdir)/codegen/codegen.make" +LIBT2N_CLIENT_PCTEMPLATE="\$(top_srcdir)/codegen/clientlib.pc.in" +LIBT2N_CODEGEN_MAKESNIPPET="include \$(top_srcdir)/codegen/codegen.make" AC_SUBST(LIBT2N_CPPFLAGS) AC_SUBST(LIBT2N_LIBS) AC_SUBST(LIBT2N_CODEGEN) -AC_SUBST(LIBT2N_CLIENT_PC_IN) +AC_SUBST(LIBT2N_CLIENT_PCTEMPLATE) AC_SUBST(LIBT2N_CODEGEN_MAKESNIPPET) AC_OUTPUT(Makefile doc/Doxyfile doc/Makefile src/Makefile libt2n.pc libt2n.spec test/Makefile examples/Makefile codegen/Makefile example-codegen/Makefile) diff --git a/example-codegen/Makefile.am b/example-codegen/Makefile.am index 30b8d8d..1911f20 100644 --- a/example-codegen/Makefile.am +++ b/example-codegen/Makefile.am @@ -1,4 +1,6 @@ -# todo: remove codegen include path (codegen-stubhead.hxx will be removed) +# if you use codegen you should add the next line +@LIBT2N_CODEGEN_MAKESNIPPET@ + INCLUDES = @LIBT2N_CPPFLAGS@ LDADD = @LIBT2N_LIBS@ @@ -38,5 +40,3 @@ server_SOURCES = \ TESTS = test EXTRA_DIST = $(TESTS) - -include @LIBT2N_CODEGEN_MAKESNIPPET@ diff --git a/example-codegen/other.cpp b/example-codegen/other.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/libt2n.pc.in b/libt2n.pc.in index a9ff269..03d773f 100644 --- a/libt2n.pc.in +++ b/libt2n.pc.in @@ -1,7 +1,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ -includedir=@includedir@ +includedir=@includedir@/libt2n Name: libt2n Description: talk2neighbor - C++ IPC library diff --git a/src/Makefile.am b/src/Makefile.am index 9911bf0..0211215 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,3 @@ - # set the include path found by configure INCLUDES= $(all_includes) @@ -9,6 +8,6 @@ libt2n_la_SOURCES = server.cpp socket_server.cpp client.cpp connection.cpp \ socket_handler.cpp socket_client.cpp command_server.cpp command_client.cpp \ t2n_exception.cpp command.cpp container.cpp -include_HEADERS = server.hxx socket_server.hxx t2n_exception.hxx client.hxx \ +pkginclude_HEADERS = server.hxx socket_server.hxx t2n_exception.hxx client.hxx \ socket_client.hxx connection.hxx types.hxx socket_handler.hxx command.hxx container.hxx \ command_client.hxx command_server.hxx log.hxx -- 1.7.1