Support adding "make help" text
This commit is contained in:
parent
f324b49ea1
commit
35107038f7
2 changed files with 16 additions and 7 deletions
4
clean.mk
4
clean.mk
|
@ -5,3 +5,7 @@ clean:
|
||||||
|
|
||||||
dryclean:
|
dryclean:
|
||||||
@for i in $(clean_files); do if [ -e $$i ]; then echo $$i; fi; done | sort
|
@for i in $(clean_files); do if [ -e $$i ]; then echo $$i; fi; done | sort
|
||||||
|
|
||||||
|
print-top-help += \
|
||||||
|
echo " clean: Delete generated files"; \
|
||||||
|
echo " dryclean: Show what files would be deleted by 'make clean'";
|
||||||
|
|
19
lib.mk
19
lib.mk
|
@ -79,7 +79,7 @@ $(foreach test, $(INSTALL_TESTS), $(eval $(call run-install-test,$(test))))
|
||||||
$(foreach file, $(man-pages), $(eval $(call install-data-in, $(file), $(mandir)/man$(patsubst .%,%,$(suffix $(file))))))
|
$(foreach file, $(man-pages), $(eval $(call install-data-in, $(file), $(mandir)/man$(patsubst .%,%,$(suffix $(file))))))
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all man help
|
.PHONY: default all man help
|
||||||
|
|
||||||
all: $(programs_list) $(libs_list) $(jars_list) $(man-pages)
|
all: $(programs_list) $(libs_list) $(jars_list) $(man-pages)
|
||||||
|
|
||||||
|
@ -90,15 +90,10 @@ help:
|
||||||
@echo "The following targets are available:"
|
@echo "The following targets are available:"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " default: Build default targets"
|
@echo " default: Build default targets"
|
||||||
@echo " install: Install into \$$(prefix) (currently set to '$(prefix)')"
|
|
||||||
@echo " clean: Delete generated files"
|
|
||||||
@echo " dryclean: Show what files would be deleted by 'make clean'"
|
|
||||||
ifdef PACKAGE_NAME
|
|
||||||
@echo " dist: Generate a source distribution"
|
|
||||||
endif
|
|
||||||
ifdef man-pages
|
ifdef man-pages
|
||||||
@echo " man: Generate manual pages"
|
@echo " man: Generate manual pages"
|
||||||
endif
|
endif
|
||||||
|
@$(print-top-help)
|
||||||
ifdef programs_list
|
ifdef programs_list
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "The following programs can be built:"
|
@echo "The following programs can be built:"
|
||||||
|
@ -117,3 +112,13 @@ ifdef jars_list
|
||||||
@echo ""
|
@echo ""
|
||||||
@for i in $(jars_list); do echo " $$i"; done
|
@for i in $(jars_list); do echo " $$i"; done
|
||||||
endif
|
endif
|
||||||
|
@echo ""
|
||||||
|
@echo "The following variables control the build:"
|
||||||
|
@echo ""
|
||||||
|
@echo " BUILD_SHARED_LIBS ($(BUILD_SHARED_LIBS)): Whether to build shared libraries"
|
||||||
|
@echo " BUILD_DEBUG ($(BUILD_DEBUG)): Whether to include debug symbols"
|
||||||
|
@echo " CC ($(CC)): C compiler to be used"
|
||||||
|
@echo " CFLAGS: Flags for the C compiler"
|
||||||
|
@echo " CXX ($(CXX)): C++ compiler to be used"
|
||||||
|
@echo " CXXFLAGS: Flags for the C++ compiler"
|
||||||
|
@$(print-var-help)
|
||||||
|
|
Loading…
Reference in a new issue