Permalink
Browse files

ngx-build: always use canonicalized paths in the --add-module=DIR opt…

…ions.
  • Loading branch information...
1 parent 05f826b commit dc12c5c8cd18e9c5fd0af6a0d32f8a3cf312feb4 @agentzh agentzh committed Mar 10, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 ngx-build
View
8 ngx-build
@@ -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};
@@ -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) {

0 comments on commit dc12c5c

Please sign in to comment.