aboutsummaryrefslogtreecommitdiffstats
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
commitdcb13d2352dfbe3070ac9f3875bb9a0d7b5f6ce8 (patch)
treef5691379304fb8bb09048b0860bf962066ac5e93 /ext/io/console/depend
parent04ee6b3fb20cec947d509459f0ee576f35373e57 (diff)
downloadruby-dcb13d2352dfbe3070ac9f3875bb9a0d7b5f6ce8.tar.gz
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 b3aa1b5f74..40eacd21e1 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