use absoluate paths in Makefile to prevent -jN chaos when using bsdmake. released ngx_openresty 1.0.4.2rc11.

This commit is contained in:
agentzh (章亦春)
2011-08-08 09:27:06 +08:00
parent dd2d1d04b8
commit 5aa4947cb1
3 changed files with 106 additions and 103 deletions

15
util/configure vendored
View File

@ -14,6 +14,9 @@ sub usage ($);
my (@make_cmds, @make_install_cmds);
my $root_dir = `pwd`;
chomp $root_dir;
my $OS = $^O;
my $ngx_dir;
@ -217,10 +220,10 @@ my $cmd = "./configure --prefix=$ngx_prefix"
shell $cmd, $dry_run;
push @make_cmds, "cd build/$ngx_dir && "
push @make_cmds, "cd $root_dir/build/$ngx_dir && "
. "\$(MAKE)";
push @make_install_cmds, "cd build/$ngx_dir && "
push @make_install_cmds, "cd $root_dir/build/$ngx_dir && "
. "\$(MAKE) install DESTDIR=\$(DESTDIR)";
cd '../..'; # to the root
@ -427,10 +430,10 @@ sub build_resty_opts {
shell "${make} install$extra_opts PREFIX=$luajit_prefix DESTDIR=$luajit_root", $dry_run;
push @make_cmds, "cd build/$luajit_src && "
push @make_cmds, "cd $root_dir/build/$luajit_src && "
. "\$(MAKE)$extra_opts PREFIX=$luajit_prefix";
push @make_install_cmds, "cd build/$luajit_src && "
push @make_install_cmds, "cd $root_dir/build/$luajit_src && "
. "\$(MAKE) install$extra_opts PREFIX=$luajit_prefix DESTDIR=\$(DESTDIR)";
env LUAJIT_LIB => "$luajit_root$luajit_prefix/lib";
@ -472,9 +475,9 @@ sub build_resty_opts {
env LUA_LIB => "$lua_root$lua_prefix/lib";
env LUA_INC => "$lua_root$lua_prefix/include";
push @make_cmds, "cd build/$lua_src && \$(MAKE)$extra_opts $platform";
push @make_cmds, "cd $root_dir/build/$lua_src && \$(MAKE)$extra_opts $platform";
push @make_install_cmds, "cd build/$lua_src && "
push @make_install_cmds, "cd $root_dir/build/$lua_src && "
. "\$(MAKE) install$extra_opts INSTALL_TOP=\$(DESTDIR)$lua_prefix";
cd '..';