diff --git a/.gitignore b/.gitignore index a29fe374..a7493d6a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ build/ out/ npm-debug.log node_modules/ + # generated by scripts/configure.js options.gypi -.project -addon.node diff --git a/Makefile b/Makefile index 7eb85b2b..44fab19e 100644 --- a/Makefile +++ b/Makefile @@ -39,8 +39,7 @@ plugin: configure node scripts/cleanup.js .PHONY: addon -addon: - node scripts/configure.js +addon: configure node-gyp rebuild .PHONY: _travis @@ -50,6 +49,14 @@ _travis: LLNODE_DEBUG=true \ npm test +# `configure` is run during preinstall. +# This is run by `npm install`. +.PHONY: npm-build +npm-build: + ./gyp_llnode + $(MAKE) -C out/ + node-gyp rebuild + .PHONY: clean clean: $(RM) -r out diff --git a/binding.gyp b/binding.gyp index 4872ceb7..2e1ec4a8 100644 --- a/binding.gyp +++ b/binding.gyp @@ -13,6 +13,7 @@ "targets": [{ "target_name": "addon", + "type": "loadable_module", "sources": [ "src/addon.cc", "src/llnode_module.cc", @@ -26,8 +27,12 @@ "<(lldb_dir)/include", "