On Fri, 2007-07-13 at 11:00 +0530, Anantharamaiah Bhaskara wrote: > make T1 clean T2 > > I expect > 1. pre-requisites of T1 get built and then T1 itself > 2. pre-requisities of T1 & T2 (common to both) get removed > 3. pre-requisites of T2 get built and then T2 itself. > > But I don't see what I expect. Steps 1 & 2 happen but 3 doesn't. > Please let me know if there is any other option that I need to pass to > gmake to achieve what I want or is this a bug in gmake.
None of the above (at least, from the information you've provided). Make will only consider building any given target ONE TIME during its invocation. Once make has built a target, it will consider it to be up to date from that point forward--even if it is then removed by another target. Most likely make has already considered T2 and it's prerequisites during steps 1 and/or 2, and so when it gets to step 3 it doesn't need to do anything. This is absolutely expected behavior. Of course, it's possible that there's something else going on, but you'd need to show us with a small example makefile. Once you create such a makefile you can use the -d option to see what make is thinking about. The only way to reliably perform the steps as you've described them is to do them in three separate invocations: make T1 make clean make T2 Or, you perhaps could get away with two: make T1 clean make T2 Note that this version is not safe if you want to use parallelism (make -j). -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make