From a5a5a91342ebd83d13b8eff8f85d9c923e08f701 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 3 May 2017 14:09:55 +0200 Subject: make: use sed instead of perl to extract lex/yacc prefix Perl is not available on certain distributions by default (e.g. Alpine Linux). In order to avoid depending on perl just to extract the lex/yacc prefix, use sed instead which should be available almost everywhere. Signed-off-by: Tobias Klauser --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index df0f11d..367e4a8 100644 --- a/Makefile +++ b/Makefile @@ -175,10 +175,10 @@ install_allbutmausezahn: $(foreach tool,$(filter-out mausezahn,$(TOOLS)),$(tool) uninstall: $(foreach tool,$(TOOLS),$(tool)_uninstall) %.yy.o: %.l - $(LEXQ) -P $(shell perl -wlne 'print $$1 if /lex-func-prefix:\s([a-z]+)/' $<) \ + $(LEXQ) -P $(shell sed -rn 's/.*lex-func-prefix:\s([a-z]+).*/\1/gp' $<) \ -o $(BUILD_DIR)/$(shell basename $< .l).yy.c $(LEX_FLAGS) $< %.tab.o: %.y - $(YACCQ) -p $(shell perl -wlne 'print $$1 if /yacc-func-prefix:\s([a-z]+)/' $<) \ + $(YACCQ) -p $(shell sed -rn 's/.*yacc-func-prefix:\s([a-z]+).*/\1/gp' $<) \ -o $(BUILD_DIR)/$(shell basename $< .y).tab.c $(YAAC_FLAGS) -d $< $(foreach tool,$(TOOLS),$(eval $(call TOOL_templ,$(tool)))) -- cgit v1.2.3-54-g00ecf