Skip to content

Commit

Permalink
Fix for Objective-J build breaking with the removal of resolve_flags.
Browse files Browse the repository at this point in the history
Closes #117.

Reviewed by me.
  • Loading branch information
Francisco Ryan Tolmasky I committed May 8, 2009
1 parent 4f024a0 commit bda4379
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Objective-J/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ end

file_d $RHINO_FILE => Files do |t|
flags = platform_flags(ObjectiveJ::Platform::Rhino, ObjectiveJ::Platform::ObjJ)
flags['RHINO'] = ''
flags += ' -DRHINO'

build_product(t.name, flags)
end
Expand All @@ -50,12 +50,12 @@ file_d $LICENSE_PRODUCT => [$LICENSE_FILE] do
end

def platform_flags(*platforms)
return { 'PLATFORMS' => ('"[' + platforms.uniq.map { |platform| '\"' + platform + '\"' }.join(', ') + ']"') }
return '-DPLATFORMS="[' + platforms.uniq.map { |platform| '\"' + platform + '\"' }.join(', ') + ']"'
end

def build_product(path, flags)

IO.popen("gcc #{resolve_flags(flags)} -E -x c -P -", "w+") do |preprocessor|
IO.popen("gcc #{flags} -E -x c -P -", "w+") do |preprocessor|

Files.select { |name| name.match(/\.js$/) }.each do |fileName|
preprocessor.puts IO.read(fileName)
Expand Down

0 comments on commit bda4379

Please sign in to comment.