bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] maint: normalize leading-TAB indentation in Makefiles


From: Jim Meyering
Subject: [PATCH] maint: normalize leading-TAB indentation in Makefiles
Date: Wed, 18 Mar 2009 18:43:57 +0100

No big deal, but slightly more consistent this way...

>From e6d2d9479495dff8520e577c221d5195eb9bb48b Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 18 Mar 2009 12:20:32 +0100
Subject: [PATCH] maint: normalize leading-TAB indentation in Makefiles

* maint.mk (sc_makefile_TAB_only_indentation): New rule.
Replace each TAB+8-space sequence with two TABs.
* man/Makefile.am: Likewise.
* build-aux/check.mk: Likewise.
I used this command (run it more than once, if needed):
t=$'\t'; git grep -l -E "$t {8}"|grep -E 'Makefile|\.mk$' \
| xargs perl -pi -e 's/\t {8}/\t\t/'
---
 build-aux/check.mk |    4 ++--
 maint.mk           |   12 +++++++++---
 man/Makefile.am    |   14 +++++++-------
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/build-aux/check.mk b/build-aux/check.mk
index 92935d9..5bfcc90 100644
--- a/build-aux/check.mk
+++ b/build-aux/check.mk
@@ -213,8 +213,8 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
            for f in $(TEST_LOGS);                                      \
            do                                                          \
              case $$(sed 1q $$f) in                                    \
-               SKIP:*|PASS:*|XFAIL:*);;                                \
-               *) echo; cat $$f;;                                      \
+               SKIP:*|PASS:*|XFAIL:*);;                                \
+               *) echo; cat $$f;;                                      \
              esac;                                                     \
            done;                                                       \
          } >$(TEST_SUITE_LOG).tmp;                                     \
diff --git a/maint.mk b/maint.mk
index 31d75f4..0c1ad24 100644
--- a/maint.mk
+++ b/maint.mk
@@ -537,6 +537,12 @@ changelog-check:
          exit 1;                                                       \
        fi

+sc_makefile_TAB_only_indentation:
+       @grep -nE '^    [ ]{8}'                                         \
+           $$($(VC_LIST_EXCEPT) | grep -E 'akefile|\.mk$$')            \
+         && { echo '$(ME): found TAB-8-space indentation' 1>&2;        \
+              exit 1; } || :
+
 sc_m4_quote_check:
        @grep -nE '(AC_DEFINE(_UNQUOTED)?|AC_DEFUN)\([^[]'              \
            $$($(VC_LIST_EXCEPT) | grep -E '(^configure\.ac|\.m4)$$')   \
@@ -588,7 +594,7 @@ sc_makefile_path_separator_check:
 writable-files:
        if test -d $(release_archive_dir); then :; else                 \
          for file in $(distdir).tar.gz                                 \
-                     $(release_archive_dir)/$(distdir).tar.gz; do      \
+                     $(release_archive_dir)/$(distdir).tar.gz; do      \
            test -e $$file || continue;                                 \
            test -w $$file                                              \
              || { echo ERROR: $$file is not writable; fail=1; };       \
@@ -740,8 +746,8 @@ define coreutils-path-check
          && ln -sf ../src/true $(bin)/false            \
          && PATH=`pwd`/$(bin):$$PATH $(MAKE) -C tests check \
          && { test -d gnulib-tests                     \
-                && $(MAKE) -C gnulib-tests check       \
-                || :; }                                \
+                && $(MAKE) -C gnulib-tests check       \
+                || :; }                                \
          && rm -rf $(bin)                              \
          && fail=0;                                    \
     else                                               \
diff --git a/man/Makefile.am b/man/Makefile.am
index 2b28052..ec5284b 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -156,13 +156,13 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; 
s/^test$$/[/'`
          *)                                                    \
            rm -f $@                                            \
            && { echo "Updating man page $@";                   \
-                rm -rf $t;                                     \
-                mkdir $t;                                      \
-                (cd $t && $(LN_S) ../../src/$(mapped_name) $*); \
-                   $(PERL) -- $(srcdir)/help2man               \
-                    --source='$(PACKAGE_STRING)'               \
-                    --include=$(srcdir)/$*.x                   \
-                    --output=$t/$@ $t/$*;                      \
+                rm -rf $t;                                     \
+                mkdir $t;                                      \
+                (cd $t && $(LN_S) ../../src/$(mapped_name) $*); \
+                   $(PERL) -- $(srcdir)/help2man               \
+                    --source='$(PACKAGE_STRING)'               \
+                    --include=$(srcdir)/$*.x                   \
+                    --output=$t/$@ $t/$*;                      \
               }                                                \
            && sed 's|$*\.td/||g' $t/$@ > $@                    \
            && rm -rf $t ;;                                     \
--
1.6.2.rc1.285.gc5f54




reply via email to

[Prev in Thread] Current Thread [Next in Thread]