2008/5/6 Tom Tromey <tromey redhat.com>:
> >>>>> "Jeffrey" == Jeffrey
Ratcliffe <jeffrey.ratcliffe gmail.com> writes:
>
> Jeffrey> I have a Makefile with several rules:
> Jeffrey> dir/1/file_1.bdfi : $(shell deps
file_1.bdf) | dir/1
> Jeffrey> command file_1.bdf >
dir/1/file_1.bdfi
> [...]
>
> Jeffrey> Is there a way of reducing these to 1 rule
with automatic
> Jeffrey> variables?
> Jeffrey> %.bdfi : $(shell deps $(basename $( F)).bdf)
| $( D)
> Jeffrey> command $(basename $( F)).bdf
> $
>
> For this kind of thing you need secondary expansion.
> See the node "Secondary Expansion" in the
GNU Make manual.
Thanks for the tip. I tried
.SECONDEXPANSION
%.bdfi : $$(shell deps $$(*F).bdf) | $$( D)
command $(*F).bdf > $
but I get "make: *** No rule to make target"
errors, seemingly because
$$(*F).bdf isn't expanded as expected. Is there anyway of
getting make
to print the prerequisites for a particular pattern? In the
--debug=A
output, the correct pattern is tried, but discarded.
Please CC me on replies, as I am not subscribed.
Regards
Jeff
_______________________________________________
Help-make mailing list
Help-make gnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
|