%% Bram <address@hidden> writes:
b> Something like this:
b> %.cc: $(dir $@)
b> echo "Pre:" $^
b> %.cc: $(dir %.cc)
b> echo "Pre:" $^
Variables (and functions) in targets and prerequisites are expanded as
the makefile is read in, long before either automatic variables like $@
exist or patterns like %.cc have been matched.
In general it's not a good idea (IMO) to depend on a directory anyway:
it will cause your code to rebuild in many situations where it's not
necessary. The GNU make manual has an alternate suggestion on how to
get directories created by the build system.