[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Automatically generate rules from a list variable
From: |
Andrei Deftu |
Subject: |
Automatically generate rules from a list variable |
Date: |
Fri, 24 Oct 2008 18:36:08 +0300 |
Hi!
I have the following scenario
LIST := file1.cpp file2.cpp file3.cpp
and I want to generate these rules
file1.cpp_o: file1.cpp
# bla bla
file2.cpp_o: file1.cpp
# bla bla
file2.cpp_o: file1.cpp
# bla bla
but I want to write only a single rule for this, like:
$(LIST:%=%_o): $(@:%_o=%)
# bla bla
The problem is that this is not valid and I don't know how to write a
rule for a list that expands to a rule for every element of the list
and each of this rule must have as a target and as a dependency the
current element of the list. Thanks.
Re: Automatically generate rules from a list variable, Boris Godin, 2008/10/24
- Automatically generate rules from a list variable,
Andrei Deftu <=