I am writing a Makefile, and I want to use a generic rule with wildcards, like
%: bkp/%
cp $< $@
But I wanted this rule to be valid only for a few specific files. I wanted to define a variable with the list, for example
file_list = foo.c bar.c zzz.c
and configure the rule so it is only valid for files that are listed in this variable. How do I do that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…