The problem that causes the error you report is that you do not separate the target-specific variable definitions from the definitions of the rules. You currently have rules of this form:
data-only: what=data
... commands ...
You might be expecting that the data-only: what=data
line defines the target-specific variable and the rule, but it does not.
What you need is to have one line for the variable declaration and then repeat the name of the target for the rule. Like this:
data-only: what=data
data-only:
... commands ...
So data-only
, to take just one example, would become:
data-only: what=data
data-only:
argList=( --defaults-file="${credentials}" --no-create-db --no-create-info ) \
mysqldump "$${argList[@]}" cfdict > $(call today).cfdict-"${what}".localhot.sql
$(call update-latest,${what})
I see that you declare argList
as a shell variable so it does not need to be changed.
You'll have to update similarly all targets that have target-specific variables in your Makefile.