This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make, TMP=tmpnam => coredump


Brian,

Did you create two identical .c files, one named program.c and the
other named tmpnam.c? I get the same error you report when I haven't
created the tmpnam.c file.

I appreciate your additional helpful comments. I wish I was more
experienced to know how to look further into debugging this. 

Thanks again.

Larry

* From: Brian Dessent <brian at dessent dot net>
* To: cygwin at cygwin dot com
* Date: Fri, 08 Apr 2005 17:32:20 -0700
* Subject: Re: Make, TMP=tmpnam => coredump

With the three files mentioned above, I get

$ make
make: *** No rule to make target `tmpnam', needed by `all'.  Stop.

...which is correct because there is nothing in the Makefile to tell
make how to make 'tmpnam'.  I suspect there is something else going on
in your case, such as some kind of implicit ".c.o" or ".c.exe" rule, or
some other makefile rules being included.  Your test makefile above
doesn't make much sense anyway, because "gcc -c program.c" will compile
but not link program.c, creating program.o, which in no way satisfies
either dependency of the rule.

Are you sure the 'make' and 'gcc' that are in your path are Cygwin's and
not some win32 tools?

And just so you know... Cygwin tries to provide a POSIX environment but
there are still many differences between it and linux.  I wouldn't
expect every example to work the same.  The .exe extension is one main
one that comes up in makefiles.  Another example is that -lm is totally
superfluous under Cygwin.  Also realize that under Windows the
environment variable $TMP is used as the location to place temporary
files, and is a horrible choice for the name of a variable to use in a
Makefile.  That's a good example of how not to write a portable
makefile...

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]