Move list of autotools build products to debian/*.list
To allow taking advantage of changes in the autotools toolchain
with a simple rebuild, since commit
4c3f5b8 (debian/rules: Run
autotools at build time, 2009-08-07) the configure script and
supporting files are regenerated at build time. To clean up,
the debian/rules clean target uses {m4,po}/.gitignore as lists
of automatically generated files and deletes them. This works
great from a git checkout, but unfortunately, the .gitignore
files are not included in upstream release tarballs. Solution:
copy the .gitignore files to debian/ so they are included in the
Debian source package’s .diff.gz file.
To avoid the file lists falling out of date, the copying should
happen for each upstream version, at the same time as
debian/changelog.upstream is generated. Add a debian/autogen.sh
script to generate both the changelog.upstream and the *.list
files, and change the recommended practice in README.source to
use that instead of calling changelog.upstream.sh directly.
Clear changelog.upstream.sh’s executable bit to remind developers
invoking debian/changelog.upstream.sh to use debian/autogen.sh
instead.
Factor out "debian/rules clean" into a separate debian/clean.sh
script, with a comment at the top explaining its purpose.
Readers of debian/rules might find it easier to ignore the
details this way. Something like this clean.sh script could be
useful to packagers for other distributions, too.