On Fri, Oct 09, 2009 at 11:07:59AM +0530, kartikeyan sadasivuni wrote: > hi, > > > > > Is it an option for you to create a copy of said file? > > I could do this but just looking for a cleaner approach. > I have a working solution but looking for better ways. > I wanted to avoid using the line (as kbuild can change in future and > so c_flags var) > $(CC) $(c_flags) -c -o $@ $< > and call something Kbuild already has > but with changed prerequisite/dependency. Did you read what I suggested at all? >From your answer I think not. Please go re-read my answer and realize that it is _kbuild_ that reates the copy of the file and thus things *just works*. kbuild (make) will see that foo.c is missing and create is using the rule I suggested: $(obj)/foo: $(src)/foo-prefix.c cat $< > $@ || (rm $@ && false) So you do _not_ have to specify c_flags or anything like that to make it work. Sam -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html