GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — build: extract common parts from addon .buildstamp · nodejs/node@d12c9f5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Makefile
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+17-17Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -333,19 +333,26 @@ ADDONS_BINDING_SOURCES := \
333333
$(filter-out test/addons/??_*/*.cc, $(wildcard test/addons/*/*.cc)) \
334334
$(filter-out test/addons/??_*/*.h, $(wildcard test/addons/*/*.h))
335335

336+
ADDONS_PREREQS := config.gypi \
337+
deps/npm/node_modules/node-gyp/package.json tools/build-addons.js \
338+
deps/uv/include/*.h deps/v8/include/*.h \
339+
src/node.h src/node_buffer.h src/node_object_wrap.h src/node_version.h
340+
341+
define run_build_addons
342+
env npm_config_loglevel=$(LOGLEVEL) npm_config_nodedir="$$PWD" \
343+
npm_config_python="$(PYTHON)" $(NODE) "$$PWD/tools/build-addons" \
344+
"$$PWD/deps/npm/node_modules/node-gyp/bin/node-gyp.js" \
345+
$1
346+
touch $2
347+
endef
348+
336349
# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
337350
# Depends on node-gyp package.json so that build-addons is (re)executed when
338351
# node-gyp is updated as part of an npm update.
339-
test/addons/.buildstamp: config.gypi \
340-
deps/npm/node_modules/node-gyp/package.json tools/build-addons.js \
352+
test/addons/.buildstamp: $(ADDONS_PREREQS) \
341353
$(ADDONS_BINDING_GYPS) $(ADDONS_BINDING_SOURCES) \
342-
deps/uv/include/*.h deps/v8/include/*.h \
343-
src/node.h src/node_buffer.h src/node_object_wrap.h src/node_version.h \
344354
test/addons/.docbuildstamp
345-
env npm_config_loglevel=$(LOGLEVEL) npm_config_nodedir="$$PWD" \
346-
npm_config_python="$(PYTHON)" $(NODE) "$$PWD/tools/build-addons" \
347-
"$$PWD/deps/npm/node_modules/node-gyp/bin/node-gyp.js" "$$PWD/test/addons"
348-
touch $@
355+
@$(call run_build_addons,"$$PWD/test/addons",$@)
349356

350357
.PHONY: build-addons
351358
# .buildstamp needs $(NODE_EXE) but cannot depend on it
@@ -366,17 +373,10 @@ ADDONS_NAPI_BINDING_SOURCES := \
366373
$(filter-out test/addons-napi/??_*/*.h, $(wildcard test/addons-napi/*/*.h))
367374

368375
# Implicitly depends on $(NODE_EXE), see the build-addons-napi rule for rationale.
369-
test/addons-napi/.buildstamp: config.gypi \
370-
deps/npm/node_modules/node-gyp/package.json tools/build-addons.js \
376+
test/addons-napi/.buildstamp: $(ADDONS_PREREQS) \
371377
$(ADDONS_NAPI_BINDING_GYPS) $(ADDONS_NAPI_BINDING_SOURCES) \
372-
deps/uv/include/*.h deps/v8/include/*.h \
373-
src/node.h src/node_buffer.h src/node_object_wrap.h src/node_version.h \
374378
src/node_api.h src/node_api_types.h
375-
env npm_config_loglevel=$(LOGLEVEL) npm_config_nodedir="$$PWD" \
376-
npm_config_python="$(PYTHON)" $(NODE) "$$PWD/tools/build-addons" \
377-
"$$PWD/deps/npm/node_modules/node-gyp/bin/node-gyp.js" \
378-
"$$PWD/test/addons-napi"
379-
touch $@
379+
@$(call run_build_addons,"$$PWD/test/addons-napi",$@)
380380

381381
.PHONY: build-addons-napi
382382
# .buildstamp needs $(NODE_EXE) but cannot depend on it

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.