Skip to content

Commit

Permalink
ngx-build: always use canonicalized paths in the --add-module=DIR opt…
Browse files Browse the repository at this point in the history
…ions.
  • Loading branch information
agentzh committed Mar 10, 2013
1 parent 05f826b commit dc12c5c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ngx-build
Expand Up @@ -3,8 +3,9 @@
use strict;
use warnings;

use File::Spec;
use File::Spec ();
use Getopt::Std;
use Cwd ();

my $cc = $ENV{NGX_BUILD_CC};
my $optimize = $ENV{NGX_BUILD_OPT};
Expand Down Expand Up @@ -58,6 +59,11 @@ if (($1 == 1 && $2 == 1 && $3 >= 4)
@opts = @ARGV;
}

for (@opts) {
# TODO: we can process paths in other options as well
s/^(--add-module=)(\S+)/$1 . Cwd::realpath($2)/ge;
}

push @opts, '--with-poll_module';

if ($dtrace) {
Expand Down

0 comments on commit dc12c5c

Please sign in to comment.