]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: fix 'syntax-check' targets for VPATH builds
authorBernhard Voelker <mail@bernhard-voelker.de>
Tue, 22 Nov 2016 21:27:51 +0000 (22:27 +0100)
committerBernhard Voelker <mail@bernhard-voelker.de>
Wed, 23 Nov 2016 11:17:03 +0000 (12:17 +0100)
* cfg.mk (sc_gitignore_missing): Add $(srcdir) to .gitignore filename.
(sc_gitignore_redundant): Likewise.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index 9e4f8a31a7568d34b419c6cedcb5ba8528d41492..92a41cf5df3eff3accb18e2aa11460cce3c1a440 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -778,7 +778,7 @@ sc_fs-magic-compare:
 # Ensure gnulib generated files are ignored
 # TODO: Perhaps augment gnulib-tool to do this in lib/.gitignore?
 sc_gitignore_missing:
-       @{ sed -n '/^\/lib\/.*\.h$$/{p;p}' .gitignore;                  \
+       @{ sed -n '/^\/lib\/.*\.h$$/{p;p}' $(srcdir)/.gitignore;        \
            find lib -name '*.in*' ! -name '*~' ! -name 'sys_*' |       \
              sed 's|^|/|; s|_\(.*in\.h\)|/\1|; s/\.in//'; } |          \
              sort | uniq -u | grep . && { echo '$(ME): Add above'      \
@@ -786,7 +786,8 @@ sc_gitignore_missing:
 
 # Flag redundant entries in .gitignore
 sc_gitignore_redundant:
-       @{ grep ^/lib .gitignore; sed 's|^|/lib|' lib/.gitignore; } |   \
+       @{ grep ^/lib $(srcdir)/.gitignore;                             \
+          sed 's|^|/lib|' $(srcdir)/lib/.gitignore; } |                \
            sort | uniq -d | grep . && { echo '$(ME): Remove above'     \
              'entries from .gitignore' >&2; exit 1; } || :