summaryrefslogtreecommitdiff
path: root/ext/json/parser/prereq.mk
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-10-05 07:00:07 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-10-05 07:00:07 +0900
commit5717e55e9a7790c938afa694a9bf558c0e54bb83 (patch)
tree88d736907ea5cf18a97c2314e0b7f68eb9d7240c /ext/json/parser/prereq.mk
parent076d3d758b0df47d3dceb3ba0930486f3dd0cc2d (diff)
ext/json/parser/prereq.mk: Add a "automatically generated" header
to parser.c.
Diffstat (limited to 'ext/json/parser/prereq.mk')
-rw-r--r--ext/json/parser/prereq.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/json/parser/prereq.mk b/ext/json/parser/prereq.mk
index be7bcb43190..386999ba9d1 100644
--- a/ext/json/parser/prereq.mk
+++ b/ext/json/parser/prereq.mk
@@ -5,6 +5,7 @@ RAGEL = ragel
.rl.c:
$(RAGEL) -G2 $<
$(BASERUBY) -pli -e '$$_.sub!(/[ \t]+$$/, "")' \
- -e '$$_.sub!(/^static const int (JSON_.*=.*);$$/, "enum {\\1};")' $@
+ -e '$$_.sub!(/^static const int (JSON_.*=.*);$$/, "enum {\\1};")' \
+ -e '$$header ||= $$_ = "/* This file is automatically generated from parser.rl by using ragel */\n" + $$_' $@
parser.c: