From 44b453d6fb476c57a2ff11c7c8ceaf27fb7ac8c7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 3 Jun 2013 23:00:21 +0100 Subject: [PATCH] build: Simplify and speed up expression that generates po/POTFILES. This has to run on every build, so: - Use two grep commands instead of lots. - Remove unnecessary use of sed. - Remove some obsolete directories that haven't existed for a long time. --- Makefile.am | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0aa70eaa3..c3e51023e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -257,21 +257,10 @@ dist-hook: # to DIST_SUBDIRS. all-local: cd $(srcdir); \ - find $(DIST_SUBDIRS) \ - -name '*.c' -o -name '*.pl' -o -name '*.pm' | \ - grep -v '^perl/blib/' | \ - grep -v '^tests/' | \ - grep -v '^daemon/lib/' | \ - grep -v '^daemon/tests/' | \ - grep -v '^examples/' | \ - grep -v '^gnulib/' | \ - grep -v '^perl/examples/' | \ - grep -v '/guestfs_protocol.c' | \ - grep -v '/rc_protocol.c' | \ - grep -v '^po-docs/' | \ - grep -v '^images/' | \ - LC_ALL=C sort | \ - sed 's,^\./,,' > po/POTFILES + find $(DIST_SUBDIRS) -name '*.c' -o -name '*.pl' -o -name '*.pm' | \ + grep -v -E '^(examples|gnulib|perl/(blib|examples)|po-docs|tests)/' | \ + grep -v -E '/((guestfs|rc)_protocol\.c)$$' | \ + LC_ALL=C sort > po/POTFILES cd $(srcdir); \ find resize sparsify sysprep -name '*.ml' | \ LC_ALL=C sort > po/POTFILES-ml