|
12 | 12 | use File::Spec;
|
13 | 13 | use Cwd;
|
14 | 14 | use Generators;
|
| 15 | +use Text::ParseWords; |
15 | 16 |
|
16 | 17 | my (%build_structure, %compile_options, @makedry);
|
17 | 18 | my $out_dir = getcwd();
|
@@ -231,7 +232,7 @@ sub removeDuplicates
|
231 | 232 | sub handleCompileLine
|
232 | 233 | {
|
233 | 234 | my ($line, $lineno) = @_;
|
234 |
| - my @parts = split(' ', $line); |
| 235 | + my @parts = shellwords($line); |
235 | 236 | my $sourcefile;
|
236 | 237 | shift(@parts); # ignore cmd
|
237 | 238 | while (my $part = shift @parts) {
|
@@ -265,7 +266,7 @@ sub handleLibLine
|
265 | 266 | my (@objfiles, @lflags, $libout, $part);
|
266 | 267 | # kill cmd and rm 'prefix'
|
267 | 268 | $line =~ s/^rm -f .* && .* rcs //;
|
268 |
| - my @parts = split(' ', $line); |
| 269 | + my @parts = shellwords($line); |
269 | 270 | while ($part = shift @parts) {
|
270 | 271 | if ($part =~ /^-/) {
|
271 | 272 | push(@lflags, $part);
|
@@ -306,7 +307,7 @@ sub handleLinkLine
|
306 | 307 | {
|
307 | 308 | my ($line, $lineno) = @_;
|
308 | 309 | my (@objfiles, @lflags, @libs, $appout, $part);
|
309 |
| - my @parts = split(' ', $line); |
| 310 | + my @parts = shellwords($line); |
310 | 311 | shift(@parts); # ignore cmd
|
311 | 312 | while ($part = shift @parts) {
|
312 | 313 | if ($part =~ /^-IGNORE/) {
|
|
0 commit comments