@@ -123,7 +123,7 @@ $(NODE_G_EXE): config.gypi out/Debug/build.ninja
123
123
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$( NODE_EXE) $@ ; fi
124
124
else
125
125
$(NODE_EXE ) $(NODE_G_EXE ) :
126
- echo This Makefile currently only supports building with ' make' or ' ninja'
126
+ $( warning This Makefile currently only supports building with 'make' or 'ninja')
127
127
endif
128
128
endif
129
129
@@ -133,12 +133,9 @@ CONFIG_FLAGS += --debug
133
133
endif
134
134
135
135
.PHONY : with-code-cache
136
- with-code-cache :
137
- echo " 'with-code-cache' target is a noop"
138
-
139
136
.PHONY : test-code-cache
140
- test -code-cache: with -code-cache
141
- echo " 'test-code-cache ' target is a noop"
137
+ with -code-cache test -code-cache:
138
+ $( warning ' $@ ' target is a noop)
142
139
143
140
out/Makefile : config.gypi common.gypi node.gyp \
144
141
deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
@@ -468,7 +465,7 @@ benchmark/napi/.buildstamp: $(ADDONS_PREREQS) \
468
465
469
466
.PHONY : clear-stalled
470
467
clear-stalled :
471
- @echo " Clean up any leftover processes but don't error if found."
468
+ $( info Clean up any leftover processes but don't error if found.)
472
469
ps awwx | grep Release/node | grep -v grep | cat
473
470
@PS_OUT=` ps awwx | grep Release/node | grep -v grep | awk ' {print $$1}' ` ; \
474
471
if [ " $$ {PS_OUT}" ]; then \
@@ -519,7 +516,7 @@ test-ci-js: | clear-stalled
519
516
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) -p tap --logfile test.tap \
520
517
--mode=$(BUILDTYPE_LOWER ) --flaky-tests=$(FLAKY_TESTS ) \
521
518
$(TEST_CI_ARGS ) $(CI_JS_SUITES )
522
- @echo " Clean up any leftover processes, error if found."
519
+ $( info Clean up any leftover processes, error if found.)
523
520
ps awwx | grep Release/node | grep -v grep | cat
524
521
@PS_OUT=` ps awwx | grep Release/node | grep -v grep | awk ' {print $$1}' ` ; \
525
522
if [ " $$ {PS_OUT}" ]; then \
@@ -535,7 +532,7 @@ test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tes
535
532
--mode=$(BUILDTYPE_LOWER ) --flaky-tests=$(FLAKY_TESTS ) \
536
533
$(TEST_CI_ARGS ) $(CI_JS_SUITES ) $(CI_NATIVE_SUITES ) $(CI_DOC )
537
534
out/Release/embedtest ' require("./test/embedding/test-embedding.js")'
538
- @echo " Clean up any leftover processes, error if found."
535
+ $( info Clean up any leftover processes, error if found.)
539
536
ps awwx | grep Release/node | grep -v grep | cat
540
537
@PS_OUT=` ps awwx | grep Release/node | grep -v grep | awk ' {print $$1}' ` ; \
541
538
if [ " $$ {PS_OUT}" ]; then \
@@ -671,7 +668,7 @@ test-v8: v8 ## Runs the V8 test suite on deps/v8.
671
668
deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH ) $(V8_TEST_OPTIONS ) \
672
669
mjsunit cctest debugger inspector message preparser \
673
670
$(TAP_V8 )
674
- @echo Testing hash seed
671
+ $( info Testing hash seed)
675
672
$(MAKE ) test-hash-seed
676
673
677
674
test-v8-intl : v8
@@ -691,9 +688,8 @@ test-v8-all: test-v8 test-v8-intl test-v8-benchmarks test-v8-updates
691
688
# runs all v8 tests
692
689
else
693
690
test-v8 test-v8-intl test-v8-benchmarks test-v8-all :
694
- @echo " Testing v8 is not available through the source tarball."
695
- @echo " Use the git repo instead:" \
696
- " $ git clone https://github.com/nodejs/node.git"
691
+ $(warning Testing V8 is not available through the source tarball.)
692
+ $(warning Use the git repo instead: $$ git clone https://github.com/nodejs/node.git)
697
693
endif
698
694
699
695
apidoc_dirs = out/doc out/doc/api out/doc/api/assets
@@ -928,14 +924,13 @@ MACOSOUTDIR=out/macos
928
924
929
925
ifeq ($(SKIP_XZ ) , 1)
930
926
check-xz :
931
- @echo " SKIP_XZ=1 supplied, skipping .tar.xz creation"
927
+ $( info SKIP_XZ=1 supplied, skipping .tar.xz creation)
932
928
else
933
929
ifeq ($(HAS_XZ ) , 1)
934
930
check-xz :
935
931
else
936
932
check-xz :
937
- @echo " No xz command, cannot continue"
938
- @exit 1
933
+ $(error No xz command, cannot continue)
939
934
endif
940
935
endif
941
936
@@ -1168,12 +1163,9 @@ ifeq ($(XZ), 1)
1168
1163
endif
1169
1164
1170
1165
.PHONY : bench-all
1171
- bench-all : bench-addons-build
1172
- @echo " Please use benchmark/run.js or benchmark/compare.js to run the benchmarks."
1173
-
1174
1166
.PHONY : bench
1175
- bench : bench-addons-build
1176
- @echo " Please use benchmark/run.js or benchmark/compare.js to run the benchmarks."
1167
+ bench bench-all : bench-addons-build
1168
+ $( warning Please use benchmark/run.js or benchmark/compare.js to run the benchmarks.)
1177
1169
1178
1170
# Build required addons for benchmark before running it.
1179
1171
.PHONY : bench-addons-build
@@ -1197,7 +1189,7 @@ lint-md-clean:
1197
1189
1198
1190
.PHONY : lint-md-build
1199
1191
lint-md-build :
1200
- $(warning " Deprecated no-op target 'lint-md-build'" )
1192
+ $(warning Deprecated no-op target 'lint-md-build')
1201
1193
1202
1194
ifeq ("$(wildcard tools/.mdlintstamp) ","")
1203
1195
LINT_MD_NEWER =
@@ -1212,7 +1204,7 @@ LINT_MD_FILES = $(shell $(FIND) $(LINT_MD_TARGETS) -type f \
1212
1204
run-lint-md = tools/lint-md.js -q -f --no-stdout $(LINT_MD_FILES )
1213
1205
# Lint all changed markdown files maintained by us
1214
1206
tools/.mdlintstamp : $(LINT_MD_FILES )
1215
- @echo " Running Markdown linter..."
1207
+ $( info Running Markdown linter...)
1216
1208
@$(call available-node,$(run-lint-md ) )
1217
1209
@touch $@
1218
1210
@@ -1243,7 +1235,7 @@ lint-js:
1243
1235
fi
1244
1236
1245
1237
jslint : lint-js
1246
- @echo " Please use lint-js instead of jslint"
1238
+ $( warning Please use lint-js instead of jslint)
1247
1239
1248
1240
run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \
1249
1241
--report-unused-disable-directives --ext=.js,.mjs,.md -f tap \
@@ -1252,11 +1244,11 @@ run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \
1252
1244
.PHONY : lint-js-ci
1253
1245
# On the CI the output is emitted in the TAP format.
1254
1246
lint-js-ci :
1255
- @echo " Running JS linter..."
1247
+ $( info Running JS linter...)
1256
1248
@$(call available-node,$(run-lint-js-ci ) )
1257
1249
1258
1250
jslint-ci : lint-js-ci
1259
- @echo " Please use lint-js-ci instead of jslint-ci"
1251
+ $( warning Please use lint-js-ci instead of jslint-ci)
1260
1252
1261
1253
LINT_CPP_ADDON_DOC_FILES_GLOB = test/addons/??_*/*.cc test/addons/??_*/*.h
1262
1254
LINT_CPP_ADDON_DOC_FILES = $(wildcard $(LINT_CPP_ADDON_DOC_FILES_GLOB ) )
@@ -1313,15 +1305,15 @@ CLANG_FORMAT_START ?= HEAD
1313
1305
# $ CLANG_FORMAT_START=master make format-cpp
1314
1306
format-cpp : # # Format C++ diff from $CLANG_FORMAT_START to current changes
1315
1307
ifneq ("","$(wildcard tools/clang-format/node_modules/) ")
1316
- @echo " Formatting C++ diff from $(CLANG_FORMAT_START).."
1308
+ $(info Formatting C++ diff from $(CLANG_FORMAT_START)..)
1317
1309
@$(PYTHON) tools/clang-format/node_modules/.bin/git-clang-format \
1318
1310
--binary=tools/clang-format/node_modules/.bin/clang-format \
1319
1311
--style=file \
1320
1312
$(CLANG_FORMAT_START) -- \
1321
1313
$(LINT_CPP_FILES)
1322
1314
else
1323
- @echo " clang-format is not installed."
1324
- @echo " To install (requires internet access) run: $ make format-cpp-build"
1315
+ $(info clang-format is not installed.)
1316
+ $(info To install (requires internet access) run: $$ make format-cpp-build)
1325
1317
endif
1326
1318
1327
1319
ifeq ($(V ) ,1)
@@ -1334,7 +1326,7 @@ endif
1334
1326
lint-cpp : tools/.cpplintstamp
1335
1327
1336
1328
tools/.cpplintstamp : $(LINT_CPP_FILES )
1337
- @echo " Running C++ linter..."
1329
+ $( info Running C++ linter...)
1338
1330
@$(PYTHON ) tools/cpplint.py $(CPPLINT_QUIET ) $?
1339
1331
@$(PYTHON ) tools/checkimports.py $?
1340
1332
@touch $@
@@ -1343,19 +1335,19 @@ tools/.cpplintstamp: $(LINT_CPP_FILES)
1343
1335
lint-addon-docs : tools/.doclintstamp
1344
1336
1345
1337
tools/.doclintstamp : test/addons/.docbuildstamp
1346
- @echo " Running C++ linter on addon docs..."
1338
+ $( info Running C++ linter on addon docs...)
1347
1339
@$(PYTHON ) tools/cpplint.py $(CPPLINT_QUIET ) --filter=$(ADDON_DOC_LINT_FLAGS ) \
1348
1340
$(LINT_CPP_ADDON_DOC_FILES_GLOB )
1349
1341
@touch $@
1350
1342
1351
1343
cpplint : lint-cpp
1352
- @echo " Please use lint-cpp instead of cpplint"
1344
+ $( warning Please use lint-cpp instead of cpplint)
1353
1345
1354
1346
.PHONY : lint-py-build
1355
1347
# python -m pip install flake8
1356
1348
# Try with '--system' is to overcome systems that blindly set '--user'
1357
1349
lint-py-build :
1358
- @echo " Pip installing flake8 linter on $( shell $( PYTHON) --version) ..."
1350
+ $( info Pip installing flake8 linter on $(shell $(PYTHON ) --version) ...)
1359
1351
$(PYTHON ) -m pip install --upgrade -t tools/pip/site-packages flake8 || \
1360
1352
$(PYTHON ) -m pip install --upgrade --system -t tools/pip/site-packages flake8
1361
1353
@@ -1367,8 +1359,8 @@ lint-py:
1367
1359
PYTHONPATH=tools/pip $(PYTHON ) -m flake8 --count --show-source --statistics .
1368
1360
else
1369
1361
lint-py :
1370
- @echo " Python linting with flake8 is not avalible"
1371
- @echo " Run 'make lint-py-build'"
1362
+ $( warning Python linting with flake8 is not avalible)
1363
+ $( warning Run 'make lint-py-build')
1372
1364
endif
1373
1365
1374
1366
.PHONY : lint
@@ -1394,12 +1386,9 @@ lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs
1394
1386
exit 1 ; \
1395
1387
fi
1396
1388
else
1397
- lint :
1398
- @echo " Linting is not available through the source tarball."
1399
- @echo " Use the git repo instead:" \
1400
- " $ git clone https://github.com/nodejs/node.git"
1401
-
1402
- lint-ci : lint
1389
+ lint lint-ci :
1390
+ $(info Linting is not available through the source tarball.)
1391
+ $(info Use the git repo instead: $$ git clone https://github.com/nodejs/node.git)
1403
1392
endif
1404
1393
1405
1394
.PHONY : lint-clean
@@ -1419,6 +1408,5 @@ gen-openssl: ## Generate platform dependent openssl files (requires docker)
1419
1408
$(DOCKER_COMMAND ) node-openssl-builder make -C deps/openssl/config
1420
1409
else
1421
1410
gen-openssl :
1422
- @echo " No docker command, cannot continue"
1423
- @exit 1
1411
+ $(error No docker command, cannot continue)
1424
1412
endif
0 commit comments