@@ -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 \
@@ -672,7 +669,7 @@ test-v8: v8 ## Runs the V8 test suite on deps/v8.
672
669
--mode=$(BUILDTYPE_LOWER ) $(V8_TEST_OPTIONS ) \
673
670
mjsunit cctest debugger inspector message preparser \
674
671
$(TAP_V8 )
675
- @echo Testing hash seed
672
+ $( info Testing hash seed)
676
673
$(MAKE ) test-hash-seed
677
674
678
675
test-v8-intl : v8
@@ -692,9 +689,8 @@ test-v8-all: test-v8 test-v8-intl test-v8-benchmarks test-v8-updates
692
689
# runs all v8 tests
693
690
else
694
691
test-v8 test-v8-intl test-v8-benchmarks test-v8-all :
695
- @echo " Testing v8 is not available through the source tarball."
696
- @echo " Use the git repo instead:" \
697
- " $ git clone https://github.com/nodejs/node.git"
692
+ $(warning Testing V8 is not available through the source tarball.)
693
+ $(warning Use the git repo instead: $$ git clone https://github.com/nodejs/node.git)
698
694
endif
699
695
700
696
apidoc_dirs = out/doc out/doc/api out/doc/api/assets
@@ -929,14 +925,13 @@ MACOSOUTDIR=out/macos
929
925
930
926
ifeq ($(SKIP_XZ ) , 1)
931
927
check-xz :
932
- @echo " SKIP_XZ=1 supplied, skipping .tar.xz creation"
928
+ $( info SKIP_XZ=1 supplied, skipping .tar.xz creation)
933
929
else
934
930
ifeq ($(HAS_XZ ) , 1)
935
931
check-xz :
936
932
else
937
933
check-xz :
938
- @echo " No xz command, cannot continue"
939
- @exit 1
934
+ $(error No xz command, cannot continue)
940
935
endif
941
936
endif
942
937
@@ -1169,12 +1164,9 @@ ifeq ($(XZ), 1)
1169
1164
endif
1170
1165
1171
1166
.PHONY : bench-all
1172
- bench-all : bench-addons-build
1173
- @echo " Please use benchmark/run.js or benchmark/compare.js to run the benchmarks."
1174
-
1175
1167
.PHONY : bench
1176
- bench : bench-addons-build
1177
- @echo " Please use benchmark/run.js or benchmark/compare.js to run the benchmarks."
1168
+ bench bench-all : bench-addons-build
1169
+ $( warning Please use benchmark/run.js or benchmark/compare.js to run the benchmarks.)
1178
1170
1179
1171
# Build required addons for benchmark before running it.
1180
1172
.PHONY : bench-addons-build
@@ -1198,7 +1190,7 @@ lint-md-clean:
1198
1190
1199
1191
.PHONY : lint-md-build
1200
1192
lint-md-build :
1201
- $(warning " Deprecated no-op target 'lint-md-build'" )
1193
+ $(warning Deprecated no-op target 'lint-md-build')
1202
1194
1203
1195
ifeq ("$(wildcard tools/.mdlintstamp) ","")
1204
1196
LINT_MD_NEWER =
@@ -1213,7 +1205,7 @@ LINT_MD_FILES = $(shell $(FIND) $(LINT_MD_TARGETS) -type f \
1213
1205
run-lint-md = tools/lint-md.js -q -f --no-stdout $(LINT_MD_FILES )
1214
1206
# Lint all changed markdown files maintained by us
1215
1207
tools/.mdlintstamp : $(LINT_MD_FILES )
1216
- @echo " Running Markdown linter..."
1208
+ $( info Running Markdown linter...)
1217
1209
@$(call available-node,$(run-lint-md ) )
1218
1210
@touch $@
1219
1211
@@ -1244,7 +1236,7 @@ lint-js:
1244
1236
fi
1245
1237
1246
1238
jslint : lint-js
1247
- @echo " Please use lint-js instead of jslint"
1239
+ $( warning Please use lint-js instead of jslint)
1248
1240
1249
1241
run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \
1250
1242
--report-unused-disable-directives --ext=.js,.mjs,.md -f tap \
@@ -1253,11 +1245,11 @@ run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \
1253
1245
.PHONY : lint-js-ci
1254
1246
# On the CI the output is emitted in the TAP format.
1255
1247
lint-js-ci :
1256
- @echo " Running JS linter..."
1248
+ $( info Running JS linter...)
1257
1249
@$(call available-node,$(run-lint-js-ci ) )
1258
1250
1259
1251
jslint-ci : lint-js-ci
1260
- @echo " Please use lint-js-ci instead of jslint-ci"
1252
+ $( warning Please use lint-js-ci instead of jslint-ci)
1261
1253
1262
1254
LINT_CPP_ADDON_DOC_FILES_GLOB = test/addons/??_*/*.cc test/addons/??_*/*.h
1263
1255
LINT_CPP_ADDON_DOC_FILES = $(wildcard $(LINT_CPP_ADDON_DOC_FILES_GLOB ) )
@@ -1314,15 +1306,15 @@ CLANG_FORMAT_START ?= HEAD
1314
1306
# $ CLANG_FORMAT_START=master make format-cpp
1315
1307
format-cpp : # # Format C++ diff from $CLANG_FORMAT_START to current changes
1316
1308
ifneq ("","$(wildcard tools/clang-format/node_modules/) ")
1317
- @echo " Formatting C++ diff from $(CLANG_FORMAT_START).."
1309
+ $(info Formatting C++ diff from $(CLANG_FORMAT_START)..)
1318
1310
@$(PYTHON) tools/clang-format/node_modules/.bin/git-clang-format \
1319
1311
--binary=tools/clang-format/node_modules/.bin/clang-format \
1320
1312
--style=file \
1321
1313
$(CLANG_FORMAT_START) -- \
1322
1314
$(LINT_CPP_FILES)
1323
1315
else
1324
- @echo " clang-format is not installed."
1325
- @echo " To install (requires internet access) run: $ make format-cpp-build"
1316
+ $(info clang-format is not installed.)
1317
+ $(info To install (requires internet access) run: $$ make format-cpp-build)
1326
1318
endif
1327
1319
1328
1320
ifeq ($(V ) ,1)
@@ -1335,7 +1327,7 @@ endif
1335
1327
lint-cpp : tools/.cpplintstamp
1336
1328
1337
1329
tools/.cpplintstamp : $(LINT_CPP_FILES )
1338
- @echo " Running C++ linter..."
1330
+ $( info Running C++ linter...)
1339
1331
@$(PYTHON ) tools/cpplint.py $(CPPLINT_QUIET ) $?
1340
1332
@$(PYTHON ) tools/checkimports.py $?
1341
1333
@touch $@
@@ -1344,19 +1336,19 @@ tools/.cpplintstamp: $(LINT_CPP_FILES)
1344
1336
lint-addon-docs : tools/.doclintstamp
1345
1337
1346
1338
tools/.doclintstamp : test/addons/.docbuildstamp
1347
- @echo " Running C++ linter on addon docs..."
1339
+ $( info Running C++ linter on addon docs...)
1348
1340
@$(PYTHON ) tools/cpplint.py $(CPPLINT_QUIET ) --filter=$(ADDON_DOC_LINT_FLAGS ) \
1349
1341
$(LINT_CPP_ADDON_DOC_FILES_GLOB )
1350
1342
@touch $@
1351
1343
1352
1344
cpplint : lint-cpp
1353
- @echo " Please use lint-cpp instead of cpplint"
1345
+ $( warning Please use lint-cpp instead of cpplint)
1354
1346
1355
1347
.PHONY : lint-py-build
1356
1348
# python -m pip install flake8
1357
1349
# Try with '--system' is to overcome systems that blindly set '--user'
1358
1350
lint-py-build :
1359
- @echo " Pip installing flake8 linter on $( shell $( PYTHON) --version) ..."
1351
+ $( info Pip installing flake8 linter on $(shell $(PYTHON ) --version) ...)
1360
1352
$(PYTHON ) -m pip install --upgrade -t tools/pip/site-packages flake8 || \
1361
1353
$(PYTHON ) -m pip install --upgrade --system -t tools/pip/site-packages flake8
1362
1354
@@ -1368,8 +1360,8 @@ lint-py:
1368
1360
PYTHONPATH=tools/pip $(PYTHON ) -m flake8 --count --show-source --statistics .
1369
1361
else
1370
1362
lint-py :
1371
- @echo " Python linting with flake8 is not avalible"
1372
- @echo " Run 'make lint-py-build'"
1363
+ $( warning Python linting with flake8 is not avalible)
1364
+ $( warning Run 'make lint-py-build')
1373
1365
endif
1374
1366
1375
1367
.PHONY : lint
@@ -1395,12 +1387,9 @@ lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs
1395
1387
exit 1 ; \
1396
1388
fi
1397
1389
else
1398
- lint :
1399
- @echo " Linting is not available through the source tarball."
1400
- @echo " Use the git repo instead:" \
1401
- " $ git clone https://github.com/nodejs/node.git"
1402
-
1403
- lint-ci : lint
1390
+ lint lint-ci :
1391
+ $(info Linting is not available through the source tarball.)
1392
+ $(info Use the git repo instead: $$ git clone https://github.com/nodejs/node.git)
1404
1393
endif
1405
1394
1406
1395
.PHONY : lint-clean
@@ -1420,6 +1409,5 @@ gen-openssl: ## Generate platform dependent openssl files (requires docker)
1420
1409
$(DOCKER_COMMAND ) node-openssl-builder make -C deps/openssl/config
1421
1410
else
1422
1411
gen-openssl :
1423
- @echo " No docker command, cannot continue"
1424
- @exit 1
1412
+ $(error No docker command, cannot continue)
1425
1413
endif
0 commit comments