From 0498b8ff7c0401d23accb8634cf293632ad95d26 Mon Sep 17 00:00:00 2001 From: Vladimir Zhelezov Date: Fri, 18 Dec 2020 06:04:14 +0100 Subject: [PATCH] Add stub file to m4 build target prerequisites And as it becomes unwieldy, put all the dependencies in a variable --- shell-completion/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/shell-completion/Makefile b/shell-completion/Makefile index abdf75366..b983ec2f4 100644 --- a/shell-completion/Makefile +++ b/shell-completion/Makefile @@ -9,7 +9,17 @@ all: hledger-completion.bash COMMANDS := $(sort $(shell hledger | ./output-commands.sh | grep -v ^hledger | sort -u) ui web api) CMDOPTFILES := $(foreach CMD,$(COMMANDS),options-$(CMD).txt) -hledger-completion.bash: hledger-completion.bash.m4 commands.txt commands-list.txt query-filters.txt generic-options.txt $(CMDOPTFILES) +define M4DEPS := +hledger-completion.bash.m4 \ +hledger-completion.bash.stub \ +commands.txt \ +commands-list.txt \ +query-filters.txt \ +generic-options.txt \ +$(CMDOPTFILES) +endef + +hledger-completion.bash: $(M4DEPS) m4 hledger-completion.bash.m4 > $@ generic-options.txt: