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: make ci test addons in test/addons · nodejs/node@944174b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Makefile
  • test/addons
    • .gitignore
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+31-10Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,28 +99,49 @@ test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE)
9999
--directory="$(shell pwd)/test/gc/node_modules/weak" \
100100
--nodedir="$(shell pwd)"
101101

102-
build-addons: $(NODE_EXE)
103-
rm -rf test/addons/doc-*/
102+
# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
103+
test/addons/.docbuildstamp: doc/api/addons.markdown
104+
$(RM) -r test/addons/doc-*/
104105
$(NODE) tools/doc/addon-verify.js
105-
$(foreach dir, \
106-
$(sort $(dir $(wildcard test/addons/*/*.gyp))), \
107-
$(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
108-
--directory="$(shell pwd)/$(dir)" \
109-
--nodedir="$(shell pwd)" && ) echo "build done"
106+
touch $@
107+
108+
ADDONS_BINDING_GYPS := \
109+
$(filter-out test/addons/doc-*/binding.gyp, \
110+
$(wildcard test/addons/*/binding.gyp))
111+
112+
# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
113+
test/addons/.buildstamp: $(ADDONS_BINDING_GYPS) | test/addons/.docbuildstamp
114+
# Cannot use $(wildcard test/addons/*/) here, it's evaluated before
115+
# embedded addons have been generated from the documentation.
116+
for dirname in test/addons/*/; do \
117+
$(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
118+
--directory="$$PWD/$$dirname" \
119+
--nodedir="$$PWD"; \
120+
done
121+
touch $@
122+
123+
# .buildstamp and .docbuildstamp need $(NODE_EXE) but cannot depend on it
124+
# directly because it calls make recursively. The parent make cannot know
125+
# if the subprocess touched anything so it pessimistically assumes that
126+
# .buildstamp and .docbuildstamp are out of date and need a rebuild.
127+
# Just goes to show that recursive make really is harmful...
128+
# TODO(bnoordhuis) Force rebuild after gyp or node-gyp update.
129+
build-addons: $(NODE_EXE) test/addons/.buildstamp
110130

111131
test-gc: all test/gc/node_modules/weak/build/Release/weakref.node
112132
$(PYTHON) tools/test.py --mode=release gc
113133

114-
test-build: all build-addons
134+
test-build: | all build-addons
115135

116136
test-all: test-build test/gc/node_modules/weak/build/Release/weakref.node
117137
$(PYTHON) tools/test.py --mode=debug,release
118138

119139
test-all-valgrind: test-build
120140
$(PYTHON) tools/test.py --mode=debug,release --valgrind
121141

122-
test-ci:
123-
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release message parallel sequential
142+
test-ci: | build-addons
143+
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release \
144+
addons message parallel sequential
124145

125146
test-release: test-build
126147
$(PYTHON) tools/test.py --mode=release
Collapse file

‎test/addons/.gitignore‎

Copy file name to clipboardExpand all lines: test/addons/.gitignore
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.buildstamp
2+
.docbuildstamp
13
Makefile
24
*.Makefile
35
*.mk

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.