summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
authorAssaf Gordon <assafgordon@gmail.com>2015-01-08 01:20:06 -0500
committerPádraig Brady <P@draigBrady.com>2015-01-08 12:42:29 +0000
commitff97b62fe316faf493c8d58339893ee11b02464e (patch)
treec29406b55498965fc74f4357ccfa0bcec5616f0b /cfg.mk
parent63bc65fbe7ae850a03e0f343cf922767b4faf3ab (diff)
downloadcoreutils-ff97b62fe316faf493c8d58339893ee11b02464e.tar.xz
maint: skip long-lines syntax-check if unsupported
* cfg.mk(sc_long_lines): Skip if required wc and sed options are not supported, which is currently the case on OS X.
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/cfg.mk b/cfg.mk
index 988ad62dd..91045b852 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -245,7 +245,11 @@ FILTER_LONG_LINES = \
\|^[^:]*tests/misc/sha[0-9]*sum.*\.pl[-:]| d; \
\|^[^:]*tests/pr/|{ \|^[^:]*tests/pr/pr-tests:| !d; };
sc_long_lines:
- @files=$$($(VC_LIST_EXCEPT) | xargs wc -L | sed -rn '/ total$$/d;\
+ @wc -L /dev/null >/dev/null 2>/dev/null \
+ || { echo "$@: skipping: wc -L not supported"; exit 0; }; \
+ sed -r 1q /dev/null 2>/dev/null \
+ || { echo "$@: skipping: sed -r not supported"; exit 0; }; \
+ files=$$($(VC_LIST_EXCEPT) | xargs wc -L | sed -rn '/ total$$/d;\
s/^ *(8[1-9]|9[0-9]|[0-9]\{3,\}) //p'); \
halt='line(s) with more than 80 characters; reindent'; \
for file in $$files; do \