include_HEADERS += $(foreach i, $(CMDGROUPS), $(i)_client.hxx $(i).hxx)
-#IFILES=$(foreach i, $(CMDGROUPS), $(foreach j, $($(i)_GROUP), $(j)))
+# not needed but nice to have
+# IFILES=$(foreach i, $(CMDGROUPS), $(foreach j, $($(i)_GROUP), $(j)))
-include $(foreach i, $(CMDGROUPS), libt2ngroup_$(i).P)
-libt2ngroup_%.P : Makefile
+libt2ngroup_%.P : Makefile.am
echo $@ : $($*_GROUP) > libt2ngroup_$*.P
%.libt2nstamp : libt2ngroup_%.P $(LIBT2N_CODEGEN)
-e 's,\@includedir\@,$(includedir),g' \
$< >$*.pc
-LIBT2N_SUGGESTED_CLEANFILES = $(LIBT2N_CODEGEN_BUILT) $(LIBT2N_STAMPS) $(pkgconfig_DATA)
-
-# doesn't work
-# CLEANFILES = $(LIBT2N_SUGGESTED_CLEANFILES)
+CLEANFILES += $(LIBT2N_CODEGEN_BUILT) $(LIBT2N_STAMPS) $(pkgconfig_DATA)
# didn't work (same problem as with _LTLIBRARIES [parsing by automake],
# this time _OBJECTS was not correct)
# we have got an old automake version (1.4-p5) which doesn't support nodist_
# => we use the dist-hook
-# unfortunately dist-hook only works if directly visible for automake (=> not in this include)
-#dist-hook:
-# rm -vf $(foreach i, $(BUILT_SOURCES), $(distdir)/$(i))
+dist-hook:
+ rm -vf $(foreach i, $(LIBT2N_CODEGEN_BUILT), $(distdir)/$(i))
+
+EXTRA_DIST += codegen.make