Fix for Objective-J build breaking with the removal of resolve_flags.

Closes #117.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2009-05-08 12:07:06 -07:00
1 parent 4f024a0974
commit bda437985e
1 file changed
+3 -3
+3 -3
View File
@@ -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
@@ -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)