updates makefile help target to be bsd friendly

This commit is contained in:
James Tomasino 2020-09-05 18:14:31 +00:00
parent 669e9e76db
commit da5a08ce36
3 changed files with 20 additions and 21 deletions

View File

@ -14,19 +14,19 @@ sharedir=$(DESTDIR)$(PREFIX)/share
help:
@echo "targets:"
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| sed -n 's/^\(.*\): \(.*\)##\(.*\)/ \1|\3/p' \
@awk -F '#' '/^[a-zA-Z0-9_-\.]+:.*?#/ { print $0 }' $(MAKEFILE_LIST) \
| sed -n 's/^\(.*\): \(.*\)#\(.*\)/ \1|-\3/p' \
| column -t -s '|'
install: todo todo.1 ## system install
install: todo todo.1 # system install
$(INSTALL_PROGRAM) todo $(bindir)/todo
$(INSTALL_DATA) todo.1 $(sharedir)/man/man1/todo.1
uninstall: ## system uninstall
uninstall: # system uninstall
rm -f $(bindir)/todo
rm -f $(sharedir)/man/man1/todo.1
README.txt: todo.1 ## generate readme file
README.txt: todo.1 # generate readme file
man ./todo.1 | col -bx > README.txt
.PHONY: help install uninstall

View File

@ -1,4 +1,4 @@
TODO(1) General Commands Manual TODO(1)
TODO(1) General Commands Manual TODO(1)
NAME
todo - a minimalist todo list manager
@ -7,32 +7,31 @@ SYNOPSIS
todo [-vhex] [-a "todo item"] [-d todo-number] [-d "todo phrase"]
DESRIPTION
todo is a simple, minimalist todo list manager. Users can add items to a todo list
or delete them. Deleted items are archived and can be reviewed.
todo is a simple, minimalist todo list manager. Users can add items to a todo list or
delete them. Deleted items are archived and can be reviewed.
The default location of the todo list can be set with the TODO environment vari
able. If unset, a the default file is ~/todo.txt.
The default location of the todo list can be set with the TODO environment variable.
If unset, a the default file is ~/todo.txt.
If todo is used within a tmux session, the filename of the todo list inherits the
name of the current session. This allows for unique todo lists based on tmux con
text.
If todo is used within a tmux session, the filename of the todo list inherits the name
of the current session. This allows for unique todo lists based on tmux context.
The options are as follows:
no parameters
If no parameters are passed to todo, then the current todo list will be dis
If no parameters are passed to todo, then the current todo list will be dis
played to standard out.
-a quoted_todo_item
Add a new todo list item
-d item_number_or_phrase
Delete a todo list item by its number or by a string. If a string is pro
vided, any todo list item that matches that string will be removed. Deleted
items are moved to the archive.
Delete a todo list item by its number or by a string. If a string is provided,
any todo list item that matches that string will be removed. Deleted items are
moved to the archive.
The archive file is named identically to the todo file with the exception of a .ar
chive added before the extension. For example, todo.txt would have an archive named
The archive file is named identically to the todo file with the exception of a .ar
chive added before the extension. For example, todo.txt would have an archive named
todo.archive.txt in the same folder.
-e Open the todo file in your editor.
@ -69,4 +68,4 @@ BUGS
AUTHOR
James Tomasino <james (at) tomasino (dot) org>
2020.07.10 10 July 2020 TODO(1)
2020.09.05 05 September 2020 TODO(1)

2
todo.1
View File

@ -1,4 +1,4 @@
.TH TODO 1 "10 July 2020" "2020.07.10"
.TH TODO 1 "05 September 2020" "2020.09.05"
.SH NAME
todo \- a minimalist todo list manager