1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

ext/json/parser/prereq.mk: use if $. == 1 instead of a hacky code

This commit is contained in:
Yusuke Endoh 2019-10-05 18:28:19 +09:00
parent 70e3fda2eb
commit 96452373fd

View file

@ -6,6 +6,6 @@ RAGEL = ragel
$(RAGEL) -G2 $<
$(BASERUBY) -pli -e '$$_.sub!(/[ \t]+$$/, "")' \
-e '$$_.sub!(/^static const int (JSON_.*=.*);$$/, "enum {\\1};")' \
-e '$$header ||= $$_ = "/* This file is automatically generated from parser.rl by using ragel */" + $$_' $@
-e '$$_ = "/* This file is automatically generated from parser.rl by using ragel */" + $$_ if $$. == 1' $@
parser.c: