[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new to make (GNU make on NT 4.0)
From: |
Paul D. Smith |
Subject: |
Re: new to make (GNU make on NT 4.0) |
Date: |
Wed, 4 Apr 2001 13:38:52 -0400 |
%% David Luchin <address@hidden> writes:
dl> If you don't give make a specific target on the command line, make will
dl> build the first target listed in the makefile. In this case, that is "
dl> %.obj ".
Not so.
Make will choose the first _explicit_ target.
An implicit (suffix or pattern) rule can never be the default, since it
doesn't match any particular file.
dl> make -f makefile --jobs=1 -k ctest
--jobs=1 is completely unnecessary. If you don't give any -j option,
then the number of jobs to run in parallel is 1 (serial invocation), so
--jobs=1 (or -j 1) is redundant.
>> I'm using GNU make 3.79 on windows NT 4.0 sp 5 and a Borland C 3.1
>> compiler.
First, you should get the latest version, GNU make 3.79.1.
Are you using GNU make from the FSF, or the one that comes with the
Cygnus toolkit?
>> I through that I should start wit a small and simple "make file",
>> with just 2 source files, and 1 header file. My problem is that
>> often when I tries to recompile, it's only one of the source files
>> that gets compiled (I've deleted the all obj, and exe files
>> first). If I then run the compiler again, the last source file gets
>> compiled, and the .exe file gets linked. I also noticed that if I
>> write exit in the command prompt, it seams like there still is some
>> compilation running, like the make job started to compile both
>> source files at once.
See above about -j.
I don't know enough about Windows behavior, so I can't answer directly.
Your makefile looks OK to me.
One thing I _would_ do, if possible, is switch from using backslashes to
using forward slashes. It's _much_ safer, and most Windows programs
will accept either (the exception being the DOS commands like del, I
think).
Anyway, I would try adding the -d option, or using one of the specific
--debug flags, to try to find out what make is doing and why it's not
building what you think it should. Without a more detailed description
of exactly what's going wrong there's not much more I can say.
--
-------------------------------------------------------------------------------
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