mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 10:17:35 +03:00
tools: make help headings tweak
This commit is contained in:
parent
8ef0c01da2
commit
f99d4eefa6
35
Makefile
35
Makefile
@ -41,7 +41,10 @@
|
|||||||
# def-help* functions for documenting make rules. See the file for usage.
|
# def-help* functions for documenting make rules. See the file for usage.
|
||||||
include help-system.mk
|
include help-system.mk
|
||||||
|
|
||||||
$(call def-help-section, hledger make rules )
|
$(call def-help-heading,Main make rules in the hledger project:)
|
||||||
|
$(call def-help-heading,TODO: some of these need updating)
|
||||||
|
$(call def-help-heading,---------------------------------------)
|
||||||
|
$(call def-help-heading, )
|
||||||
|
|
||||||
help2: \
|
help2: \
|
||||||
$(call def-help,[help], list documented rules in this makefile. "make RULE -n" shows more detail. )
|
$(call def-help,[help], list documented rules in this makefile. "make RULE -n" shows more detail. )
|
||||||
@ -236,7 +239,7 @@ TIME:=$(shell date +"%Y%m%d%H%M")
|
|||||||
MONTHYEAR:=$(shell date +'%B %Y')
|
MONTHYEAR:=$(shell date +'%B %Y')
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
$(call def-help-subsection,INSTALLING:)
|
$(call def-help-subheading,INSTALLING:)
|
||||||
|
|
||||||
install: \
|
install: \
|
||||||
$(call def-help,install, download dependencies and install hledger executables to ~/.local/bin or equivalent (with stack))
|
$(call def-help,install, download dependencies and install hledger executables to ~/.local/bin or equivalent (with stack))
|
||||||
@ -263,7 +266,7 @@ install: \
|
|||||||
# # -for p in $(call reverse,$(PACKAGES)); do $(GHCPKG) unregister $$p; done
|
# # -for p in $(call reverse,$(PACKAGES)); do $(GHCPKG) unregister $$p; done
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
$(call def-help-subsection,BUILDING:)
|
$(call def-help-subheading,BUILDING:)
|
||||||
|
|
||||||
# EXTRAINSTALLARGS=
|
# EXTRAINSTALLARGS=
|
||||||
|
|
||||||
@ -546,7 +549,7 @@ tools/generatejournal: tools/generatejournal.hs \
|
|||||||
$(GHC) tools/generatejournal.hs
|
$(GHC) tools/generatejournal.hs
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
$(call def-help-subsection,TESTING:)
|
$(call def-help-subheading,TESTING:)
|
||||||
|
|
||||||
# packdeps: \
|
# packdeps: \
|
||||||
# $(call def-help,packdeps,\
|
# $(call def-help,packdeps,\
|
||||||
@ -899,7 +902,7 @@ examples/mixed.journal: tools/generatejournal
|
|||||||
tools/generatejournal 3 5 5 --mixed >$@
|
tools/generatejournal 3 5 5 --mixed >$@
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
$(call def-help-subsection,DOCUMENTATION:)
|
$(call def-help-subheading,DOCUMENTATION:)
|
||||||
|
|
||||||
# docs: site codedocs \
|
# docs: site codedocs \
|
||||||
# $(call def-help,docs,\
|
# $(call def-help,docs,\
|
||||||
@ -1110,7 +1113,7 @@ draft-changelog-start: \
|
|||||||
@make draft-changelog-template >>$(DRAFTCHANGELOG)
|
@make draft-changelog-template >>$(DRAFTCHANGELOG)
|
||||||
|
|
||||||
draft-changelog-template: \
|
draft-changelog-template: \
|
||||||
#$(call def-help,draft-changelog-template, print an empty org outline for drafting changelogs. )
|
$(call def-help,draft-changelog-template, print an empty org outline for drafting changelogs. )
|
||||||
@echo "* draft changelog for `git describe --tags --abbrev=0`"
|
@echo "* draft changelog for `git describe --tags --abbrev=0`"
|
||||||
@echo "** hledger-lib"
|
@echo "** hledger-lib"
|
||||||
@echo "** hledger"
|
@echo "** hledger"
|
||||||
@ -1119,20 +1122,20 @@ draft-changelog-template: \
|
|||||||
@echo "** hledger-api"
|
@echo "** hledger-api"
|
||||||
@echo "** project"
|
@echo "** project"
|
||||||
|
|
||||||
|
draft-changelog-update: \
|
||||||
|
$(call def-help,draft-changelog-update, add any new commits as org nodes to $(DRAFTCHANGELOG) )
|
||||||
|
@make draft-changelog-$(LASTCHANGELOGREF) >> $(DRAFTCHANGELOG)
|
||||||
|
|
||||||
draft-changelog-%: \
|
draft-changelog-%: \
|
||||||
#$(call def-help,draft-changelog-STARTREF, print commits from STARTREF as org nodes. Eg: make draft-changelog-hledger-1.3 )
|
$(call def-help,draft-changelog-STARTREF, print commits from STARTREF as org nodes. Eg: make draft-changelog-hledger-1.3 )
|
||||||
@git log --abbrev-commit --reverse --pretty=format:'ORGNODE %s (%an)%n%b%h' $*.. \
|
@git log --abbrev-commit --reverse --pretty=format:'ORGNODE %s (%an)%n%b%h' $*.. \
|
||||||
| sed -e 's/^\*/-/' -e 's/^ORGNODE/***/' \
|
| sed -e 's/^\*/-/' -e 's/^ORGNODE/***/' \
|
||||||
| sed -e 's/ (Simon Michael)//'
|
| sed -e 's/ (Simon Michael)//'
|
||||||
|
|
||||||
draft-changelog-add-%: \
|
draft-changelog-add-%: \
|
||||||
#$(call def-help,draft-changelog-add-STARTREF, add commits from STARTREF as org nodes to $(DRAFTCHANGELOG). Eg: make draft-changelog-add-HEAD~1 )
|
$(call def-help,draft-changelog-add-STARTREF, add commits from STARTREF as org nodes to $(DRAFTCHANGELOG). Eg: make draft-changelog-add-HEAD~1 )
|
||||||
@make draft-changelog-$* >>$(DRAFTCHANGELOG)
|
@make draft-changelog-$* >>$(DRAFTCHANGELOG)
|
||||||
|
|
||||||
draft-changelog-update: \
|
|
||||||
$(call def-help,draft-changelog-update, add any new commits as org nodes to $(DRAFTCHANGELOG) )
|
|
||||||
@make draft-changelog-$(LASTCHANGELOGREF) >> $(DRAFTCHANGELOG)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# in subsequent rules, allow automatic variables to be used in prerequisites (use $$)
|
# in subsequent rules, allow automatic variables to be used in prerequisites (use $$)
|
||||||
@ -1212,8 +1215,8 @@ site/manual2-1.md: site/manual-start.md site/manual-end.md $(MANPAGES) \
|
|||||||
# too hard, see Shake.hs
|
# too hard, see Shake.hs
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
$(call def-help-subsection,RELEASING:)
|
$(call def-help-subheading,RELEASING:)
|
||||||
#$(call def-help-subsection,see also developer guide -> how to -> do a release)
|
#$(call def-help-subheading,see also developer guide -> how to -> do a release)
|
||||||
|
|
||||||
# TODO update this:
|
# TODO update this:
|
||||||
|
|
||||||
@ -1510,7 +1513,7 @@ cloc: $(call def-help,cloc, count lines of source code )
|
|||||||
# @echo
|
# @echo
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
$(call def-help-subsection,MISCELLANEOUS:)
|
$(call def-help-subheading,MISCELLANEOUS:)
|
||||||
|
|
||||||
Shake: Shake.hs $(call def-help,Shake, ensure the Shake script is compiled )
|
Shake: Shake.hs $(call def-help,Shake, ensure the Shake script is compiled )
|
||||||
./Shake.hs
|
./Shake.hs
|
||||||
@ -1587,4 +1590,4 @@ Clean: stackclean cabalclean cleanghc cleantags clean-manpages \
|
|||||||
|
|
||||||
-include local.mk
|
-include local.mk
|
||||||
|
|
||||||
#$(call def-help-section,------------------)
|
#$(call def-help-heading,------------------)
|
||||||
|
@ -16,13 +16,13 @@
|
|||||||
#
|
#
|
||||||
# Also:
|
# Also:
|
||||||
#
|
#
|
||||||
# $(call def-help-section,TITLE,HELP) -- show a section heading
|
# $(call def-help-heading,TITLE,HELP) -- show a section heading
|
||||||
#
|
#
|
||||||
# $(call def-help-subsection,TITLE,HELP) -- show a subsection heading
|
# $(call def-help-subheading,TITLE,HELP) -- show a subsection heading
|
||||||
#
|
#
|
||||||
# $(call def-help-hide,TARGET,HELP) -- temporarily suppress the help)
|
# $(call def-help-hide,TARGET,HELP) -- temporarily suppress the help)
|
||||||
# $(call def-help-section-hide,TITLE,HELP)
|
# $(call def-help-heading-hide,TITLE,HELP)
|
||||||
# $(call def-help-subsection-hide,TITLE,HELP)
|
# $(call def-help-subheading-hide,TITLE,HELP)
|
||||||
#
|
#
|
||||||
# HELP is one or more lines, or can be blank.
|
# HELP is one or more lines, or can be blank.
|
||||||
# Certain characters are not allowed, comma in particular.
|
# Certain characters are not allowed, comma in particular.
|
||||||
@ -40,21 +40,21 @@ define def-help
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
# show a section heading when help has been requested
|
# show a section heading when help has been requested
|
||||||
define def-help-section
|
define def-help-heading
|
||||||
$(if $(need-help),$(warning --------------------$1--------------------$2))
|
$(if $(need-help),$(warning $1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# show a subsection heading when help has been requested
|
# show a subsection heading when help has been requested
|
||||||
define def-help-subsection
|
define def-help-subheading
|
||||||
$(if $(need-help),$(warning $1))
|
$(if $(need-help),$(warning );$(warning $1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# no-ops, for hiding help without removing it entirely
|
# no-ops, for hiding help without removing it entirely
|
||||||
define def-help-hide
|
define def-help-hide
|
||||||
endef
|
endef
|
||||||
define def-help-section-hide
|
define def-help-heading-hide
|
||||||
endef
|
endef
|
||||||
define def-help-subsection-hide
|
define def-help-subheading-hide
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# utilities
|
# utilities
|
||||||
|
Loading…
Reference in New Issue
Block a user