# unfortunately we can't set those from variables
# because they are parsed by automake
-# and we can't use noinst since our automake version is to old
-# (see dist-hook in codegen.make)
-libdefault_la_SOURCES = default_client.cpp
-libother_la_SOURCES = other_client.cpp
+# we would like to use nodist_ here but our automake is to old
+# nodist_libdefault_la_SOURCES = default_client.cpp
+# nodist_libother_la_SOURCES = other_client.cpp
+
+# using objects as workaround
+libdefault_la_OBJECTS += default_client.lo
+#libdefault_la_SOURCES = default_client.cpp
+libother_la_OBJECTS += other_client.lo
+#libother_la_SOURCES = other_client.cpp
lib_LTLIBRARIES = libdefault.la libother.la
# build an example server and client
noinst_PROGRAMS = client server
+# we would like to use nodist_ here but our automake is to old
+# nodist_server_SOURCES = other_server.cpp default_server.cpp
+
+server_LDADD = $(LDADD) other_server.$(OBJEXT) default_server.$(OBJEXT)
+
server_SOURCES = \
- server.cpp $(other_GROUP) $(default_GROUP) \
- other_server.cpp default_server.cpp
+ server.cpp $(other_GROUP) $(default_GROUP)
+# other_server.cpp default_server.cpp
+
# test script
the real problem is that make dist should not depend on BUILT_SOURCES
unfortunately we can't fix this as long as we use a old automake version
(DISTFILES includes generated files we would like to mark as noinst)
+- make clean / make distclean?! make clean geht beim zweiten mal nicht
+ now it works?! why?!
+ das ganze ist abhängig davon in welchem verzeichnis man ist?!
+ das problem ist:
+ BUILT_SOURCES -> generierte files -> codegen !
+ (make clean in toplevel src dir -> codegen does not exist)
+
+ => how to get rid off BUILT_SOURCES
+ or how to get rid off dependency off clean and dist on BUILT_SOURCES files ?
+ (the nodist problem)
+
+ getting rid off BUILT_SOURCES would not suffice
+ (explicit dependencies still would depend upon the files)
+ => the real problem is the missing nodist
+
+ => workaround for old automake version?
+ a workaround would require us not to use _SOURCES but still be able to add object files
+ to the libs/bins created
+ looking at the generated Makefile this perhaps could be done via _OBJECTS
+
+ nodist wurde mit automake 1.5 eingeführt (2001-08-23)
+
+ what doesn't work:
+ - make dist and make clean only work if you did a make all
+
+ hmm Makefile should not depend on BUILT_SOURCES
+ http://sources.redhat.com/ml/bug-automake/2000/msg00040.html
+
\ No newline at end of file
libt2ngroup_%.P : Makefile.am
echo $@ : $($*_GROUP) > libt2ngroup_$*.P
-%.libt2nstamp : libt2ngroup_%.P $(LIBT2N_CODEGEN)
+%.libt2nstamp : libt2ngroup_%.P
# assuming we have some unix like shell (maybe even bash)
# echo BUILT_SOURCES: $(BUILT_SOURCES)
# temporarily create _common.hxx file (will be overwritten by codegen below)