| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f3d6198 commit 4bb27a2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,11 +63,17 @@ V ?= 1 | |||
| 63 | 63 | # BUILDTYPE=Debug builds both release and debug builds. If you want to compile | |
| 64 | 64 | # just the debug build, run `make -C out BUILDTYPE=Debug` instead. | |
| 65 | 65 | ifeq ($(BUILDTYPE),Release) | |
| 66 | - all: out/Makefile $(NODE_EXE) | ||
| 66 | + all: out/Makefile $(NODE_EXE) ## Default target, builds node in out/Release/node. | ||
| 67 | 67 | else | |
| 68 | 68 | all: out/Makefile $(NODE_EXE) $(NODE_G_EXE) | |
| 69 | 69 | endif | |
| 70 | 70 | ||
| 71 | + # To add a target to the help, add a double comment (##) on the target line. | ||
| 72 | + help: ## Print help for targets with comments. | ||
| 73 | + @printf "For more targets and info see the comments in the Makefile.\n\n" | ||
| 74 | + @grep -E '^[a-zA-Z0-9._-]+:.*?## .*$$' Makefile | sort | \ | ||
| 75 | + awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' | ||
| 76 | + | ||
| 71 | 77 | # The .PHONY is needed to ensure that we recursively use the out/Makefile | |
| 72 | 78 | # to check for changes. | |
| 73 | 79 | .PHONY: $(NODE_EXE) $(NODE_G_EXE) | |
@@ -94,13 +100,13 @@ out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \ | |||
| 94 | 100 | config.gypi: configure | |
| 95 | 101 | $(error Missing or stale $@, please run ./$<) | |
| 96 | 102 | ||
| 97 | - install: all | ||
| 103 | + install: all ## Installs node into $PREFIX (default=/usr/local). | ||
| 98 | 104 | $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)' | |
| 99 | 105 | ||
| 100 | - uninstall: | ||
| 106 | + uninstall: ## Uninstalls node from $PREFIX (default=/usr/local). | ||
| 101 | 107 | $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)' | |
| 102 | 108 | ||
| 103 | - clean: | ||
| 109 | + clean: ## Remove build artifacts. | ||
| 104 | 110 | $(RM) -r out/Makefile $(NODE_EXE) $(NODE_G_EXE) out/$(BUILDTYPE)/$(NODE_EXE) \ | |
| 105 | 111 | out/$(BUILDTYPE)/node.exp | |
| 106 | 112 | @if [ -d out ]; then find out/ -name '*.o' -o -name '*.a' -o -name '*.d' | xargs $(RM) -r; fi | |
@@ -145,7 +151,7 @@ coverage-clean: | |||
| 145 | 151 | # For C++ coverage reporting, this needs to be run in conjunction with configure | |
| 146 | 152 | # --coverage. html coverage reports will be created under coverage/ | |
| 147 | 153 | ||
| 148 | - coverage: coverage-test | ||
| 154 | + coverage: coverage-test ## Run the tests and generate a coverage report. | ||
| 149 | 155 | ||
| 150 | 156 | coverage-build: all | |
| 151 | 157 | mkdir -p node_modules | |
@@ -205,7 +211,7 @@ v8: | |||
| 205 | 211 | tools/make-v8.sh | |
| 206 | 212 | $(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS) | |
| 207 | 213 | ||
| 208 | - test: all | ||
| 214 | + test: all ## Default test target. Runs default tests, linters, and builds docs. | ||
| 209 | 215 | $(MAKE) -s build-addons | |
| 210 | 216 | $(MAKE) -s build-addons-napi | |
| 211 | 217 | $(MAKE) -s doc-only | |
@@ -373,7 +379,7 @@ test-build: | all build-addons build-addons-napi | |||
| 373 | 379 | ||
| 374 | 380 | test-build-addons-napi: all build-addons-napi | |
| 375 | 381 | ||
| 376 | - test-all: test-build test/gc/build/Release/binding.node | ||
| 382 | + test-all: test-build test/gc/build/Release/binding.node ## Run everything in test/. | ||
| 377 | 383 | $(PYTHON) tools/test.py --mode=debug,release | |
| 378 | 384 | ||
| 379 | 385 | test-all-valgrind: test-build | |
@@ -452,7 +458,7 @@ test-doc: doc-only | |||
| 452 | 458 | test-known-issues: all | |
| 453 | 459 | $(PYTHON) tools/test.py known_issues | |
| 454 | 460 | ||
| 455 | - test-npm: $(NODE_EXE) | ||
| 461 | + test-npm: $(NODE_EXE) ## Run the npm test suite on deps/npm. | ||
| 456 | 462 | $(NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test-node | |
| 457 | 463 | ||
| 458 | 464 | test-npm-publish: $(NODE_EXE) | |
@@ -494,7 +500,7 @@ test-with-async-hooks: | |||
| 494 | 500 | ||
| 495 | 501 | ||
| 496 | 502 | ifneq ("","$(wildcard deps/v8/tools/run-tests.py)") | |
| 497 | - test-v8: v8 | ||
| 503 | + test-v8: v8 ## Runs the V8 test suite on deps/v8. | ||
| 498 | 504 | # note: performs full test unless QUICKCHECK is specified | |
| 499 | 505 | deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \ | |
| 500 | 506 | --mode=$(BUILDTYPE_LOWER) $(V8_TEST_OPTIONS) $(QUICKCHECK_ARG) \ | |
@@ -860,7 +866,7 @@ ifeq ($(XZ), 0) | |||
| 860 | 866 | endif | |
| 861 | 867 | $(RM) $(TARNAME).tar | |
| 862 | 868 | ||
| 863 | - tar: $(TARBALL) | ||
| 869 | + tar: $(TARBALL) ## Create a source tarball. | ||
| 864 | 870 | ||
| 865 | 871 | tar-upload: tar | |
| 866 | 872 | ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" | |
@@ -896,7 +902,7 @@ ifeq ($(XZ), 0) | |||
| 896 | 902 | endif | |
| 897 | 903 | $(RM) $(TARNAME)-headers.tar | |
| 898 | 904 | ||
| 899 | - tar-headers: $(TARBALL)-headers | ||
| 905 | + tar-headers: $(TARBALL)-headers ## Build the node header tarball. | ||
| 900 | 906 | ||
| 901 | 907 | tar-headers-upload: tar-headers | |
| 902 | 908 | ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" | |
@@ -933,7 +939,7 @@ ifeq ($(XZ), 0) | |||
| 933 | 939 | endif | |
| 934 | 940 | $(RM) $(BINARYNAME).tar | |
| 935 | 941 | ||
| 936 | - binary: $(BINARYTAR) | ||
| 942 | + binary: $(BINARYTAR) ## Build release binary tarballs. | ||
| 937 | 943 | ||
| 938 | 944 | binary-upload: binary | |
| 939 | 945 | ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" | |
@@ -984,7 +990,7 @@ bench-dgram: all | |||
| 984 | 990 | ||
| 985 | 991 | bench-all: bench bench-misc bench-array bench-buffer bench-url bench-events bench-dgram bench-util | |
| 986 | 992 | ||
| 987 | - bench: bench-net bench-http bench-fs bench-tls | ||
| 993 | + bench: bench-net bench-http bench-fs bench-tls ## Run node benchmarks. | ||
| 988 | 994 | ||
| 989 | 995 | bench-ci: bench | |
| 990 | 996 | ||
@@ -1110,7 +1116,7 @@ cpplint: lint-cpp | |||
| 1110 | 1116 | @echo "Please use lint-cpp instead of cpplint" | |
| 1111 | 1117 | ||
| 1112 | 1118 | ifneq ("","$(wildcard tools/eslint/)") | |
| 1113 | - lint: | ||
| 1119 | + lint: ## Run JS, C++, MD and doc linters. | ||
| 1114 | 1120 | @EXIT_STATUS=0 ; \ | |
| 1115 | 1121 | $(MAKE) lint-js || EXIT_STATUS=$$? ; \ | |
| 1116 | 1122 | $(MAKE) lint-cpp || EXIT_STATUS=$$? ; \ | |
@@ -1176,6 +1182,7 @@ lint-clean: | |||
| 1176 | 1182 | docclean \ | |
| 1177 | 1183 | docopen \ | |
| 1178 | 1184 | dynamiclib \ | |
| 1185 | + help \ | ||
| 1179 | 1186 | install \ | |
| 1180 | 1187 | install-bin \ | |
| 1181 | 1188 | install-includes \ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments