fake installed libt2n for example-codegen
authorJens Thiele <jens.thiele@intra2net.com>
Mon, 4 Dec 2006 09:39:58 +0000 (09:39 +0000)
committerJens Thiele <jens.thiele@intra2net.com>
Mon, 4 Dec 2006 09:39:58 +0000 (09:39 +0000)
codegen/codegen.make
configure.in
example-codegen/Makefile.am
example-codegen/TODO

index 99ffd3d..02c2873 100644 (file)
@@ -13,9 +13,6 @@ include_HEADERS += $(foreach i, $(CMDGROUPS), $(i)_client.hxx $(i).hxx)
 libt2ngroup_%.P : Makefile.am
        echo $@ : $($*_GROUP) > libt2ngroup_$*.P
 
-LIBT2N_CODEGEN ?= $(top_builddir)/codegen/libt2n-codegen
-LIBT2N_CLIENT_PC_IN ?= $(top_srcdir)/codegen/clientlib.pc.in
-
 %.libt2nstamp : libt2ngroup_%.P $(LIBT2N_CODEGEN)
 # assuming we have some unix like shell (maybe even bash)
        echo BUILT_SOURCES: $(BUILT_SOURCES)
index 967635f..65137d8 100644 (file)
@@ -27,4 +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 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"
+
+AC_SUBST(LIBT2N_CPPFLAGS)
+AC_SUBST(LIBT2N_LIBS)
+AC_SUBST(LIBT2N_CODEGEN)
+AC_SUBST(LIBT2N_CLIENT_PC_IN)
+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)
index d1134fe..30b8d8d 100644 (file)
@@ -1,5 +1,6 @@
-INCLUDES = -I$(top_srcdir)/src @BOOST_CPPFLAGS@ @CPPUNIT_CFLAGS@ -I$(top_srcdir)/codegen
-LDADD = $(top_builddir)/src/libt2n.la @BOOST_SERIALIZATION_LIB@ @BOOST_LDFLAGS@
+# todo: remove codegen include path (codegen-stubhead.hxx will be removed)
+INCLUDES = @LIBT2N_CPPFLAGS@
+LDADD = @LIBT2N_LIBS@
 
 # list your command groups
 CMDGROUPS = default other
@@ -38,4 +39,4 @@ TESTS = test
 
 EXTRA_DIST = $(TESTS)
 
-include $(top_srcdir)/codegen/codegen.make
+include @LIBT2N_CODEGEN_MAKESNIPPET@
index 6afaf9b..56b0337 100644 (file)
@@ -6,17 +6,14 @@ include problem:
 - a simple solution would be to have a special include file containing the neccessary includes (or 2: one for the type definitions and one for the serialization)
 - another solution would be to extract the includes from the file and add them to the generated code
 both solutions only work if the include paths used during compilation of a program using the library are correct[tm]
-
 now we use the first solution
 
-- make distcheck
-- .pc file
-- make install (in this example the "other" client lib would have to install foo.hxx)
 - test using valgrind
 - would be nice to reduce amount of changed files
   (codegen output is often the same as the existing files - something similar to ccache
   for codegen - but not overwriting output files if they are the same)
 - howto include the part after "# always the same:" in all makefiles using the codegenerator
+  (we now use make's include)
 - lib name should be group name + suffix/prefix
 - at the moment make dist from within a clean source will not work
-  (this is related to the nodist problem)
+  (this is related to the nodist problem / old automake version)