Skip to content

Commit ac6b8bc

Browse files
committed
Extract Racc::VERSION from racc/info.rb at extconf.rb
1 parent 01d7bda commit ac6b8bc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ext/racc/cparse/cparse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Important Constants
2323
----------------------------------------------------------------------- */
2424

25-
#define RACC_VERSION "1.7.1"
25+
#define RACC_VERSION STRINGIZE(RACC_INFO_VERSION)
2626

2727
#define DEFAULT_TOKEN -1
2828
#define ERROR_TOKEN 1

ext/racc/cparse/extconf.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
#
33

44
require 'mkmf'
5+
require_relative '../../../lib/racc/info'
56

7+
$defs << "-D""RACC_INFO_VERSION=#{Racc::VERSION}"
68
create_makefile 'racc/cparse'

0 commit comments

Comments
 (0)