[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatic variables
From: |
Tom Tromey |
Subject: |
Re: Automatic variables |
Date: |
Tue, 06 May 2008 07:08:16 -0600 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
>>>>> "Jeffrey" == Jeffrey Ratcliffe <address@hidden> 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.
Tom