separate_options: allows .args files with multiple lines
authorAlexis Laferrière <alexis.laf@xymus.net>
Sat, 18 Feb 2012 23:30:18 +0000 (18:30 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 12 Apr 2012 19:38:16 +0000 (15:38 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/separate_options.nit

index 37f1a2d..4e33f29 100644 (file)
@@ -24,9 +24,12 @@ redef class ToolContext
 
        fun integrate_separate_options( options : String )
        do
-               separate_options.parse( options.split_with( ' ' ) )
-               if separate_options.rest.length > 0 then
-                       warning( null, "module {self} args file has unknown args: {separate_options.rest.join(", ")}" )
+               for line in options.split do
+                       line = line.strip_extension( "\n" )
+                       separate_options.parse( line.split_with( ' ' ) )
+                       if separate_options.rest.length > 0 then
+                               warning( null, "module {self} args file has unknown args: {separate_options.rest.join(", ")}" )
+                       end
                end
 
                cc_lib_paths.append( opt_cc_lib_paths.value )