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)
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)
-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
EXTRA_DIST = $(TESTS)
-include $(top_srcdir)/codegen/codegen.make
+include @LIBT2N_CODEGEN_MAKESNIPPET@
- 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)