Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…ions.
  • Loading branch information...
commit dc12c5c8cd18e9c5fd0af6a0d32f8a3cf312feb4 1 parent 05f826b
Yichun Zhang authored March 10, 2013

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  ngx-build
8  ngx-build
@@ -3,8 +3,9 @@
3 3
 use strict;
4 4
 use warnings;
5 5
 
6  
-use File::Spec;
  6
+use File::Spec ();
7 7
 use Getopt::Std;
  8
+use Cwd ();
8 9
 
9 10
 my $cc = $ENV{NGX_BUILD_CC};
10 11
 my $optimize = $ENV{NGX_BUILD_OPT};
@@ -58,6 +59,11 @@ if (($1 == 1 && $2 == 1 && $3 >= 4)
58 59
     @opts = @ARGV;
59 60
 }
60 61
 
  62
+for (@opts) {
  63
+    # TODO: we can process paths in other options as well
  64
+    s/^(--add-module=)(\S+)/$1 . Cwd::realpath($2)/ge;
  65
+}
  66
+
61 67
 push @opts, '--with-poll_module';
62 68
 
63 69
 if ($dtrace) {

0 notes on commit dc12c5c

Please sign in to comment.
Something went wrong with that request. Please try again.