mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-18 12:39:22 +00:00
Fix for Objective-J build breaking with the removal of resolve_flags.
Closes #117. Reviewed by me.
This commit is contained in:
1 parent
4f024a0974
commit
bda437985e
1 file changed
+3
-3
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user