From 2c2d29e114d44d1a2d4fb5f1c2b49b60b80b304a Mon Sep 17 00:00:00 2001 From: Jens Thiele Date: Mon, 4 Dec 2006 14:45:55 +0000 Subject: [PATCH] CLEANFILES must be listed directly, too - otherwise automake will not use it :-( --- codegen/codegen.make | 13 ++++++++----- example-codegen/Makefile.am | 11 +++++++++-- example-codegen/TODO | 1 + 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/codegen/codegen.make b/codegen/codegen.make index d097350..e67760c 100644 --- a/codegen/codegen.make +++ b/codegen/codegen.make @@ -26,12 +26,12 @@ libt2ngroup_%.P : Makefile.am $(LIBT2N_CODEGEN) $* $($*_GROUP:.cpp=.xml) && touch $@ LIBT2N_CODEGEN_BUILT = $(foreach i, $(CMDGROUPS), $(foreach j, _common.hxx _common.cpp _client.hxx _client.cpp _server.hxx _server.cpp, $(i)$(j)) ) -BUILT_SOURCES = $(LIBT2N_CODEGEN_BUILT) +BUILT_SOURCES += $(LIBT2N_CODEGEN_BUILT) -STAMPS=$(CMDGROUPS:=.libt2nstamp) -$(BUILT_SOURCES) : $(STAMPS) +LIBT2N_STAMPS=$(CMDGROUPS:=.libt2nstamp) +$(BUILT_SOURCES) : $(LIBT2N_STAMPS) -# Install the pkg-config files: +# Install the pkg-config files: (todo: perhaps use +=) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = $(CMDGROUPS:=.pc) @@ -45,7 +45,10 @@ pkgconfig_DATA = $(CMDGROUPS:=.pc) -e 's,\@includedir\@,$(includedir),g' \ $< >$*.pc -CLEANFILES = $(BUILT_SOURCES) $(STAMPS) $(pkgconfig_DATA) +LIBT2N_SUGGESTED_CLEANFILES = $(LIBT2N_CODEGEN_BUILT) $(LIBT2N_STAMPS) $(pkgconfig_DATA) + +# doesn't work +# CLEANFILES = $(LIBT2N_SUGGESTED_CLEANFILES) # didn't work (same problem as with _LTLIBRARIES [parsing by automake], # this time _OBJECTS was not correct) diff --git a/example-codegen/Makefile.am b/example-codegen/Makefile.am index ca49cb8..a4195d4 100644 --- a/example-codegen/Makefile.am +++ b/example-codegen/Makefile.am @@ -1,3 +1,7 @@ +# not a GNU package. You can remove this line, if +# have all needed files, that a GNU package needs +AUTOMAKE_OPTIONS = foreign 1.4 + INCLUDES = @LIBT2N_CFLAGS@ LDADD = @LIBT2N_LIBS@ @@ -41,7 +45,10 @@ EXTRA_DIST = $(TESTS) configure.in # we have got an old automake version (1.4-p5) which doesn't support nodist_ # => you might want to use the dist-hook to remove generated files dist-hook: - rm -vf $(foreach i, $(BUILT_SOURCES), $(distdir)/$(i)) + rm -vf $(foreach i, $(LIBT2N_CODEGEN_BUILT), $(distdir)/$(i)) -# if you use codegen you should add the next line at the end +# if you use libt2n-codegen you should add this @LIBT2N_CODEGEN_MAKESNIPPET@ + +CLEANFILES = $(LIBT2N_SUGGESTED_CLEANFILES) + diff --git a/example-codegen/TODO b/example-codegen/TODO index 07d4eff..53f0f9e 100644 --- a/example-codegen/TODO +++ b/example-codegen/TODO @@ -21,3 +21,4 @@ now we use the first solution (overwriting install: doesn't work) - dist-hook in included makefile does not work (because automake doesn't see it!) +- CLEANFILES doesn't work in included makefile either -- 1.7.1