mirror of https://github.com/nodejs/node.git
Revert "build: fix `make install DESTDIR=/path`"
This reverts commit f80513974e
.
The reverted commit made DESTDIR behave more like we want it to but it was
pointed out in #3489 that it makes life a lot harder for distro package
maintainers.
Those guys and gals already have a hard enough time as it is, let's not make
their jobs even more hellish.
pull/24503/head
parent
7de6eba061
commit
8966480c0e
|
@ -11,7 +11,7 @@ if (cmd !== 'install' && cmd !== 'uninstall') {
|
||||||
|
|
||||||
// Use the built-in config reported by the current process
|
// Use the built-in config reported by the current process
|
||||||
var variables = process.config.variables,
|
var variables = process.config.variables,
|
||||||
node_prefix = dest_dir || variables.node_prefix || '/usr/local';
|
node_prefix = variables.node_prefix || '/usr/local';
|
||||||
|
|
||||||
// Execution queue
|
// Execution queue
|
||||||
var queue = [],
|
var queue = [],
|
||||||
|
@ -27,7 +27,7 @@ function copy(src, dst, callback) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dst = path.join(node_prefix, dst);
|
dst = path.join(dest_dir, node_prefix, dst);
|
||||||
var dir = dst.replace(/\/[^\/]*$/, '/');
|
var dir = dst.replace(/\/[^\/]*$/, '/');
|
||||||
|
|
||||||
// Create directory if hasn't done this yet
|
// Create directory if hasn't done this yet
|
||||||
|
@ -43,7 +43,7 @@ function copy(src, dst, callback) {
|
||||||
// Remove files
|
// Remove files
|
||||||
function remove(files) {
|
function remove(files) {
|
||||||
files.forEach(function(file) {
|
files.forEach(function(file) {
|
||||||
file = path.join(node_prefix, file);
|
file = path.join(dest_dir, node_prefix, file);
|
||||||
queue.push('rm -rf ' + file);
|
queue.push('rm -rf ' + file);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -146,9 +146,9 @@ if (cmd === 'install') {
|
||||||
if (!isSymlink) {
|
if (!isSymlink) {
|
||||||
copy('deps/npm', 'lib/node_modules/npm');
|
copy('deps/npm', 'lib/node_modules/npm');
|
||||||
queue.push('ln -sf ../lib/node_modules/npm/bin/npm-cli.js ' +
|
queue.push('ln -sf ../lib/node_modules/npm/bin/npm-cli.js ' +
|
||||||
path.join(node_prefix, 'bin/npm'));
|
path.join(dest_dir, node_prefix, 'bin/npm'));
|
||||||
queue.push([shebang, '#!' + path.join(node_prefix, 'bin/node'),
|
queue.push([shebang, '#!' + path.join(node_prefix, 'bin/node'),
|
||||||
path.join(node_prefix,
|
path.join(dest_dir, node_prefix,
|
||||||
'lib/node_modules/npm/bin/npm-cli.js')]);
|
'lib/node_modules/npm/bin/npm-cli.js')]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue