diff mbox series

[v2,2/5] Makefile: adjust sed command for generating "clar-decls.h"

Message ID 17d77f36d41fb2928565a4922eab3a67426d2da6.1729506329.git.ps@pks.im (mailing list archive)
State Accepted
Commit a779c8e8d5eab375c3b2137b91af51c378f49b33
Headers show
Series t/unit-tests: improve clar platform compatibility | expand

Commit Message

Patrick Steinhardt Oct. 21, 2024, 10:56 a.m. UTC
From: Alejandro R. Sedeño <asedeno@mit.edu>

This moves the end-of-line marker out of the captured group, matching
the start-of-line marker and for some reason fixing generation of
"clar-decls.h" on some older, more esoteric platforms.

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kristoffer Haugsbakk Oct. 21, 2024, 11:07 a.m. UTC | #1
On Mon, Oct 21, 2024, at 12:56, Patrick Steinhardt wrote:
> From: Alejandro R. Sedeño <asedeno@mit.edu>
>
> This moves the end-of-line marker out of the captured group, matching
> the start-of-line marker and for some reason fixing generation of
> "clar-decls.h" on some older, more esoteric platforms.
>
> Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>

Alejandro used two signoffs in his original:[1]

    Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
    Signed-off-by: Alejandro R. Sedeño <asedeno@google.com>

I don’t know if this matters?

See also https://lore.kernel.org/git/xmqqilc571hf.fsf@gitster.g/


Patrick Steinhardt Oct. 21, 2024, 11:35 a.m. UTC | #2
On Mon, Oct 21, 2024 at 01:07:17PM +0200, Kristoffer Haugsbakk wrote:
> On Mon, Oct 21, 2024, at 12:56, Patrick Steinhardt wrote:
> > From: Alejandro R. Sedeño <asedeno@mit.edu>
> >
> > This moves the end-of-line marker out of the captured group, matching
> > the start-of-line marker and for some reason fixing generation of
> > "clar-decls.h" on some older, more esoteric platforms.
> >
> > Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> 
> Alejandro used two signoffs in his original:[1]
> 
>     Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
>     Signed-off-by: Alejandro R. Sedeño <asedeno@google.com>
> 
> I don’t know if this matters?
> 
> See also https://lore.kernel.org/git/xmqqilc571hf.fsf@gitster.g/
> 
> 
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index feeed6f9321..0101d349f38 100644
--- a/Makefile
+++ b/Makefile
@@ -3905,7 +3905,7 @@  GIT-TEST-SUITES: FORCE
 
 $(UNIT_TEST_DIR)/clar-decls.h: $(patsubst %,$(UNIT_TEST_DIR)/%.c,$(CLAR_TEST_SUITES)) GIT-TEST-SUITES
 	$(QUIET_GEN)for suite in $(CLAR_TEST_SUITES); do \
-		sed -ne "s/^\(void test_$${suite}__[a-zA-Z_0-9][a-zA-Z_0-9]*(void)$$\)/extern \1;/p" $(UNIT_TEST_DIR)/$$suite.c; \
+		sed -ne "s/^\(void test_$${suite}__[a-zA-Z_0-9][a-zA-Z_0-9]*(void)\)$$/extern \1;/p" $(UNIT_TEST_DIR)/$$suite.c; \
 	done >$@
 $(UNIT_TEST_DIR)/clar.suite: $(UNIT_TEST_DIR)/clar-decls.h
 	$(QUIET_GEN)awk -f $(UNIT_TEST_DIR)/clar-generate.awk $< >$(UNIT_TEST_DIR)/clar.suite