docs, po: Only update C_SOURCE_FILES, POTFILES, etc when doing 'make dist'.

There's no particular reason that we have to update these files in
every 'make'.  It's slow, and it doesn't really matter if a single
file is accidentally omitted from translations on a developer's build
machine.

On the other hand generating it from 'make dist' has advantages:

 - We only do it once per release.

 - The maintainer can check the changes carefully.

 - If a developer adds some random files in their local build tree,
   these won't be picked up accidentally.

 - Changes to POTFILES etc won't leak into general commits.
This commit is contained in:
Richard W.M. Jones
2016-04-12 19:14:35 +01:00
parent dd85d4f06d
commit 5977fe9d2b

View File

@@ -258,18 +258,10 @@ maintainer-upload-website:
cp $(BUILDERFILES) $(WEBSITEDIR)/download/builder/
# When doing 'make dist' update a few files automatically.
dist-hook:
git log --decorate=false > ChangeLog
cp ChangeLog $(distdir)/ChangeLog
$(top_srcdir)/update-bugs.sh > BUGS-t
mv BUGS-t BUGS
cp BUGS $(distdir)/BUGS
git shortlog -s | $(AWK) -F'\t' '{print $$2}' | sort -f > AUTHORS-t
mv AUTHORS-t AUTHORS
cp AUTHORS $(distdir)/AUTHORS
# Update lists of files. These are separated into:
#
# AUTHORS - list of authors (created from git)
# BUGS - list of bugs (created from Bugzilla)
# ChangeLog - changelog (created from git)
# docs/C_SOURCE_FILES
# - source files scanned for internal documentation
# po/POTFILES - files with ordinary extensions, but not OCaml files
@@ -281,16 +273,29 @@ dist-hook:
#
# This has to be in the top-level Makefile.am so that we have access
# to DIST_SUBDIRS.
all-local:
dist-hook:
git shortlog -s | $(AWK) -F'\t' '{print $$2}' | sort -f > AUTHORS-t
mv AUTHORS-t AUTHORS
cp AUTHORS $(distdir)/AUTHORS
$(top_srcdir)/update-bugs.sh > BUGS-t
mv BUGS-t BUGS
cp BUGS $(distdir)/BUGS
git log --decorate=false > ChangeLog
cp ChangeLog $(distdir)/ChangeLog
cd $(srcdir); \
find $(DIST_SUBDIRS) -name '*.c' -o -name '*.pl' -o -name '*.pm' | \
grep -v -E '^(examples|gnulib|gobject/docs|perl/(blib|examples)|po-docs|tests|test-data)/' | \
grep -v -E '/((guestfs|rc)_protocol\.c)$$' | \
grep -v -E '^python/utils\.c$$' | \
LC_ALL=C sort > po/POTFILES
find $(DIST_SUBDIRS) -name '*.c' | \
grep -v -E '^(builder/index-parse.c|builder/index-scan.c|examples/|gnulib/|gobject/|perl/|tests/|test-data/)' | \
LC_ALL=C sort > docs/C_SOURCE_FILES
cd $(srcdir); \
find builder customize dib get-kernel mllib resize sparsify sysprep v2v -name '*.ml' | \
LC_ALL=C sort > po/POTFILES-ml