Skip to content

Commit db16633

Browse files
st0012nobu
andauthored
Apply suggestions from code review
Co-authored-by: Nobuyoshi Nakada <[email protected]>
1 parent 4cdbbf3 commit db16633

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
@@ -94,15 +94,14 @@ end
9494
task "#{path}.gem" => package_parser_files
9595

9696
desc "Generate all files use racc and kpeg"
97-
task :generate do
98-
unless ENV.key?('BUNDLE_GEMFILE')
97+
task :generate => parsed_files
98+
99+
unless ENV.key?('BUNDLE_GEMFILE')
100+
task :gem_install do
99101
Gem.install 'racc', '> 1.4.10'
100102
Gem.install 'kpeg', '>= 1.3.3'
101103
end
102-
103-
parsed_files.each do |file_name|
104-
Rake::Task[file_name].invoke
105-
end
104+
file parsed_files => :gem_install
106105
end
107106

108107
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)