CLEANFILES must be listed directly, too - otherwise automake will not use it :-(
authorJens Thiele <jens.thiele@intra2net.com>
Mon, 4 Dec 2006 14:45:55 +0000 (14:45 +0000)
committerJens Thiele <jens.thiele@intra2net.com>
Mon, 4 Dec 2006 14:45:55 +0000 (14:45 +0000)
codegen/codegen.make
example-codegen/Makefile.am
example-codegen/TODO

index d097350..e67760c 100644 (file)
@@ -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)
index ca49cb8..a4195d4 100644 (file)
@@ -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)
+
index 07d4eff..53f0f9e 100644 (file)
@@ -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