mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-26 03:42:25 +03:00
27 lines
705 B
Makefile
27 lines
705 B
Makefile
|
|
.PHONY: command-options clean
|
|
|
|
all: command-options hledger-completion.bash
|
|
|
|
hledger-completion.bash: hledger-completion.bash.m4 commands-list.txt query-filters.txt generic-options.txt
|
|
m4 hledger-completion.bash.m4 > $@
|
|
|
|
generic-options.txt:
|
|
hledger -h | ./output-options.sh > $@
|
|
|
|
commands.txt:
|
|
hledger | ./output-commands.sh | grep -v ^hledger > $@
|
|
|
|
commands-list.txt: commands.txt
|
|
paste -sd, $^ | tr -d '\n' > $@
|
|
|
|
#query-filters.txt:
|
|
# The query filters are hard to extract!
|
|
# hledger help --cat hledger | sed -n '/^QUERIES/,/^[A-Z]/p'
|
|
|
|
command-options: commands.txt
|
|
parallel -j8 'hledger {} -h | ./output-options.sh > options-{}.txt' < commands.txt
|
|
|
|
clean:
|
|
rm -f *.txt hledger-completion.bash
|