joyent/node — pull request #2615 by shigeki (2012-01-26 08:53:07+00:00)
Title: build: fix make install and out/doc/api%.html in BUILDTYPE=Debug

It is reported in Japanese NodeJS ML that installing of 0.7.1 with nave is failed.
This is because nave builds and installs node with "./configure --debug ; make; make install" and GYP in 0.7.x only build out/Debug while WAF in 0.6.x build both out/Debug and out/Release.

It might be an issue of nave but I think it is worth to fix this in the node side to be compatible with the build behaviors between 0.6.x and 0.7.x

Before applying this patch, it fails to make install after configure --debug as below

```
# ./configure --debug ; make ; make install
(snip)
make[1]: Entering directory `/home/ohtsu/tmp/github/node/out'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/ohtsu/tmp/github/node/out'
ln -fs out/Debug/node node_g
out/Release/node tools/installer.js ./config.gypi install
make: out/Release/node: Command not found
make: *** [install] Error 127
```

Bfter applying this patch, the Release build is checked before make install and install was completed fine.

````
# ./configure --debug ; make ; make install
(snip)
mkdir -p /usr/local/lib/node/
cp -rf tools/wafadmin /usr/local/lib/node/
cp -rf tools/node-waf /usr/local/bin/node-waf
mkdir -p /usr/local/lib/node_modules/
cp -rf deps/npm /usr/local/lib/node_modules/npm
ln -sf ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
#
```