diff --git a/README.rdoc b/README.rdoc index 5a9e5ee2..1bd45f6c 100644 --- a/README.rdoc +++ b/README.rdoc @@ -35,7 +35,6 @@ * Update VERSION number of these files * RACC_VERSION in "ext/racc/com/headius/racc/Cparse.java" - * RACC_VERSION in "ext/racc/cparse/cparse.c" * VERSION in "lib/racc/info.rb" * Release as a gem by rake release with CRuby and JRuby because Racc gem provides 2 packages * Create new release on {GitHub}[https://github.com/ruby/racc/releases] diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse/cparse.c index ed9cca19..80c72a40 100644 --- a/ext/racc/cparse/cparse.c +++ b/ext/racc/cparse/cparse.c @@ -22,7 +22,7 @@ Important Constants ----------------------------------------------------------------------- */ -#define RACC_VERSION "1.7.1" +#define RACC_VERSION STRINGIZE(RACC_INFO_VERSION) #define DEFAULT_TOKEN -1 #define ERROR_TOKEN 1 diff --git a/ext/racc/cparse/extconf.rb b/ext/racc/cparse/extconf.rb index 6e82d5af..ffec1f9d 100644 --- a/ext/racc/cparse/extconf.rb +++ b/ext/racc/cparse/extconf.rb @@ -2,5 +2,7 @@ # require 'mkmf' +require_relative '../../../lib/racc/info' +$defs << "-D""RACC_INFO_VERSION=#{Racc::VERSION}" create_makefile 'racc/cparse'