Skip to content

Commit 5b7735c

Browse files
authored
Merge pull request #241 from nobu/info_version
Extract Racc::VERSION from racc/info.rb at extconf.rb
2 parents aa1f322 + 32e5061 commit 5b7735c

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

README.rdoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535

3636
* Update VERSION number of these files
3737
* <code>RACC_VERSION</code> in "ext/racc/com/headius/racc/Cparse.java"
38-
* <code>RACC_VERSION</code> in "ext/racc/cparse/cparse.c"
3938
* <code>VERSION</code> in "lib/racc/info.rb"
4039
* Release as a gem by <code>rake release</code> with CRuby and JRuby because Racc gem provides 2 packages
4140
* Create new release on {GitHub}[https://github.com/ruby/racc/releases]

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)