mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 19:31:44 +03:00
Refactor Makefile
hledger-completion.bash does not depend on command-options because this phony target is so slow. Use make once and subsequently only make hledger-completion.bash
This commit is contained in:
parent
a2dc1289a5
commit
ae060d9f13
@ -1,7 +1,10 @@
|
||||
|
||||
.PHONY: commands clean
|
||||
.PHONY: command-options clean
|
||||
|
||||
all: generic-options.txt commands hledger-completion.bash
|
||||
all: command-options hledger-completion.bash
|
||||
|
||||
hledger-completion.bash: hledger-completion.bash.m4 commands-list.txt generic-options.txt
|
||||
m4 hledger-completion.bash.m4 > $@
|
||||
|
||||
generic-options.txt:
|
||||
hledger -h | ./output-options.sh > $@
|
||||
@ -12,11 +15,8 @@ commands.txt:
|
||||
commands-list.txt: commands.txt
|
||||
paste -sd, $^ | tr -d '\n' > $@
|
||||
|
||||
commands: commands.txt
|
||||
command-options: commands.txt
|
||||
parallel -j8 'hledger {} -h | ./output-options.sh > options-{}.txt' < commands.txt
|
||||
|
||||
hledger-completion.bash: hledger-completion.bash.m4 commands-list.txt
|
||||
m4 hledger-completion.bash.m4 > $@
|
||||
|
||||
clean:
|
||||
rm -f *.txt hledger-completion.bash
|
||||
|
Loading…
Reference in New Issue
Block a user