fix makefile issue with mawk
authorMazet Laurent <mazet@softndesign.org>
Mon, 28 Apr 2025 08:36:01 +0000 (10:36 +0200)
committerMazet Laurent <mazet@softndesign.org>
Mon, 28 Apr 2025 08:36:01 +0000 (10:36 +0200)
makefile

index d55bffc6713ef6d7c66a60de6b01a0ba6e2c57f4..1190143d486a126b867f0f5bcd9f4626858970c5 100644 (file)
--- a/makefile
+++ b/makefile
@@ -39,7 +39,7 @@ endif
 
 # Targets
 
-ALLEXE  = $(shell for f in *.c; do grep -q '/\*\slinker:' $$f && echo $${f/.c}; done)
+ALLEXE  = $(shell for f in *.c; do grep -q '/\*\s*linker:' $$f && echo $${f/.c}; done)
 
 SHELL = bash
 
@@ -60,7 +60,7 @@ INSTALL = test -d `dirname $(2)` || $(call MKDIR, `dirname $(2)`) && cp -pa $(1)
 
 VALID = $(call TITLE, $(1)) && $(2) && $(call PASS, SUCCESS) || { $(call FAIL, FAILED); test; }
 
-GETCOMMENTS = awk '/\/\*\s*$(1):/,/\*\// { sub(/.*\/\*\s*$(1):/, ""); sub (/\s*\*\/.*/, ""); print } /\/\/\s*$(1):/ {sub (/.*\/\/\s*$(1):/, ""); print }' $(2)
+GETCOMMENTS = awk '/\/\*[ \t]*$(1):/,/\*\// { sub(/.*\/\*[ \t]*$(1):/, ""); sub (/[ \t]*\*\/.*/, ""); print } /\/\/[ \t]*$(1):/ {sub (/.*\/\/[ \t]*$(1):/, ""); print }' $(2)
 #GETCOMMENTS = perl -- getcomments.pl -p='$(1):\s' -f='%' $(2)
 
 ## Generic rules