my $printed_header = 0;
my (%allvars, %sourcevars);
+my @cleanfiles;
sub drop {
undef $_;
$_ = mangle_target($_);
}
+ # When using conditional-dependencies, *CLEANFILES can end up
+ # depending on the configuration. This means that "make distclean"
+ # may not actually delete everything if the configuration changes
+ # after building the package. Stash all the variables for later so
+ # they can be moved outside of any conditional.
+ if (/CLEANFILES/) {
+ push(@cleanfiles, $_);
+ drop;
+ }
+
# Finally, references to $(srcdir) and $(builddir) need to be fixed up.
s:\$\(srcdir\):\$\(top_srcdir\)/lib:g;
s:\$\(builddir\):\$\(top_builddir\)/lib:g;
gnulib_lt_objects = $(libgnu_la_OBJECTS) $(gl_LTLIBOBJS)
$(gnulib_lt_objects): $(gnulib_headers)
EOF
+print @cleanfiles;
# Some filenames are AC_SUBSTed by the Gnulib macros, and thus we need to
# prepend lib/ if and only if they're not empty. Unfortunately, make is not