makefile - Rule for all targets in make - even if the file exists -


i want create makefile outputs foo no matter target name given make.

so of these should work:

 $ make foo $ make foo $ make foobar foo 

the following makefile want:

 %:     @echo foo  .phony: 

however fails if there exists file same name target:

 $ touch abc $ make abc make: `abc' date. 

as .phony doesn't accept pattern rules, don't know how can make ignore every file.

how about:

all $(makecmdgoals): ; @echo foo .phony: $(makecmdgoals) 

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -