Browse Source

WAF builds in out/ instead of build/

Ryan Dahl 14 years ago
parent
commit
a7300c8297
  1. 1
      .gitignore
  2. 58
      Makefile
  3. 4
      test/simple/test-executable-path.js
  4. 4
      tools/test.py
  5. 20
      wscript

1
.gitignore

@ -12,7 +12,6 @@ node_g
/.project /.project
/.cproject /.cproject
/build
/out /out
# various stuff that VC++ produces/uses # various stuff that VC++ produces/uses

58
Makefile

@ -11,8 +11,8 @@ web_root = ryan@nodejs.org:~/web/nodejs.org/
export NODE_MAKE := $(MAKE) export NODE_MAKE := $(MAKE)
all: program all: program
@-[ -f build/Release/node ] && ls -lh build/Release/node @-[ -f out/Release/node ] && ls -lh out/Release/node
@-[ -f build/Debug/node_g ] && ls -lh build/Debug/node_g @-[ -f out/Debug/node_g ] && ls -lh out/Debug/node_g
all-progress: all-progress:
@$(WAF) -p build @$(WAF) -p build
@ -265,51 +265,51 @@ test-uv-debug: all
NODE_USE_UV=1 python tools/test.py --mode=debug $(UVTEST) NODE_USE_UV=1 python tools/test.py --mode=debug $(UVTEST)
build/Release/node: all out/Release/node: all
apidoc_sources = $(wildcard doc/api/*.markdown) apidoc_sources = $(wildcard doc/api/*.markdown)
apidocs = $(addprefix build/,$(apidoc_sources:.markdown=.html)) apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html))
apidoc_dirs = build/doc build/doc/api/ build/doc/api/assets apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets
apiassets = $(subst api_assets,api/assets,$(addprefix build/,$(wildcard doc/api_assets/*))) apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
website_files = \ website_files = \
build/doc/index.html \ out/doc/index.html \
build/doc/v0.4_announcement.html \ out/doc/v0.4_announcement.html \
build/doc/cla.html \ out/doc/cla.html \
build/doc/sh_main.js \ out/doc/sh_main.js \
build/doc/sh_javascript.min.js \ out/doc/sh_javascript.min.js \
build/doc/sh_vim-dark.css \ out/doc/sh_vim-dark.css \
build/doc/logo.png \ out/doc/logo.png \
build/doc/sponsored.png \ out/doc/sponsored.png \
build/doc/favicon.ico \ out/doc/favicon.ico \
build/doc/pipe.css out/doc/pipe.css
doc: build/Release/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) doc: out/Release/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs)
$(apidoc_dirs): $(apidoc_dirs):
mkdir -p $@ mkdir -p $@
build/doc/api/assets/%: doc/api_assets/% build/doc/api/assets/ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
cp $< $@ cp $< $@
build/doc/%: doc/% out/doc/%: doc/%
cp $< $@ cp $< $@
build/doc/api/%.html: doc/api/%.markdown build/Release/node $(apidoc_dirs) $(apiassets) tools/doctool/doctool.js out/doc/api/%.html: doc/api/%.markdown out/Release/node $(apidoc_dirs) $(apiassets) tools/doctool/doctool.js
build/Release/node tools/doctool/doctool.js doc/template.html $< > $@ out/Release/node tools/doctool/doctool.js doc/template.html $< > $@
build/doc/%: out/doc/%:
website-upload: doc website-upload: doc
scp -r build/doc/* $(web_root) scp -r out/doc/* $(web_root)
docopen: build/doc/api/all.html docopen: out/doc/api/all.html
-google-chrome build/doc/api/all.html -google-chrome out/doc/api/all.html
docclean: docclean:
-rm -rf build/doc -rm -rf out/doc
clean: clean:
$(WAF) clean $(WAF) clean
@ -317,7 +317,7 @@ clean:
distclean: docclean distclean: docclean
-find tools -name "*.pyc" | xargs rm -f -find tools -name "*.pyc" | xargs rm -f
-rm -rf build/ node node_g -rm -rf out/ node node_g
check: check:
@tools/waf-light check @tools/waf-light check
@ -330,7 +330,7 @@ dist: doc
git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf - git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
mkdir -p $(TARNAME)/doc mkdir -p $(TARNAME)/doc
cp doc/node.1 $(TARNAME)/doc/node.1 cp doc/node.1 $(TARNAME)/doc/node.1
cp -r build/doc/api $(TARNAME)/doc/api cp -r out/doc/api $(TARNAME)/doc/api
rm -rf $(TARNAME)/deps/v8/test # too big rm -rf $(TARNAME)/deps/v8/test # too big
rm -rf $(TARNAME)/doc/logos # too big rm -rf $(TARNAME)/doc/logos # too big
tar -cf $(TARNAME).tar $(TARNAME) tar -cf $(TARNAME).tar $(TARNAME)

4
test/simple/test-executable-path.js

@ -26,9 +26,9 @@ var path = require('path');
var isDebug = (process.version.indexOf('debug') >= 0); var isDebug = (process.version.indexOf('debug') >= 0);
var debugPath = path.normalize(path.join(__dirname, '..', '..', var debugPath = path.normalize(path.join(__dirname, '..', '..',
'build', 'Debug', 'node')); 'out', 'Debug', 'node'));
var defaultPath = path.normalize(path.join(__dirname, '..', '..', var defaultPath = path.normalize(path.join(__dirname, '..', '..',
'build', 'Release', 'node')); 'out', 'Release', 'node'));
console.error('debugPath: ' + debugPath); console.error('debugPath: ' + debugPath);
console.error('defaultPath: ' + defaultPath); console.error('defaultPath: ' + defaultPath);

4
tools/test.py

@ -663,9 +663,9 @@ class Context(object):
def GetVm(self, mode): def GetVm(self, mode):
if mode == 'debug': if mode == 'debug':
name = 'build/Debug/node' name = 'out/Debug/node'
else: else:
name = 'build/Release/node' name = 'out/Release/node'
if utils.IsWindows() and not name.endswith('.exe'): if utils.IsWindows() and not name.endswith('.exe'):
name = os.path.abspath(name + '.exe') name = os.path.abspath(name + '.exe')

20
wscript

@ -38,7 +38,7 @@ sys.path.append(sys.argv[0] + '/tools');
import js2c import js2c
srcdir = '.' srcdir = '.'
blddir = 'build' blddir = 'out'
supported_archs = ('arm', 'ia32', 'x64') # 'mips' supported by v8, but not node supported_archs = ('arm', 'ia32', 'x64') # 'mips' supported by v8, but not node
jobs=1 jobs=1
@ -904,7 +904,7 @@ def build(bld):
bld.env.append_value('LINKFLAGS', '-Wl,--export-all-symbols') bld.env.append_value('LINKFLAGS', '-Wl,--export-all-symbols')
bld.env.append_value('LINKFLAGS', '-Wl,--out-implib,default/libnode.dll.a') bld.env.append_value('LINKFLAGS', '-Wl,--out-implib,default/libnode.dll.a')
bld.env.append_value('LINKFLAGS', '-Wl,--output-def,default/libnode.def') bld.env.append_value('LINKFLAGS', '-Wl,--output-def,default/libnode.def')
bld.install_files('${LIBDIR}', "build/Release/libnode.*") bld.install_files('${LIBDIR}', "out/Release/libnode.*")
if (sys.platform.startswith("win32")): if (sys.platform.startswith("win32")):
# Static libgcc # Static libgcc
@ -971,15 +971,15 @@ def shutdown():
elif not Options.commands['clean']: elif not Options.commands['clean']:
if sys.platform.startswith("win32"): if sys.platform.startswith("win32"):
if os.path.exists('build/Release/node.exe'): if os.path.exists('out/Release/node.exe'):
os.system('cp build/Release/node.exe .') os.system('cp out/Release/node.exe .')
if os.path.exists('build/Debug/node_g.exe'): if os.path.exists('out/Debug/node_g.exe'):
os.system('cp build/Debug/node_g.exe .') os.system('cp out/Debug/node_g.exe .')
else: else:
if os.path.exists('build/Release/node') and not os.path.exists('node'): if os.path.exists('out/Release/node') and not os.path.exists('node'):
os.symlink('build/Release/node', 'node') os.symlink('out/Release/node', 'node')
if os.path.exists('build/Debug/node_g') and not os.path.exists('node_g'): if os.path.exists('out/Debug/node_g') and not os.path.exists('node_g'):
os.symlink('build/Debug/node_g', 'node_g') os.symlink('out/Debug/node_g', 'node_g')
else: else:
if sys.platform.startswith("win32"): if sys.platform.startswith("win32"):
if os.path.exists('node.exe'): os.unlink('node.exe') if os.path.exists('node.exe'): os.unlink('node.exe')

Loading…
Cancel
Save