X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=example-codegen%2FMakefile.am;h=816fafd68ac6bf6fcbd92a5a35b866ac1a7531ec;hp=450f1de68f0feb0936fc8af36cf62573dbba991f;hb=c0a5c7713b976c7165aa213b4ceb36e15b117d61;hpb=1e683bb5deebfec6967ddbc9fe052978b4ecc021 diff --git a/example-codegen/Makefile.am b/example-codegen/Makefile.am index 450f1de..816fafd 100644 --- a/example-codegen/Makefile.am +++ b/example-codegen/Makefile.am @@ -34,8 +34,7 @@ noinst_PROGRAMS = client server TESTS = test - - +EXTRA_DIST = $(TESTS) # always the same: @@ -43,19 +42,20 @@ include_HEADERS += $(foreach i, $(CMDGROUPS), $(i)_client.hxx $(i).hxx) #IFILES=$(foreach i, $(CMDGROUPS), $(foreach j, $($(i)_GROUP), $(j))) --include $(foreach i, $(CMDGROUPS), .deps/group_$(i).P) +-include $(foreach i, $(CMDGROUPS), group_$(i).P) -.deps/group_%.P : Makefile.am - echo $@ : $($*_GROUP) > .deps/group_$*.P +group_%.P : Makefile.am + echo $@ : $($*_GROUP) > group_$*.P -%.stamp : .deps/group_%.P $(top_builddir)/codegen/codegen +%.stamp : group_%.P $(top_builddir)/codegen/codegen # assuming we have some unix like shell (maybe even bash) echo BUILT_SOURCES: $(BUILT_SOURCES) - cp -v $(top_srcdir)/codegen/codegen-stubhead.hxx $*_common.hxx; - echo > $*_server.hxx; +# temporarily create _common.hxx file (will be overwritten by codegen below) + echo '#include "codegen-stubhead.hxx"' > $*_common.hxx; + echo '#include "$*.hxx"' >> $*_common.hxx; # todo use tmp file for xml file for i in $($*_GROUP); do \ - gccxml $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $${i} -fxml=$${i%*.cpp}.xml; \ + gccxml $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(srcdir)/$${i} -fxml=$${i%*.cpp}.xml; \ done; \ $(top_builddir)/codegen/codegen $* $($*_GROUP:.cpp=.xml) && touch $@