help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Batch-Mode" rules with Microsoft compile


From: Paul D. Smith
Subject: Re: "Batch-Mode" rules with Microsoft compile
Date: Wed, 28 Mar 2001 11:14:37 -0500

%% John Skiff <address@hidden> writes:

  js> Well it turns out that this doesn't work after all.  If any of the
  js> include files which a source file depends on changes then make
  js> tries to compile the include file instead of the source file.  I
  js> can't find any way around it.

Can you show me an example of your makefile?

You must be adding the headers as prerequisites to the "all.os" (or your
equivalent); that is clearly not right.  You don't want to rebuild the
_header_ files if they change!

You need to declare that the .c files depend on the .h files (normally
this isn't the right thing to do, but in this case you'll have to do it
that way).  Use an empty rule.  Then make will imagine that the .c file
was modified whenever one of the headers was modified, and it will get
rebuilt.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist



reply via email to

[Prev in Thread] Current Thread [Next in Thread]