$(info $(INFO_) dist Produce the release tarball)
$(info $(INFO_) distcheck Check the release tarball)
$(info $(INFO_) help Print this help)
+ $(info $(INFO_) help-list-build-depends List build dependencies (package/program))
+ $(info $(INFO_) help-list-targets List all targets)
+ $(info $(INFO_) help-list-variables List configurable variables)
$(info $(INFO_) install Install the usual stuff)
$(info $(INFO_) install-all Install everything)
$(info $(INFO_) lint Lint the source code)
$(info $(INFO_) nothing Do nothing; useful for debugging)
$(info $(INFO_) uninstall Uninstall everything (might leave traces))
$(info )
- $(info $(INFO_)To see the full list of targets, run:)
- $(info $(INFO_) $$ make -R -p nothing \)
- $(info $(INFO_) | grep '^\.PHONY:' \)
- $(info $(INFO_) | tr ' ' '\n' \)
- $(info $(INFO_) | grep -v '^\.PHONY:' \)
- $(info $(INFO_) | sort;)
- $(info )
- $(info $(INFO_)To see a list of variables, run:)
- $(info $(INFO_) $$ find GNUmakefile share/mk/configure -type f \)
- $(info $(INFO_) | sort \)
- $(info $(INFO_) | xargs grep '^[^[:space:]].*=' \)
- $(info $(INFO_) | sed 's/=.*/=/' \)
- $(info $(INFO_) | grep -v -e ':DEFAULT_.*=' -e ':MAKEFILE_.*INCLUDED :=';)
- $(info )
- $(info $(INFO_)To see a list of dependencies (package/program), run:)
- $(info $(INFO_) $$ find share/mk/configure/build-depends -type f \)
- $(info $(INFO_) | sed 's,share/mk/configure/build-depends/,,' \)
- $(info $(INFO_) | sed 's,\.mk,,' \)
- $(info $(INFO_) | sort;)
- $(info )
.DELETE_ON_ERROR:
--- /dev/null
+# Copyright, the authors of the Linux man-pages project
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_HELP_LIST_INCLUDED
+MAKEFILE_HELP_LIST_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/sort.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/tr.mk
+include $(MAKEFILEDIR)/configure/build-depends/findutils/find.mk
+include $(MAKEFILEDIR)/configure/build-depends/findutils/xargs.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
+
+
+.PHONY: help-list-targets
+help-list-targets:
+ $(MAKE) -p nothing \
+ | $(GREP) '^\.PHONY:' \
+ | $(TR) ' ' '\n' \
+ | $(GREP) -v '^\.PHONY:' \
+ | $(SORT)
+
+
+.PHONY: help-list-variables
+help-list-variables:
+ $(FIND) $(CURDIR)/GNUmakefile $(MAKEFILEDIR) -type f \
+ | $(GREP) -e '/GNUmakefile$$' -e '\.mk$$' \
+ | $(SORT) \
+ | $(XARGS) $(GREP) '^[^[:space:]].*=' \
+ | $(SED) 's,$(CURDIR)/,,' \
+ | $(SED) 's/=.*/=/' \
+ | $(GREP) -v -e ':DEFAULT_.*=' -e ':MAKEFILE_.*INCLUDED :='
+
+
+.PHONY: help-list-build-depends
+help-list-build-depends:
+ $(FIND) $(MAKEFILEDIR)/configure/build-depends -type f \
+ | $(GREP) -e '\.mk$$' -e '\.mk$$' \
+ | $(SED) 's,$(MAKEFILEDIR)/configure/build-depends/,,' \
+ | $(SED) 's,\.mk$$,,' \
+ | $(SORT)
+
+
+endif # include guard