Solinari All American 16957 Posts user info edit post |
I have a very long make file that I would like to consolidate. It looks like this:
target_a_1: begin touch $@ target_a_2: target_a_1 touch $@ target_b_1: begin touch $@ target_b_2: target_b_1 touch $@ target_c_1: begin touch $@ target_c_2: target_c_1 touch $@ all: target_a_1 target_b_1 target_c1 touch $@
I would like to change this to look like this pseudo-code:
targets = a b c foreach(t $targets target_$t_1: begin touch $@ target_$t_2: target_$t_1 touch $@ ) all: ????
so confused... Is there any way to do this?
[Edited on January 6, 2010 at 11:52 AM. Reason : s]1/6/2010 11:48:52 AM |