Skip to content

Commit c931771

Browse files
st0012nobu
andcommitted
Apply suggestions from code review
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
1 parent 0cb0611 commit c931771

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Rakefile

+5-6
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,14 @@ end
9090
task "#{path}.gem" => package_parser_files
9191

9292
desc "Generate all files use racc and kpeg"
93-
task :generate do
94-
unless ENV.key?('BUNDLE_GEMFILE')
93+
task :generate => parsed_files
94+
95+
unless ENV.key?('BUNDLE_GEMFILE')
96+
task :gem_install do
9597
Gem.install 'racc', '> 1.4.10'
9698
Gem.install 'kpeg', '>= 1.3.3'
9799
end
98-
99-
parsed_files.each do |file_name|
100-
Rake::Task[file_name].invoke
101-
end
100+
file parsed_files => :gem_install
102101
end
103102

104103
task :clean do

ext/rdoc/extconf.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Generate all parse files using racc and kpeg. This is not necessary for regular gem installation, but it is when
44
# installing RDoc from the git source. Without this, the generated parse files would not exist and RDoc would not work
5-
system("rake generate") if Dir.exist?(File.join("..", "..", ".git"))
5+
system("rake generate") if File.exist?("../../.git")
66

77
# RDoc doesn't actually have a native extension, but a Makefile needs to exist in order to successfully install the gem
88
require "mkmf"

0 commit comments

Comments
 (0)