I started work on a script to help keep our Makefile.am-s up-to-date
with our Git repository:
http://nottheoilrig.com/autotidy/201409190/autotidy
Does something similar already exist?
Everyone on our project is comfortable adding/removing files from Git
but the Makefile.am-s sometimes get overlooked or new project members
are unfamiliar with Automake.
Now if a file is removed from the repository but not from a Makefile.am
the script rewrites the Makefile.am, dropping the file from it as well.
If a file is added to the repository the script also adds it to the
appropriate Makefile.am's EXTRA_DIST variable. This isn't always the
correct edit: Sometimes it should get added to a different primary or
sometimes the file isn't to be distributed. The script takes a
configurable list of files which aren't distributed. On one hand we now
have another list of files to keep up-to-date, just shifting the
problem, but we're more commonly adding/removing files that are
distributed, so the list of files which aren't changes less frequently
than the Makefile.am-s. Also the script hopefully gets the developer's
attention whereupon she can intervene with a better edit, whereas
without it, forgetting to distribute a new file can sometimes go
unnoticed for a long time.