[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to use $@ in dependency rule line? or some other alternative
From: |
Anil Kumar Gupta |
Subject: |
How to use $@ in dependency rule line? or some other alternative |
Date: |
Wed, 22 May 2002 18:39:16 +0530 |
Hi,
I have multiple XXX.mk files and for some of these XXX_phys.mk file
exists. This XXX.mk file is converted to a XXX.c file.
My problem is write dependency to include corresponding XXX_phys.mk
file. There is no 'c' file corresponding to XXX_phys.mk file
.mk files are kept in loads dir and 'c' file is generated in gen dir.
I want to use something like -
$(ALL-C-FILES):gen/%.c: loads/%.mk loads/%_phys.mk
since XXX_phys.mk file does not exist for all XXX.mk file, it gives
error.
I also tried -
$(ALL-C-FILES):gen/%.c: loads/%.mk $(wildcard loads/%_phys.mk) but I
guess % inside wildcard function is different so it also fails.
Can't we use something like -
$(ALL-C-FILES):gen/%.c: loads/%.mk $(wildcard $(patsubst gen/%.c,
loads/%_phys.mk, $(@))
I have noticed that $@ is not define in this line. It is available next
line onwards(commands).
What is solution for this?
Thanks and Regards,
Anil
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- How to use $@ in dependency rule line? or some other alternative,
Anil Kumar Gupta <=