From ae060d9f133222714916bac8a458548d44b9c2a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20Sch=C3=B6ttl?= Date: Sat, 12 Jan 2019 13:03:17 +0100 Subject: [PATCH] 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 --- shell-completion/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/shell-completion/Makefile b/shell-completion/Makefile index 811ae429b..43c927e40 100644 --- a/shell-completion/Makefile +++ b/shell-completion/Makefile @@ -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