I have a project organized as this:
================================
Top level directory sources: top1.c top2.c top3.c ......
   2nd level directory sources: second1.c second2.c .....
================================

My makefile looks like this:
================================
all: target1 target2

target1: depend
   command1

target2:
   command2
.....
================================


Now, I want simply build "target2", so I issue a command like this:
================================
$ make target2
================================

I expect "command2" to be run directly since there is no dependencies for
"target2", however, GNU make always compile my top level sources before
executing "command2".

I am sure command2 is only to compile sources in 2nd level directory, and it
has nothing to do with sources in top level directory (top1.c top2.c ....).
I just wonder why GNU make always compile top level sources? and how to
avoid this and simply executing "command2"?

Any suggestion??

Thanks!

Kevin
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to