I tried some sc_* rules from the main Makefile.

Patch 0001 fixes an alert by 'kate' for Makefile command lines that don't start
with a tab.

Patch 0002 fixes some of the "make sc_prohibit_leading_TABs" output.
The affected files are not shared with glibc, therefore the change
won't cause trouble in glibc merges.

Patch 0003 fixes the "make sc_prohibit_AC_LIBOBJ_in_m4" findings.


2023-04-11  Bruno Haible  <br...@clisp.org>

        Fix the "make sc_prohibit_AC_LIBOBJ_in_m4" findings.
        * Makefile (allow_AC_LIBOBJ): Update after 2023-03-24 change. Add
        termcap, terminfo.

2023-04-11  Bruno Haible  <br...@clisp.org>

        Fix some "make sc_prohibit_leading_TABs" findings.
        * tests/test-calloc-gnu.c: Expand tabs.
        * tests/test-regex.c: Likewise.

2023-04-11  Bruno Haible  <br...@clisp.org>

        Makefile: Fix a syntax alert.
        * Makefile: Indent commands with tabs, not spaces.

>From d9b89953dbc6f35b20f71dbc1f8586bb824bb602 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Tue, 11 Apr 2023 19:34:50 +0200
Subject: [PATCH 1/3] Makefile: Fix a syntax alert.

* Makefile: Indent commands with tabs, not spaces.
---
 ChangeLog | 5 +++++
 Makefile  | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c9962a09b9..8ffdb339d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-04-11  Bruno Haible  <br...@clisp.org>
+
+	Makefile: Fix a syntax alert.
+	* Makefile: Indent commands with tabs, not spaces.
+
 2023-04-10  Bruno Haible  <br...@clisp.org>
 
 	alignasof: Ensure a correct _Alignas (regression 2023-01-15).
diff --git a/Makefile b/Makefile
index 4429571218..26432cd78a 100644
--- a/Makefile
+++ b/Makefile
@@ -65,7 +65,7 @@ sc_prohibit_sc_omitted_at:
 sc_maint:
 	@rm -f maint.mk; ln -s top/maint.mk maint.mk
 	$(MAKE) -s srcdir=. gnulib_dir=. _build-aux=build-aux \
-            -f cfg.mk -f maint.mk syntax-check
+	        -f cfg.mk -f maint.mk syntax-check
 	rm -f maint.mk
 
 # Files in m4/ that (exceptionally) may use AC_LIBOBJ.
@@ -199,5 +199,5 @@ update-copyright:
 	  doc/gendocs_template* build-aux/gendocs.sh
 	export TZ='$(COPYRIGHT_TZ)';					\
 	perl -pi -e							\
-          '$(_year_and_prev) s/^(scriptversion=)$$w.*/$$1$$y-01-01.00/i' \
+	  '$(_year_and_prev) s/^(scriptversion=)$$w.*/$$1$$y-01-01.00/i' \
 	  build-aux/gendocs.sh
-- 
2.34.1

>From cc58717033a1f7755429031cd6dd4818f5c2d160 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Tue, 11 Apr 2023 19:37:24 +0200
Subject: [PATCH 2/3] Fix some "make sc_prohibit_leading_TABs" findings.

* tests/test-calloc-gnu.c: Expand tabs.
* tests/test-regex.c: Likewise.
---
 ChangeLog               |  6 ++++++
 tests/test-calloc-gnu.c |  2 +-
 tests/test-regex.c      | 36 ++++++++++++++++++------------------
 3 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8ffdb339d0..b7dda4241b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-04-11  Bruno Haible  <br...@clisp.org>
+
+	Fix some "make sc_prohibit_leading_TABs" findings.
+	* tests/test-calloc-gnu.c: Expand tabs.
+	* tests/test-regex.c: Likewise.
+
 2023-04-11  Bruno Haible  <br...@clisp.org>
 
 	Makefile: Fix a syntax alert.
diff --git a/tests/test-calloc-gnu.c b/tests/test-calloc-gnu.c
index bcd47d4f01..fd72c44c60 100644
--- a/tests/test-calloc-gnu.c
+++ b/tests/test-calloc-gnu.c
@@ -63,7 +63,7 @@ main ()
         ASSERT (p == NULL);
         ASSERT (errno == ENOMEM);
 
-	p = calloc (SIZE_MAX / n + 1, identity (n));
+        p = calloc (SIZE_MAX / n + 1, identity (n));
         ASSERT (p == NULL);
         ASSERT (errno == ENOMEM);
       }
diff --git a/tests/test-regex.c b/tests/test-regex.c
index aa85e81c56..787ca51472 100644
--- a/tests/test-regex.c
+++ b/tests/test-regex.c
@@ -134,31 +134,31 @@ bug_regex11 (void)
     {
       n = regcomp (&re, tests[i].pattern, tests[i].flags);
       if (n != 0)
-	{
-	  char buf[500];
-	  regerror (n, &re, buf, sizeof (buf));
-	  report_error ("%s: regcomp %zd failed: %s", tests[i].pattern, i, buf);
-	  continue;
-	}
+        {
+          char buf[500];
+          regerror (n, &re, buf, sizeof (buf));
+          report_error ("%s: regcomp %zd failed: %s", tests[i].pattern, i, buf);
+          continue;
+        }
 
       if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0))
-	{
-	  report_error ("%s: regexec %zd failed", tests[i].pattern, i);
-	  regfree (&re);
-	  continue;
-	}
+        {
+          report_error ("%s: regexec %zd failed", tests[i].pattern, i);
+          regfree (&re);
+          continue;
+        }
 
       for (n = 0; n < tests[i].nmatch; ++n)
-	if (rm[n].rm_so != tests[i].rm[n].rm_so
+        if (rm[n].rm_so != tests[i].rm[n].rm_so
               || rm[n].rm_eo != tests[i].rm[n].rm_eo)
-	  {
-	    if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
-	      break;
-	    report_error ("%s: regexec %zd match failure rm[%d] %d..%d",
+          {
+            if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
+              break;
+            report_error ("%s: regexec %zd match failure rm[%d] %d..%d",
                           tests[i].pattern, i, n,
                           (int) rm[n].rm_so, (int) rm[n].rm_eo);
-	    break;
-	  }
+            break;
+          }
 
       regfree (&re);
     }
-- 
2.34.1

>From 2b06288e23ff225c09d73761edf4f907d95538b3 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Tue, 11 Apr 2023 19:40:15 +0200
Subject: [PATCH 3/3] Fix the "make sc_prohibit_AC_LIBOBJ_in_m4" findings.

* Makefile (allow_AC_LIBOBJ): Update after 2023-03-24 change. Add
termcap, terminfo.
---
 ChangeLog | 6 ++++++
 Makefile  | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index b7dda4241b..a37429f7f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-04-11  Bruno Haible  <br...@clisp.org>
+
+	Fix the "make sc_prohibit_AC_LIBOBJ_in_m4" findings.
+	* Makefile (allow_AC_LIBOBJ): Update after 2023-03-24 change. Add
+	termcap, terminfo.
+
 2023-04-11  Bruno Haible  <br...@clisp.org>
 
 	Fix some "make sc_prohibit_leading_TABs" findings.
diff --git a/Makefile b/Makefile
index 26432cd78a..1044869450 100644
--- a/Makefile
+++ b/Makefile
@@ -80,10 +80,12 @@ allow_AC_LIBOBJ =	\
   fcntl			\
   fprintf-posix		\
   open			\
-  printf-posix-rpl	\
+  printf-posix		\
   snprintf		\
   sprintf-posix		\
   stdio_h		\
+  termcap		\
+  terminfo		\
   vasnprintf		\
   vasprintf		\
   vdprintf		\
-- 
2.34.1

Reply via email to