diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-05-03 14:09:55 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2017-05-03 14:09:55 +0200 |
commit | a5a5a91342ebd83d13b8eff8f85d9c923e08f701 (patch) | |
tree | af95f56c76310f97fce7c5c5eb157be483a6ff07 | |
parent | 4a4b85aac16ccb59f01700ee8fb903dcdc7fcf65 (diff) |
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 <tklauser@distanz.ch>
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)))) |