Thank you Lane for a very thorough explanation.
I am still however not 100% convinced that make strips away "/" and treats "%/"
as %, and this pattern would match everything:
%/:
touch $@
mgaleck@rh5-017205{396}: make foobar
make: *** No rule to make target `foobar'. Stop.
mgaleck@rh5-017205{397}: make foobar/
touch foobar/
touch: setting times of `foobar/': No such file or directory
make: *** [foobar/] Error 1
Definitely only the second one matched.
>I assume that your overall goal is to have a single rule that can be
used to create directories, but won't fire for non-directory files. If
so, then you should be able to accomplish that goal by using your fix,
then specifying "x/." as the prerequisite in each rule that needs a
directory "x" to exist:
%/.:
mkdir -p $@
dir/foobar: dir/.
touch $@
Yes I found that too, but, for some other reasons which I don't want to go into
right now, adding /. is too much. Being able to add only / would be perfect.
Mark
_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make