This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: CygWin MAKE problem.


--- Brendan Simon <brendan@dgs.monash.edu.au> wrote:
> I have been having problems with MAKE using CygWin B.20.1.  Note that I
> am using the Win98 command.com as a command shell.
> 
> If I run "make" (with the makefile listed at the end of this message) I
> get "Bad command or filename".  If I type "make -d" to get debug info, I
> get messages saying :
>     Putting child 0x02567f48 PID 1252 on the chain.
>     Putting child 0x02567f48 PID 1252Bad command or file name
>     Got a SIGCHLD; 1 unreaped children.
>     Live child 0x02567f48 PID 1252
>     Reaping winning child 0x02567f48 PID 1252 from chain.
>     Successfully remade target file 'help'
> 
> If I install a mingw32 make.exe (from Mumit's site, Jan Jaap's or Earnie
> Boyd's ports) then the makefile produces the correct output.  Why do
> these work and the cygwin distribution doesn't ?
--8<--

1st I'll say that I really just built the port that had already been done with
the following changes:

add `#define WINDOWS32' to config.h
remove make-3.77/w32/include/dirent.h (caused me all sorts of confusion).
modify job.c so that in used /c instead of -c if shell contained "command" or
"cmd".
add some output in various places if the debug_switch was set.
bypass the deletion of the temporary bat file if the debug_switch was set.

--8<--
> Is make.exe broken in the cygwin b20.1 release ?
--8<--

I don't think so.  I use it too much for it to be broken.  Also, I tried a
modified version of what you're doing and it worked fine with both.  Do you
have the MAKE_MODE environment variable set to UNIX?  What switches do you have
set in the CYGWIN environment variable?

--8<--
> Is it wise to replace it with Mumit's make.exe from his web site ?
> I just noticed that the one on Mumit's site (mingw32/ports) is make
> version 3.75.  I think I'll stick with the i386-mingw32-make.exe version
> 3.77 that I received from Earnie Boyd.
--8<--

If you're only using mingw32 it should be safe enough.  If you use a mix of
binaries from cygwin (like mkdir) you should make sure that the directory
structure is not _MOUNT_ dependent.  I.E.: If you have a directory D:\bin where
you have all of you binaries both cygwin and non-cygwin, then the only entry in
the mount table should be D:\ as / this will both sets of programs (cygwin and
non-cygwin) will be able to find /bin when it is referenced.

Also, using the notty switch in the CYGWIN environment variable is a must.

--8<--
> #############################################################################
> 
> # Start of Makefile
> #############################################################################
> 
> #SHELL does not get set properly with MinGW32 GNU MAKE for some strange
> reason.
--8<--

After spending a couple of days with the code, I can say that the strange
reason is that there are a default set of values.  If you execute `make'
without parameters the first thing it checks is to see if the Makefile itself
needs to be rebuilt.  The default shell for this is /bin/sh and in the
WINDOWS32 version it searches for the existance of sh.exe and uses it if it
finds it.  It uses a default target of all and if it finds it in the Makefile
will spawn itself with the target parameters specified on the all parameter. 
On the other hand if you execute `make sometarget' with a target parameter,
make will use the values set within the Makefile.

So, which should you use `make' or `make sometarget', the answer is it depends
on the purpose of the Makefile.  If you know the target to be processed, then
specifying the target will certainly speed the process.  However, the whole
purpose of make is so that you don't have to think about what to build or
rebuild except at the time you're creating the Makefile.

===
"Earnie Boyd" <mailto:earnie_boyd@yahoo.com>
CYGWIN RELATED HELP:
 DOCUMENTATION: <http://sourceware.cygnus.com/cygwin/docs.html>
       DLLHELP: <http://www.xraylith.wisc.edu/~khan/software/gnu-win32/>
ARCHIVE SEARCH: <http://www.delorie.com/archives/> OR
                <http://www.eGroups.com/list/gnu-win32/>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com