From d0a97d0bbe03472214e379b7a4ace2bdcecfc212 Mon Sep 17 00:00:00 2001 From: Jens Thiele Date: Mon, 11 Dec 2006 12:16:39 +0000 Subject: [PATCH 1/1] try to find workaround for old automake --- example-codegen/Makefile.am | 23 +++++++++++++++++------ example-codegen/TODO | 28 ++++++++++++++++++++++++++++ example-codegen/codegen.make | 2 +- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/example-codegen/Makefile.am b/example-codegen/Makefile.am index b2c51de..00aaac7 100644 --- a/example-codegen/Makefile.am +++ b/example-codegen/Makefile.am @@ -19,11 +19,16 @@ include_HEADERS = foo.hxx # 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 @@ -32,9 +37,15 @@ client_LDADD = $(LDADD) libdefault.la libother.la 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 diff --git a/example-codegen/TODO b/example-codegen/TODO index c166d7e..7386630 100644 --- a/example-codegen/TODO +++ b/example-codegen/TODO @@ -37,3 +37,31 @@ now we use the first solution 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 diff --git a/example-codegen/codegen.make b/example-codegen/codegen.make index 2464a0f..f9de2b7 100644 --- a/example-codegen/codegen.make +++ b/example-codegen/codegen.make @@ -14,7 +14,7 @@ include_HEADERS += $(foreach i, $(CMDGROUPS), $(i)_client.hxx $(i).hxx) 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) -- 1.7.1