help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Automatic variables


From: Jeffrey Ratcliffe
Subject: Automatic variables
Date: Tue, 6 May 2008 14:10:45 +0200

I have a Makefile with several rules:

dir/1/file_1.bdfi : $(shell deps file_1.bdf) | dir/1
        command file_1.bdf > dir/1/file_1.bdfi

dir/2/file_2.bdfi : $(shell deps file_2.bdf) | dir/2
        command file_2.bdf > dir/2/file_2.bdfi

dir/3/file_3.bdfi : $(shell deps file_3.bdf) | dir/3
        command file_3.bdf > dir/3/file_3.bdfi

Is there a way of reducing these to 1 rule with automatic variables? I
have tried things like:

%.bdfi : $(shell deps $(basename $(@F)).bdf) | $(@D)
        command $(basename $(@F)).bdf > $@

and

dir/%/file_%.bdfi : $(shell deps file_%.bdf) | dir/%
        command $(basename $(@F)).bdf > $@

but the automatic variable don't seem to work in the dependencies.

Please CC me on replies, as I am not subscribed.

Regards

Jeff




reply via email to

[Prev in Thread] Current Thread [Next in Thread]