summaryrefslogtreecommitdiff
path: root/ext/io/console/depend
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-02 03:57:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-02 03:57:23 +0000
commit71f2c19a9c65d154b8651218ae260fc4a8152cc2 (patch)
treef5691379304fb8bb09048b0860bf962066ac5e93 /ext/io/console/depend
parent0dc9e4f36b0803fb324ee4175e939fd3c8853ee4 (diff)
win32_vk.inc: merge win32_vk.h
* ext/io/console/win32_vk.inc: merge win32_vk.h not to be included in HDRS on other platforms than Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/io/console/depend')
-rw-r--r--ext/io/console/depend18
1 files changed, 8 insertions, 10 deletions
diff --git a/ext/io/console/depend b/ext/io/console/depend
index b3aa1b5f740..40eacd21e10 100644
--- a/ext/io/console/depend
+++ b/ext/io/console/depend
@@ -1,23 +1,21 @@
$(OBJS): $(HDRS) $(ruby_headers) \
- $(VK_HEADER) $(VK_HEADER:.chksum=.h) \
+ $(VK_HEADER) \
$(hdrdir)/ruby/io.h \
$(hdrdir)/ruby/encoding.h \
$(hdrdir)/ruby/oniguruma.h
win32_vk.inc: win32_vk.list
-win32_vk.h: win32_vk.list
-
.list.inc:
+ ( \
+ $(RUBY) -anF, \
+ -e 'BEGIN {puts "#define UNDEFINED_VK (unsigned short)-1"}' \
+ -e 'n=$$F[1] and (n.strip!; /\AVK_/=~n) and' \
+ -e 'puts(%[#ifndef #{n}\n# define #{n} UNDEFINED_VK\n#endif])' \
+ $< && \
gperf --ignore-case -E -C -P -p -j1 -i 1 -g -o -t -K ofs -N console_win32_vk -k* $< \
| sed 's/(int)(long)&((\(struct stringpool_t\) *\*)0)->\(stringpool_[a-z0-9]*\)/offsetof(\1, \2)/g' \
- > $(@F)
-
-.list.h:
- $(RUBY) -anF, \
- -e '(n=$$F[1]) and (n.strip!; /\AVK_/=~n) and' \
- -e 'puts %[#ifndef #{n}\n# define #{n} (unsigned short)-1\n#endif]' \
- $< > $@
+ ) > $(@F)
.SUFFIXES: .chksum .list .inc