public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Make quoted strings problem running from cmd.exe...
@ 1999-08-17 15:25 John Wiersba
  1999-08-17 19:39 ` Chris Faylor
  1999-08-31 23:49 ` John Wiersba
  0 siblings, 2 replies; 28+ messages in thread
From: John Wiersba @ 1999-08-17 15:25 UTC (permalink / raw)
  To: 'earnie_boyd@yahoo.com',
	cygwin, 'kevin_hill@bigfoot.com'

No need to bet; you hit the nail on the head.

"Cygwin.  Don't leave Unix without it." -- me

> -----Original Message-----
> From: Earnie Boyd [ mailto:earnie_boyd@yahoo.com ]
> Sent: Tuesday, August 17, 1999 6:19 PM
> To: John Wiersba; cygwin@sourceware.cygnus.com; 
> 'kevin_hill@bigfoot.com'
> Subject: RE: Make quoted strings problem running from cmd.exe...
> 
> 
> Hmm.  I bet you used cygwin to build your program didn't you. 
>  Whereas Kevin
> used MSVC to build his.  If you build your program with 
> mingw32, you'll have
> the same problem as Kevin.
> 
> Earnie.
> 
> --- John Wiersba <John.Wiersba@medstat.com> wrote:
> > I'm running make 3.75 with no problems.  Maybe this is a 
> binary vs text
> > problem (I'm running all binary mounts).
> > 
> > file prtcmd.c
> > 	#include "stdio.h"
> > 	main(int argc, char ** argv) {
> > 		int j;
> > 		for (j = 0; j < argc; ++j) {
> > 			printf("arg %d: <%s>\n", j, argv[j]);
> > 		}
> > 		exit(0);
> > 	}
> > 
> > $ gcc prtcmd.c
> > $ mv a.exe prtcmd.exe
> > 
> > file Makefile
> > 	a:
> > 		prtcmd a "b c" d
> > 		prtcmd -i "BEGIN { $$^W=1; }"
> > 
> > output running bash and cmd.exe is identical:
> > 
> > $ make -v
> > GNU Make version 3.75, by Richard Stallman and Roland McGrath.
> > Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96
> >         Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions.
> > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> > PARTICULAR PURPOSE.
> > 
> > Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.
> > 
> > $ make
> > prtcmd a "b c" d
> > arg 0: <prtcmd>
> > arg 1: <a>
> > arg 2: <b c>
> > arg 3: <d>
> > prtcmd -i "BEGIN { $^W=1; }"
> > arg 0: <prtcmd>
> > arg 1: <-i>
> > arg 2: <BEGIN { $^W=1; }>
> > 
> > > -----Original Message-----
> > > From: Glenn Spell [ mailto:glenn@gs.fay.nc.us ]
> > > Sent: Tuesday, August 17, 1999 5:41 PM
> > > To: cygwin@sourceware.cygnus.com
> > > Subject: Re: Make quoted strings problem running from cmd.exe...
> > > 
> > > 
> > > On 18 Aug 1999 around 9:05AM (+1200) Kevin Hill wrote:
> > > 
> > > > My problem now is not "is this a bug or strange feature in
> > > > make.exe?",  but more one of "how can I fix this so I 
> can move on
> > > > and get on with my project?".
> > > 
> > > You might try upgrading from 3.75 to 3.77. There were 
> various changes
> > > in the way make reads lines in makefiles since 3.75.
> > > 
> > > -glenn
> > > 
> > > -- 
> > >  )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
> > >  )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
> > >  )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )   >-----._/_/__]>
> > >  )- blue skies - happy trails - sweet dreams -)             `0  |
> > > 
> > > --
> > > Want to unsubscribe from this list?
> > > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> > > 
> > 
> > --
> > Want to unsubscribe from this list?
> > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> > 
> > 
> 
> _________________________________________________________
> 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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
  1999-08-17 15:25 Make quoted strings problem running from cmd.exe John Wiersba
@ 1999-08-17 19:39 ` Chris Faylor
  1999-08-18  0:08   ` Glenn Spell
  1999-08-31 23:49   ` Chris Faylor
  1999-08-31 23:49 ` John Wiersba
  1 sibling, 2 replies; 28+ messages in thread
From: Chris Faylor @ 1999-08-17 19:39 UTC (permalink / raw)
  To: John Wiersba; +Cc: cygwin

On Tue, Aug 17, 1999 at 06:25:20PM -0400, John Wiersba wrote:
>"Cygwin.  Don't leave Unix without it." -- me

Hey.  I like this.  I hope you don't mind if I use it.

cgf

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
  1999-08-17 19:39 ` Chris Faylor
@ 1999-08-18  0:08   ` Glenn Spell
  1999-08-31 23:49     ` Glenn Spell
  1999-08-31 23:49   ` Chris Faylor
  1 sibling, 1 reply; 28+ messages in thread
From: Glenn Spell @ 1999-08-18  0:08 UTC (permalink / raw)
  To: John Wiersba, cygwin

On 17 Aug 1999 around 10:40PM (-0400) Chris Faylor wrote:

> On Tue, Aug 17, 1999 at 06:25:20PM -0400, John Wiersba wrote:
>
> >"Cygwin.  Don't leave Unix without it." -- me
>
> Hey.  I like this.  I hope you don't mind if I use it.

Me too.  :-)

-- 
 )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
 )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
 )     _  _  _  _  _  _  _  _  _  _  _  _     )   >-----._/_/__]>
 )--- Cygwin - Don't leave Unix without it ---)             `0  |

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
  1999-08-17 15:25 Make quoted strings problem running from cmd.exe John Wiersba
  1999-08-17 19:39 ` Chris Faylor
@ 1999-08-31 23:49 ` John Wiersba
  1 sibling, 0 replies; 28+ messages in thread
From: John Wiersba @ 1999-08-31 23:49 UTC (permalink / raw)
  To: 'earnie_boyd@yahoo.com',
	cygwin, 'kevin_hill@bigfoot.com'

No need to bet; you hit the nail on the head.

"Cygwin.  Don't leave Unix without it." -- me

> -----Original Message-----
> From: Earnie Boyd [ mailto:earnie_boyd@yahoo.com ]
> Sent: Tuesday, August 17, 1999 6:19 PM
> To: John Wiersba; cygwin@sourceware.cygnus.com; 
> 'kevin_hill@bigfoot.com'
> Subject: RE: Make quoted strings problem running from cmd.exe...
> 
> 
> Hmm.  I bet you used cygwin to build your program didn't you. 
>  Whereas Kevin
> used MSVC to build his.  If you build your program with 
> mingw32, you'll have
> the same problem as Kevin.
> 
> Earnie.
> 
> --- John Wiersba <John.Wiersba@medstat.com> wrote:
> > I'm running make 3.75 with no problems.  Maybe this is a 
> binary vs text
> > problem (I'm running all binary mounts).
> > 
> > file prtcmd.c
> > 	#include "stdio.h"
> > 	main(int argc, char ** argv) {
> > 		int j;
> > 		for (j = 0; j < argc; ++j) {
> > 			printf("arg %d: <%s>\n", j, argv[j]);
> > 		}
> > 		exit(0);
> > 	}
> > 
> > $ gcc prtcmd.c
> > $ mv a.exe prtcmd.exe
> > 
> > file Makefile
> > 	a:
> > 		prtcmd a "b c" d
> > 		prtcmd -i "BEGIN { $$^W=1; }"
> > 
> > output running bash and cmd.exe is identical:
> > 
> > $ make -v
> > GNU Make version 3.75, by Richard Stallman and Roland McGrath.
> > Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96
> >         Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions.
> > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> > PARTICULAR PURPOSE.
> > 
> > Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.
> > 
> > $ make
> > prtcmd a "b c" d
> > arg 0: <prtcmd>
> > arg 1: <a>
> > arg 2: <b c>
> > arg 3: <d>
> > prtcmd -i "BEGIN { $^W=1; }"
> > arg 0: <prtcmd>
> > arg 1: <-i>
> > arg 2: <BEGIN { $^W=1; }>
> > 
> > > -----Original Message-----
> > > From: Glenn Spell [ mailto:glenn@gs.fay.nc.us ]
> > > Sent: Tuesday, August 17, 1999 5:41 PM
> > > To: cygwin@sourceware.cygnus.com
> > > Subject: Re: Make quoted strings problem running from cmd.exe...
> > > 
> > > 
> > > On 18 Aug 1999 around 9:05AM (+1200) Kevin Hill wrote:
> > > 
> > > > My problem now is not "is this a bug or strange feature in
> > > > make.exe?",  but more one of "how can I fix this so I 
> can move on
> > > > and get on with my project?".
> > > 
> > > You might try upgrading from 3.75 to 3.77. There were 
> various changes
> > > in the way make reads lines in makefiles since 3.75.
> > > 
> > > -glenn
> > > 
> > > -- 
> > >  )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
> > >  )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
> > >  )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )   >-----._/_/__]>
> > >  )- blue skies - happy trails - sweet dreams -)             `0  |
> > > 
> > > --
> > > Want to unsubscribe from this list?
> > > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> > > 
> > 
> > --
> > Want to unsubscribe from this list?
> > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> > 
> > 
> 
> _________________________________________________________
> 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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
  1999-08-18  0:08   ` Glenn Spell
@ 1999-08-31 23:49     ` Glenn Spell
  0 siblings, 0 replies; 28+ messages in thread
From: Glenn Spell @ 1999-08-31 23:49 UTC (permalink / raw)
  To: John Wiersba, cygwin

On 17 Aug 1999 around 10:40PM (-0400) Chris Faylor wrote:

> On Tue, Aug 17, 1999 at 06:25:20PM -0400, John Wiersba wrote:
>
> >"Cygwin.  Don't leave Unix without it." -- me
>
> Hey.  I like this.  I hope you don't mind if I use it.

Me too.  :-)

-- 
 )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
 )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
 )     _  _  _  _  _  _  _  _  _  _  _  _     )   >-----._/_/__]>
 )--- Cygwin - Don't leave Unix without it ---)             `0  |

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
  1999-08-17 19:39 ` Chris Faylor
  1999-08-18  0:08   ` Glenn Spell
@ 1999-08-31 23:49   ` Chris Faylor
  1 sibling, 0 replies; 28+ messages in thread
From: Chris Faylor @ 1999-08-31 23:49 UTC (permalink / raw)
  To: John Wiersba; +Cc: cygwin

On Tue, Aug 17, 1999 at 06:25:20PM -0400, John Wiersba wrote:
>"Cygwin.  Don't leave Unix without it." -- me

Hey.  I like this.  I hope you don't mind if I use it.

cgf

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
  1999-08-17 16:31 Kevin Hill
@ 1999-08-31 23:49 ` Kevin Hill
  0 siblings, 0 replies; 28+ messages in thread
From: Kevin Hill @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin

Earie et Al,

You seem to have hit the nail on the head. CMD.exe is a standard NT app
(of course) and my CmdLineLook app is also compiled with MSVC (produces
standard NT executables). However, if I use John's source code and
compile within Cygwin, I get the following results from the same
makefile, but with the two command line inspectors as the shells...

CmdLineLook -i "BEGIN { $^W=1; }"
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i "BEGIN-
3       -{-
4       -$^W=1;-
5       -}"-


CmdLineLook -i "BEGIN { $^W=1; }"
arg 0: <//F/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/prtcmd.exe>
arg 1: </c>
arg 2: <CmdLineLook -i "BEGIN { $^W=1; }">


What does this tell us? It seems to suggest that standard NT C runtime
code is different between Cygwin and MSVC. This is good to be finally
getting to the bottom of the problem.

I guess what I really need to do is rebuild CMD.EXE with the Cygwin
toolkit!!! Wonder whether I can get the source code.

If I cannot rebuild CMD.EXE, is there anything I can do in the make
syntax to get it to put things in the way I need them to be for standard
NT executables? Any guesses? As mentioned before, when there are no
quotes on the command line, GNUmake outputs stuff differently from when
there is, as demonstrated below. However, when running the
Cygwin-compiled shell, it appears the same. It must, however, be doing
something different, mustn't it, or is the change in fact in the C
runtime itself. Now I am confused.

Can anyone help out here?

CmdLineLook -i BEGIN { $^W=1; }
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i BEGIN { $^W=1; }-
SHELL=F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe

F:\GAP\NEWDEV\GAP\TESTING\TEST1\LATEST\ANOTHER>make
CmdLineLook -i "BEGIN { $^W=1; }"
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i "BEGIN-
3       -{-
4       -$^W=1;-
5       -}"-
SHELL=F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe


Thanks everyone for their help so far.

Kev.
Kevin.Hill@tab.co.nz



     Hmm.  I bet you used cygwin to build your program didn't you. 
Whereas
     Kevin
     used MSVC to build his.  If you build your program with mingw32,
you'll
     have
     the same problem as Kevin.

     Earnie.

     --- John Wiersba <John.Wiersba@medstat.com> wrote:
     > I'm running make 3.75 with no problems.  Maybe this is a binary
vs text
     > problem (I'm running all binary mounts).
     >
     > file prtcmd.c
     >    #include "stdio.h"
     >    main(int argc, char ** argv) {
     >         int j;
     >         for (j = 0; j < argc; ++j) {
     >              printf("arg %d: <%s>\n", j, argv[j]);
     >         exit(0);
     >
     > $ gcc prtcmd.c
     > $ mv a.exe prtcmd.exe
     >
     > file Makefile
     >    a:
     >         prtcmd a "b c" d
     >         prtcmd -i "BEGIN { $$^W=1; }"
     >
     > output running bash and cmd.exe is identical:
     >
     > $ make -v
     > GNU Make version 3.75, by Richard Stallman and Roland McGrath.
     > Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96
     >         Free Software Foundation, Inc.
     > This is free software; see the source for copying conditions.
     > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A
     > PARTICULAR PURPOSE.
     >
     > Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.
     >
     > $ make
     > prtcmd a "b c" d
     > arg 0: <prtcmd>
     > arg 1: <a>
     > arg 2: <b c>
     > arg 3: <d>
     > prtcmd -i "BEGIN { $^W=1; }"
     > arg 0: <prtcmd>
     > arg 1: <-i>
     > arg 2: <BEGIN { $^W=1; }>
     >
     > > -----Original Message-----
     > > From: Glenn Spell [ mailto:glenn@gs.fay.nc.us ]
     > > Sent: Tuesday, August 17, 1999 5:41 PM
     > > To: cygwin@sourceware.cygnus.com
     > > Subject: Re: Make quoted strings problem running from
cmd.exe...
     > >
     > >
     > > On 18 Aug 1999 around 9:05AM (+1200) Kevin Hill wrote:
     > >
     > > > My problem now is not "is this a bug or strange feature in
     > > > make.exe?",  but more one of "how can I fix this so I can
move on
     > > > and get on with my project?".
     > >
     > > You might try upgrading from 3.75 to 3.77. There were various
changes
     > > in the way make reads lines in makefiles since 3.75.
     > >
     > > -glenn
     > >
     > > --
     > >  )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
     > >  )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_
|
     > >  )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )  
>-----._/_/__]>
     > >  )- blue skies - happy trails - sweet dreams -)             `0 
|
     > >
     > > --
     > > Want to unsubscribe from this list?
     > > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
     > >
     >
     > --
     > Want to unsubscribe from this list?
     > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
     >
     >

     _________________________________________________________
     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

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
  1999-08-18  9:26 John Wiersba
@ 1999-08-31 23:49 ` John Wiersba
  0 siblings, 0 replies; 28+ messages in thread
From: John Wiersba @ 1999-08-31 23:49 UTC (permalink / raw)
  To: 'Chris Faylor', John Wiersba; +Cc: cygwin

Be my guest.  I find cygwin indispensible -- I don't know what I would have
done without it.  Probably would have used MKS.  

Thanks, guys! 

> -----Original Message-----
> From: Chris Faylor [ mailto:cgf@cygnus.com ]
> Sent: Tuesday, August 17, 1999 10:41 PM
> To: John Wiersba
> Cc: cygwin@sourceware.cygnus.com
> Subject: Re: Make quoted strings problem running from cmd.exe...
> 
> 
> On Tue, Aug 17, 1999 at 06:25:20PM -0400, John Wiersba wrote:
> >"Cygwin.  Don't leave Unix without it." -- me
> 
> Hey.  I like this.  I hope you don't mind if I use it.
> 
> cgf
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Make quoted strings problem running from cmd.exe...
  1999-08-16 18:44 Kevin Hill
  1999-08-16 19:41 ` Tadeusz Liszka
@ 1999-08-31 23:49 ` Kevin Hill
  1 sibling, 0 replies; 28+ messages in thread
From: Kevin Hill @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin

Dear reader,

I have Cygwin b20.1 (including make version 3.75) and NT4.0 sp4. I am
trying to use make from within the normal cmd.exe of NT, rather than
from within any of the cygwin shells. The problem I have ONLY happens
when I run from cmd.exe; it works find from within sh.

A simple makefile is shown below:

#--Contents of makefile-------------------------------------
all:		_all

_all:
	CmdLineLook -i "BEGIN { $$^W=1; }"
#--------------------------------------------------------

What I expect from this makefile is that my CmdLineLook programme (which
just outputs what it got on the command line and what the value of the
SHELL environment variable is) will receive two parameters, the first
being "-i", the second being "BEGIN ...... }". If I run with Microsoft's
nmake.exe, I get the following output, as expected:

#- NMAKE.EXE output ------------------------------------------------
Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        CmdLineLook -i "BEGIN { $^W=1; }"
0       -CmdLineLook-
1       --i-
2       -BEGIN { $^W=1; }-
SHELL=(empty)
#--------------------------------------------------------

If I run GNU make from NT's command prompt, I get the following
unexpected output:

#- GNUMake from cmd.exe output --------------------------------
CmdLineLook -i "BEGIN { $^W=1; }"
0       -CmdLineLook-
1       --i-
2       -BEGIN-
3       -{-
4       -$W=1;-
5       -}-
SHELL=cmd.exe
#--------------------------------------------------------

If I run GNU make within the full Cygwin bash shell, I get the following
expected output:
#- GNUMake from bash output --------------------------------
CmdLineLook -i "BEGIN { $^W=1; }"
0       -CmdLineLook-
1       --i-
2       -BEGIN { $^W=1; }-
SHELL=/bin/sh.exe
#--------------------------------------------------------

Is this a bug within Cygnus' implementation, am I using make in
unexected circumstances or am I doing something stupid. I tried changing
the shell in the makefile to see if I could get the one done from
cmd.exe to work, but it never seemed to affect what shell was actually
being run.

Any answers would be gratefully received.

Kev.
kevin.hill@tab.co.nz
New Zealand Totalisator Agency Board (TAB).

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
  1999-08-17 16:52 Earnie Boyd
@ 1999-08-31 23:49 ` Earnie Boyd
  0 siblings, 0 replies; 28+ messages in thread
From: Earnie Boyd @ 1999-08-31 23:49 UTC (permalink / raw)
  To: Kevin Hill, cygwin

--- Kevin Hill <kevin_hill@bigfoot.com> wrote:
> I guess what I really need to do is rebuild CMD.EXE with the Cygwin
> toolkit!!! Wonder whether I can get the source code.
> 

Wonder if the Freedows work is still alive?  Did they get as far as CMD.EXE?

> If I cannot rebuild CMD.EXE, is there anything I can do in the make
> syntax to get it to put things in the way I need them to be for standard
> NT executables? Any guesses? As mentioned before, when there are no
> quotes on the command line, GNUmake outputs stuff differently from when
> there is, as demonstrated below. However, when running the
> Cygwin-compiled shell, it appears the same. It must, however, be doing
> something different, mustn't it, or is the change in fact in the C
> runtime itself. Now I am confused.
> 
> Can anyone help out here?
> 

Yes, the runtimes are different.  Therefore, you get different results.

If you want your program to do what you want, then you'll have to quote the
quotes as I've told you before.  E.G.: MyProg -i ^"This Should Work^" or \"This
Should Work\".  You might want to check out an appropriate MS news group or
visit the MSDN to get more info on quoting with the DOS/WIN32 runtimes.

===
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't cc me)
_________________________________________________________
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
  1999-08-17 18:22 ` Mumit Khan
@ 1999-08-31 23:49   ` Mumit Khan
  0 siblings, 0 replies; 28+ messages in thread
From: Mumit Khan @ 1999-08-31 23:49 UTC (permalink / raw)
  To: Kevin Hill; +Cc: cygwin

Kevin Hill <kevin_hill@bigfoot.com> writes:
> 
> My belief was that the cygwin product was supposed to support both the
> native NT shell and the supplied shells in parallel. Is this true? If it
> is and make does not properly support NT native commands, then Cygwin as
> product has a problem, doesn't it?

Given the inherent design (rather lack thereof!) of CMD/COMMAND, it would 
be hard to make quoting work the same way between Unix-style POSIX shells
and CMD/COMMAND. It's probably a low priority items for folks who work
on these tools, so unless someone does it, it may be a while, if ever.

> If I got hold of a Mygwin version of Make, is it likely to be any
> different? If so, where could I get such a thing, or would I need to
> download the source and attempt to build it myself?

ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/ports/

Regards,
Mumit


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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
  1999-08-17 18:12 Kevin Hill
  1999-08-17 18:22 ` Mumit Khan
@ 1999-08-31 23:49 ` Kevin Hill
  1 sibling, 0 replies; 28+ messages in thread
From: Kevin Hill @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin

Earnie,

If I could have quoted the quotes to get around the issue, I would have
done this immediately and carried on regardless. Your quoting
suggestions do not work for me, and I tried them at the beginning. I
will attempt to find out how to do this and report back.

My belief was that the cygwin product was supposed to support both the
native NT shell and the supplied shells in parallel. Is this true? If it
is and make does not properly support NT native commands, then Cygwin as
product has a problem, doesn't it?

If I got hold of a Mygwin version of Make, is it likely to be any
different? If so, where could I get such a thing, or would I need to
download the source and attempt to build it myself?

Kev.
kevin.hill@tab.co.nz


     --- Kevin Hill <kevin_hill@bigfoot.com> wrote:
     > I guess what I really need to do is rebuild CMD.EXE with the
Cygwin
     > toolkit!!! Wonder whether I can get the source code.
     >

     Wonder if the Freedows work is still alive?  Did they get as far as
     CMD.EXE?

     > If I cannot rebuild CMD.EXE, is there anything I can do in the
make
     > syntax to get it to put things in the way I need them to be for
standard
     > NT executables? Any guesses? As mentioned before, when there are
no
     > quotes on the command line, GNUmake outputs stuff differently
from when
     > there is, as demonstrated below. However, when running the
     > Cygwin-compiled shell, it appears the same. It must, however, be
doing
     > something different, mustn't it, or is the change in fact in the
C
     > runtime itself. Now I am confused.
     >
     > Can anyone help out here?
     >

     Yes, the runtimes are different.  Therefore, you get different
results.

     If you want your program to do what you want, then you'll have to
quote the
     quotes as I've told you before.  E.G.: MyProg -i ^"This Should
Work^" or
     \"This
     Should Work\".  You might want to check out an appropriate MS news
group or
     visit the MSDN to get more info on quoting with the DOS/WIN32
runtimes.

     ===
     Earnie Boyd < mailto:earnie_boyd@yahoo.com >

     Newbies, please visit
     < http://www.freeyellow.com/members5/gw32/index.html >

     (If you respond to the list, then please don't cc me)
     _________________________________________________________
     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

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
  1999-08-17 14:59 John Wiersba
@ 1999-08-31 23:49 ` John Wiersba
  0 siblings, 0 replies; 28+ messages in thread
From: John Wiersba @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin, 'kevin_hill@bigfoot.com'

I'm running make 3.75 with no problems.  Maybe this is a binary vs text
problem (I'm running all binary mounts).

file prtcmd.c
	#include "stdio.h"
	main(int argc, char ** argv) {
		int j;
		for (j = 0; j < argc; ++j) {
			printf("arg %d: <%s>\n", j, argv[j]);
		}
		exit(0);
	}

$ gcc prtcmd.c
$ mv a.exe prtcmd.exe

file Makefile
	a:
		prtcmd a "b c" d
		prtcmd -i "BEGIN { $$^W=1; }"

output running bash and cmd.exe is identical:

$ make -v
GNU Make version 3.75, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96
        Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.

$ make
prtcmd a "b c" d
arg 0: <prtcmd>
arg 1: <a>
arg 2: <b c>
arg 3: <d>
prtcmd -i "BEGIN { $^W=1; }"
arg 0: <prtcmd>
arg 1: <-i>
arg 2: <BEGIN { $^W=1; }>

> -----Original Message-----
> From: Glenn Spell [ mailto:glenn@gs.fay.nc.us ]
> Sent: Tuesday, August 17, 1999 5:41 PM
> To: cygwin@sourceware.cygnus.com
> Subject: Re: Make quoted strings problem running from cmd.exe...
> 
> 
> On 18 Aug 1999 around 9:05AM (+1200) Kevin Hill wrote:
> 
> > My problem now is not "is this a bug or strange feature in
> > make.exe?",  but more one of "how can I fix this so I can move on
> > and get on with my project?".
> 
> You might try upgrading from 3.75 to 3.77. There were various changes
> in the way make reads lines in makefiles since 3.75.
> 
> -glenn
> 
> -- 
>  )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
>  )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
>  )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )   >-----._/_/__]>
>  )- blue skies - happy trails - sweet dreams -)             `0  |
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
  1999-08-17 15:20 Earnie Boyd
@ 1999-08-31 23:49 ` Earnie Boyd
  0 siblings, 0 replies; 28+ messages in thread
From: Earnie Boyd @ 1999-08-31 23:49 UTC (permalink / raw)
  To: John Wiersba, cygwin, 'kevin_hill@bigfoot.com'

Hmm.  I bet you used cygwin to build your program didn't you.  Whereas Kevin
used MSVC to build his.  If you build your program with mingw32, you'll have
the same problem as Kevin.

Earnie.

--- John Wiersba <John.Wiersba@medstat.com> wrote:
> I'm running make 3.75 with no problems.  Maybe this is a binary vs text
> problem (I'm running all binary mounts).
> 
> file prtcmd.c
> 	#include "stdio.h"
> 	main(int argc, char ** argv) {
> 		int j;
> 		for (j = 0; j < argc; ++j) {
> 			printf("arg %d: <%s>\n", j, argv[j]);
> 		}
> 		exit(0);
> 	}
> 
> $ gcc prtcmd.c
> $ mv a.exe prtcmd.exe
> 
> file Makefile
> 	a:
> 		prtcmd a "b c" d
> 		prtcmd -i "BEGIN { $$^W=1; }"
> 
> output running bash and cmd.exe is identical:
> 
> $ make -v
> GNU Make version 3.75, by Richard Stallman and Roland McGrath.
> Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96
>         Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> 
> Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.
> 
> $ make
> prtcmd a "b c" d
> arg 0: <prtcmd>
> arg 1: <a>
> arg 2: <b c>
> arg 3: <d>
> prtcmd -i "BEGIN { $^W=1; }"
> arg 0: <prtcmd>
> arg 1: <-i>
> arg 2: <BEGIN { $^W=1; }>
> 
> > -----Original Message-----
> > From: Glenn Spell [ mailto:glenn@gs.fay.nc.us ]
> > Sent: Tuesday, August 17, 1999 5:41 PM
> > To: cygwin@sourceware.cygnus.com
> > Subject: Re: Make quoted strings problem running from cmd.exe...
> > 
> > 
> > On 18 Aug 1999 around 9:05AM (+1200) Kevin Hill wrote:
> > 
> > > My problem now is not "is this a bug or strange feature in
> > > make.exe?",  but more one of "how can I fix this so I can move on
> > > and get on with my project?".
> > 
> > You might try upgrading from 3.75 to 3.77. There were various changes
> > in the way make reads lines in makefiles since 3.75.
> > 
> > -glenn
> > 
> > -- 
> >  )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
> >  )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
> >  )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )   >-----._/_/__]>
> >  )- blue skies - happy trails - sweet dreams -)             `0  |
> > 
> > --
> > Want to unsubscribe from this list?
> > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> > 
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 
> 

_________________________________________________________
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
  1999-08-17 14:41 ` Glenn Spell
@ 1999-08-31 23:49   ` Glenn Spell
  0 siblings, 0 replies; 28+ messages in thread
From: Glenn Spell @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin

On 18 Aug 1999 around 9:05AM (+1200) Kevin Hill wrote:

> My problem now is not "is this a bug or strange feature in
> make.exe?",  but more one of "how can I fix this so I can move on
> and get on with my project?".

You might try upgrading from 3.75 to 3.77. There were various changes
in the way make reads lines in makefiles since 3.75.

-glenn

-- 
 )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
 )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
 )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )   >-----._/_/__]>
 )- blue skies - happy trails - sweet dreams -)             `0  |

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
  1999-08-17 14:03 Kevin Hill
  1999-08-17 14:41 ` Glenn Spell
@ 1999-08-31 23:49 ` Kevin Hill
  1 sibling, 0 replies; 28+ messages in thread
From: Kevin Hill @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin

Earnie, Tadeusz and others,

Whilst, once again, I understand what you are saying, I still believe
there is something mucky going on under the hood of make. Both examples
below are using make from Cmd.exe, but setting the shell to my
CmdLineLook programme. The first shows a command with no quotes in it.
It tidily invokes the shell, with a /c, followed by one parameter for
the entire command line to be executed. The second, for a command with
quotes in it, deviates completely from this pattern and separates up the
command into apparently random units.

My problem now is not "is this a bug or strange feature in make.exe?",
but more one of "how can I fix this so I can move on and get on with my
project?". There is no mention of what affect quotes have on a make
command in the official GNU Make documentation. Does anyone have a
feeling for what is happening, and how I can solve the issue. I guess I
could write my own shell, in place of cmd.exe, but that is a little
over-the-top. I have tried doing makes within the full cygwin
environment, from sh.exe, but then get into issues of invoking
ActiveState perl from sh.exe, which I have tried but not succeeded at.

# Invoke of shell for the command as follows: CmdLineLook -i BEGIN {
$^W=1; }
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i BEGIN { $^W=1; }-
#
-------------------------------------------------------------------------

# Invoke of shell for the command as follows: CmdLineLook -i "BEGIN {
$^W=1; }"
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i "BEGIN-
3       -{-
4       -$^W=1;-
5       -}"-
#
-------------------------------------------------------------------------

Please, if anyone can help out here, I would be most appreciative.

Regards,

Kev.
kevin.hill@tab.co.nz


     ---------------------------------
     Subject:
     Re: Re[2]: Make quoted strings problem running from cmd.exe...
     ---------------------------------
     


     Tadeusz is correct.  Nmake must be quoting the quotes before
passing it
     to your program.  GNUMake doesn't do that so your program doesn't
see the
     quotes.

     Sorry, unless you quote the quotes or stick with the shells
provided by the
     cygwin product then you ain't goin' a get what you expect. 
However, the
     code
     is available for you to change as you see fit.

     Earnie.

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
  1999-08-16 19:41 ` Tadeusz Liszka
@ 1999-08-31 23:49   ` Tadeusz Liszka
  0 siblings, 0 replies; 28+ messages in thread
From: Tadeusz Liszka @ 1999-08-31 23:49 UTC (permalink / raw)
  To: Kevin Hill; +Cc: cygwin

Kevin Hill wrote:
> 
> Dear reader,
> 
> I have Cygwin b20.1 (including make version 3.75) and NT4.0 sp4. I am
> trying to use make from within the normal cmd.exe of NT, rather than
> from within any of the cygwin shells. The problem I have ONLY happens
> when I run from cmd.exe; it works find from within sh.
.......

Don't blame it on make - it is cmd.exe doing. Once shell parses the
inputline, make does what it can. cmd.exe is too stupid to properly
interpret quotes "" like true shell. Write small code and test VC++ and
Cygwin gcc and see what actually is processed by cmd/shell and what
comes to your code. I suspect that cmd passes quotes, and nmake
compensates for it. It is consistent with DOS/NT/Win32 philosophy where
each program is responsible for interpreting *.*, and cmd.exe simply
passes them down.
 
-- 
Tadeusz
:: The public opinion should be alarmed by its own nonexistence
:: (512)467-0618 ext. 526 ::       Stanislaw J. Lec, trans. TJL

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
@ 1999-08-18  9:26 John Wiersba
  1999-08-31 23:49 ` John Wiersba
  0 siblings, 1 reply; 28+ messages in thread
From: John Wiersba @ 1999-08-18  9:26 UTC (permalink / raw)
  To: 'Chris Faylor', John Wiersba; +Cc: cygwin

Be my guest.  I find cygwin indispensible -- I don't know what I would have
done without it.  Probably would have used MKS.  

Thanks, guys! 

> -----Original Message-----
> From: Chris Faylor [ mailto:cgf@cygnus.com ]
> Sent: Tuesday, August 17, 1999 10:41 PM
> To: John Wiersba
> Cc: cygwin@sourceware.cygnus.com
> Subject: Re: Make quoted strings problem running from cmd.exe...
> 
> 
> On Tue, Aug 17, 1999 at 06:25:20PM -0400, John Wiersba wrote:
> >"Cygwin.  Don't leave Unix without it." -- me
> 
> Hey.  I like this.  I hope you don't mind if I use it.
> 
> cgf
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
  1999-08-17 18:12 Kevin Hill
@ 1999-08-17 18:22 ` Mumit Khan
  1999-08-31 23:49   ` Mumit Khan
  1999-08-31 23:49 ` Kevin Hill
  1 sibling, 1 reply; 28+ messages in thread
From: Mumit Khan @ 1999-08-17 18:22 UTC (permalink / raw)
  To: Kevin Hill; +Cc: cygwin

Kevin Hill <kevin_hill@bigfoot.com> writes:
> 
> My belief was that the cygwin product was supposed to support both the
> native NT shell and the supplied shells in parallel. Is this true? If it
> is and make does not properly support NT native commands, then Cygwin as
> product has a problem, doesn't it?

Given the inherent design (rather lack thereof!) of CMD/COMMAND, it would 
be hard to make quoting work the same way between Unix-style POSIX shells
and CMD/COMMAND. It's probably a low priority items for folks who work
on these tools, so unless someone does it, it may be a while, if ever.

> If I got hold of a Mygwin version of Make, is it likely to be any
> different? If so, where could I get such a thing, or would I need to
> download the source and attempt to build it myself?

ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/ports/

Regards,
Mumit


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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
@ 1999-08-17 18:12 Kevin Hill
  1999-08-17 18:22 ` Mumit Khan
  1999-08-31 23:49 ` Kevin Hill
  0 siblings, 2 replies; 28+ messages in thread
From: Kevin Hill @ 1999-08-17 18:12 UTC (permalink / raw)
  To: cygwin

Earnie,

If I could have quoted the quotes to get around the issue, I would have
done this immediately and carried on regardless. Your quoting
suggestions do not work for me, and I tried them at the beginning. I
will attempt to find out how to do this and report back.

My belief was that the cygwin product was supposed to support both the
native NT shell and the supplied shells in parallel. Is this true? If it
is and make does not properly support NT native commands, then Cygwin as
product has a problem, doesn't it?

If I got hold of a Mygwin version of Make, is it likely to be any
different? If so, where could I get such a thing, or would I need to
download the source and attempt to build it myself?

Kev.
kevin.hill@tab.co.nz


     --- Kevin Hill <kevin_hill@bigfoot.com> wrote:
     > I guess what I really need to do is rebuild CMD.EXE with the
Cygwin
     > toolkit!!! Wonder whether I can get the source code.
     >

     Wonder if the Freedows work is still alive?  Did they get as far as
     CMD.EXE?

     > If I cannot rebuild CMD.EXE, is there anything I can do in the
make
     > syntax to get it to put things in the way I need them to be for
standard
     > NT executables? Any guesses? As mentioned before, when there are
no
     > quotes on the command line, GNUmake outputs stuff differently
from when
     > there is, as demonstrated below. However, when running the
     > Cygwin-compiled shell, it appears the same. It must, however, be
doing
     > something different, mustn't it, or is the change in fact in the
C
     > runtime itself. Now I am confused.
     >
     > Can anyone help out here?
     >

     Yes, the runtimes are different.  Therefore, you get different
results.

     If you want your program to do what you want, then you'll have to
quote the
     quotes as I've told you before.  E.G.: MyProg -i ^"This Should
Work^" or
     \"This
     Should Work\".  You might want to check out an appropriate MS news
group or
     visit the MSDN to get more info on quoting with the DOS/WIN32
runtimes.

     ===
     Earnie Boyd < mailto:earnie_boyd@yahoo.com >

     Newbies, please visit
     < http://www.freeyellow.com/members5/gw32/index.html >

     (If you respond to the list, then please don't cc me)
     _________________________________________________________
     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

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
@ 1999-08-17 16:52 Earnie Boyd
  1999-08-31 23:49 ` Earnie Boyd
  0 siblings, 1 reply; 28+ messages in thread
From: Earnie Boyd @ 1999-08-17 16:52 UTC (permalink / raw)
  To: Kevin Hill, cygwin

--- Kevin Hill <kevin_hill@bigfoot.com> wrote:
> I guess what I really need to do is rebuild CMD.EXE with the Cygwin
> toolkit!!! Wonder whether I can get the source code.
> 

Wonder if the Freedows work is still alive?  Did they get as far as CMD.EXE?

> If I cannot rebuild CMD.EXE, is there anything I can do in the make
> syntax to get it to put things in the way I need them to be for standard
> NT executables? Any guesses? As mentioned before, when there are no
> quotes on the command line, GNUmake outputs stuff differently from when
> there is, as demonstrated below. However, when running the
> Cygwin-compiled shell, it appears the same. It must, however, be doing
> something different, mustn't it, or is the change in fact in the C
> runtime itself. Now I am confused.
> 
> Can anyone help out here?
> 

Yes, the runtimes are different.  Therefore, you get different results.

If you want your program to do what you want, then you'll have to quote the
quotes as I've told you before.  E.G.: MyProg -i ^"This Should Work^" or \"This
Should Work\".  You might want to check out an appropriate MS news group or
visit the MSDN to get more info on quoting with the DOS/WIN32 runtimes.

===
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't cc me)
_________________________________________________________
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
@ 1999-08-17 16:31 Kevin Hill
  1999-08-31 23:49 ` Kevin Hill
  0 siblings, 1 reply; 28+ messages in thread
From: Kevin Hill @ 1999-08-17 16:31 UTC (permalink / raw)
  To: cygwin

Earie et Al,

You seem to have hit the nail on the head. CMD.exe is a standard NT app
(of course) and my CmdLineLook app is also compiled with MSVC (produces
standard NT executables). However, if I use John's source code and
compile within Cygwin, I get the following results from the same
makefile, but with the two command line inspectors as the shells...

CmdLineLook -i "BEGIN { $^W=1; }"
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i "BEGIN-
3       -{-
4       -$^W=1;-
5       -}"-


CmdLineLook -i "BEGIN { $^W=1; }"
arg 0: <//F/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/prtcmd.exe>
arg 1: </c>
arg 2: <CmdLineLook -i "BEGIN { $^W=1; }">


What does this tell us? It seems to suggest that standard NT C runtime
code is different between Cygwin and MSVC. This is good to be finally
getting to the bottom of the problem.

I guess what I really need to do is rebuild CMD.EXE with the Cygwin
toolkit!!! Wonder whether I can get the source code.

If I cannot rebuild CMD.EXE, is there anything I can do in the make
syntax to get it to put things in the way I need them to be for standard
NT executables? Any guesses? As mentioned before, when there are no
quotes on the command line, GNUmake outputs stuff differently from when
there is, as demonstrated below. However, when running the
Cygwin-compiled shell, it appears the same. It must, however, be doing
something different, mustn't it, or is the change in fact in the C
runtime itself. Now I am confused.

Can anyone help out here?

CmdLineLook -i BEGIN { $^W=1; }
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i BEGIN { $^W=1; }-
SHELL=F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe

F:\GAP\NEWDEV\GAP\TESTING\TEST1\LATEST\ANOTHER>make
CmdLineLook -i "BEGIN { $^W=1; }"
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i "BEGIN-
3       -{-
4       -$^W=1;-
5       -}"-
SHELL=F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe


Thanks everyone for their help so far.

Kev.
Kevin.Hill@tab.co.nz



     Hmm.  I bet you used cygwin to build your program didn't you. 
Whereas
     Kevin
     used MSVC to build his.  If you build your program with mingw32,
you'll
     have
     the same problem as Kevin.

     Earnie.

     --- John Wiersba <John.Wiersba@medstat.com> wrote:
     > I'm running make 3.75 with no problems.  Maybe this is a binary
vs text
     > problem (I'm running all binary mounts).
     >
     > file prtcmd.c
     >    #include "stdio.h"
     >    main(int argc, char ** argv) {
     >         int j;
     >         for (j = 0; j < argc; ++j) {
     >              printf("arg %d: <%s>\n", j, argv[j]);
     >         exit(0);
     >
     > $ gcc prtcmd.c
     > $ mv a.exe prtcmd.exe
     >
     > file Makefile
     >    a:
     >         prtcmd a "b c" d
     >         prtcmd -i "BEGIN { $$^W=1; }"
     >
     > output running bash and cmd.exe is identical:
     >
     > $ make -v
     > GNU Make version 3.75, by Richard Stallman and Roland McGrath.
     > Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96
     >         Free Software Foundation, Inc.
     > This is free software; see the source for copying conditions.
     > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
A
     > PARTICULAR PURPOSE.
     >
     > Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.
     >
     > $ make
     > prtcmd a "b c" d
     > arg 0: <prtcmd>
     > arg 1: <a>
     > arg 2: <b c>
     > arg 3: <d>
     > prtcmd -i "BEGIN { $^W=1; }"
     > arg 0: <prtcmd>
     > arg 1: <-i>
     > arg 2: <BEGIN { $^W=1; }>
     >
     > > -----Original Message-----
     > > From: Glenn Spell [ mailto:glenn@gs.fay.nc.us ]
     > > Sent: Tuesday, August 17, 1999 5:41 PM
     > > To: cygwin@sourceware.cygnus.com
     > > Subject: Re: Make quoted strings problem running from
cmd.exe...
     > >
     > >
     > > On 18 Aug 1999 around 9:05AM (+1200) Kevin Hill wrote:
     > >
     > > > My problem now is not "is this a bug or strange feature in
     > > > make.exe?",  but more one of "how can I fix this so I can
move on
     > > > and get on with my project?".
     > >
     > > You might try upgrading from 3.75 to 3.77. There were various
changes
     > > in the way make reads lines in makefiles since 3.75.
     > >
     > > -glenn
     > >
     > > --
     > >  )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
     > >  )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_
|
     > >  )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )  
>-----._/_/__]>
     > >  )- blue skies - happy trails - sweet dreams -)             `0 
|
     > >
     > > --
     > > Want to unsubscribe from this list?
     > > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
     > >
     >
     > --
     > Want to unsubscribe from this list?
     > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
     >
     >

     _________________________________________________________
     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

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
@ 1999-08-17 15:20 Earnie Boyd
  1999-08-31 23:49 ` Earnie Boyd
  0 siblings, 1 reply; 28+ messages in thread
From: Earnie Boyd @ 1999-08-17 15:20 UTC (permalink / raw)
  To: John Wiersba, cygwin, 'kevin_hill@bigfoot.com'

Hmm.  I bet you used cygwin to build your program didn't you.  Whereas Kevin
used MSVC to build his.  If you build your program with mingw32, you'll have
the same problem as Kevin.

Earnie.

--- John Wiersba <John.Wiersba@medstat.com> wrote:
> I'm running make 3.75 with no problems.  Maybe this is a binary vs text
> problem (I'm running all binary mounts).
> 
> file prtcmd.c
> 	#include "stdio.h"
> 	main(int argc, char ** argv) {
> 		int j;
> 		for (j = 0; j < argc; ++j) {
> 			printf("arg %d: <%s>\n", j, argv[j]);
> 		}
> 		exit(0);
> 	}
> 
> $ gcc prtcmd.c
> $ mv a.exe prtcmd.exe
> 
> file Makefile
> 	a:
> 		prtcmd a "b c" d
> 		prtcmd -i "BEGIN { $$^W=1; }"
> 
> output running bash and cmd.exe is identical:
> 
> $ make -v
> GNU Make version 3.75, by Richard Stallman and Roland McGrath.
> Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96
>         Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> 
> Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.
> 
> $ make
> prtcmd a "b c" d
> arg 0: <prtcmd>
> arg 1: <a>
> arg 2: <b c>
> arg 3: <d>
> prtcmd -i "BEGIN { $^W=1; }"
> arg 0: <prtcmd>
> arg 1: <-i>
> arg 2: <BEGIN { $^W=1; }>
> 
> > -----Original Message-----
> > From: Glenn Spell [ mailto:glenn@gs.fay.nc.us ]
> > Sent: Tuesday, August 17, 1999 5:41 PM
> > To: cygwin@sourceware.cygnus.com
> > Subject: Re: Make quoted strings problem running from cmd.exe...
> > 
> > 
> > On 18 Aug 1999 around 9:05AM (+1200) Kevin Hill wrote:
> > 
> > > My problem now is not "is this a bug or strange feature in
> > > make.exe?",  but more one of "how can I fix this so I can move on
> > > and get on with my project?".
> > 
> > You might try upgrading from 3.75 to 3.77. There were various changes
> > in the way make reads lines in makefiles since 3.75.
> > 
> > -glenn
> > 
> > -- 
> >  )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
> >  )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
> >  )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )   >-----._/_/__]>
> >  )- blue skies - happy trails - sweet dreams -)             `0  |
> > 
> > --
> > Want to unsubscribe from this list?
> > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> > 
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 
> 

_________________________________________________________
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: Make quoted strings problem running from cmd.exe...
@ 1999-08-17 14:59 John Wiersba
  1999-08-31 23:49 ` John Wiersba
  0 siblings, 1 reply; 28+ messages in thread
From: John Wiersba @ 1999-08-17 14:59 UTC (permalink / raw)
  To: cygwin, 'kevin_hill@bigfoot.com'

I'm running make 3.75 with no problems.  Maybe this is a binary vs text
problem (I'm running all binary mounts).

file prtcmd.c
	#include "stdio.h"
	main(int argc, char ** argv) {
		int j;
		for (j = 0; j < argc; ++j) {
			printf("arg %d: <%s>\n", j, argv[j]);
		}
		exit(0);
	}

$ gcc prtcmd.c
$ mv a.exe prtcmd.exe

file Makefile
	a:
		prtcmd a "b c" d
		prtcmd -i "BEGIN { $$^W=1; }"

output running bash and cmd.exe is identical:

$ make -v
GNU Make version 3.75, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96
        Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.

$ make
prtcmd a "b c" d
arg 0: <prtcmd>
arg 1: <a>
arg 2: <b c>
arg 3: <d>
prtcmd -i "BEGIN { $^W=1; }"
arg 0: <prtcmd>
arg 1: <-i>
arg 2: <BEGIN { $^W=1; }>

> -----Original Message-----
> From: Glenn Spell [ mailto:glenn@gs.fay.nc.us ]
> Sent: Tuesday, August 17, 1999 5:41 PM
> To: cygwin@sourceware.cygnus.com
> Subject: Re: Make quoted strings problem running from cmd.exe...
> 
> 
> On 18 Aug 1999 around 9:05AM (+1200) Kevin Hill wrote:
> 
> > My problem now is not "is this a bug or strange feature in
> > make.exe?",  but more one of "how can I fix this so I can move on
> > and get on with my project?".
> 
> You might try upgrading from 3.75 to 3.77. There were various changes
> in the way make reads lines in makefiles since 3.75.
> 
> -glenn
> 
> -- 
>  )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
>  )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
>  )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )   >-----._/_/__]>
>  )- blue skies - happy trails - sweet dreams -)             `0  |
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
  1999-08-17 14:03 Kevin Hill
@ 1999-08-17 14:41 ` Glenn Spell
  1999-08-31 23:49   ` Glenn Spell
  1999-08-31 23:49 ` Kevin Hill
  1 sibling, 1 reply; 28+ messages in thread
From: Glenn Spell @ 1999-08-17 14:41 UTC (permalink / raw)
  To: cygwin

On 18 Aug 1999 around 9:05AM (+1200) Kevin Hill wrote:

> My problem now is not "is this a bug or strange feature in
> make.exe?",  but more one of "how can I fix this so I can move on
> and get on with my project?".

You might try upgrading from 3.75 to 3.77. There were various changes
in the way make reads lines in makefiles since 3.75.

-glenn

-- 
 )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
 )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
 )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )   >-----._/_/__]>
 )- blue skies - happy trails - sweet dreams -)             `0  |

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
@ 1999-08-17 14:03 Kevin Hill
  1999-08-17 14:41 ` Glenn Spell
  1999-08-31 23:49 ` Kevin Hill
  0 siblings, 2 replies; 28+ messages in thread
From: Kevin Hill @ 1999-08-17 14:03 UTC (permalink / raw)
  To: cygwin

Earnie, Tadeusz and others,

Whilst, once again, I understand what you are saying, I still believe
there is something mucky going on under the hood of make. Both examples
below are using make from Cmd.exe, but setting the shell to my
CmdLineLook programme. The first shows a command with no quotes in it.
It tidily invokes the shell, with a /c, followed by one parameter for
the entire command line to be executed. The second, for a command with
quotes in it, deviates completely from this pattern and separates up the
command into apparently random units.

My problem now is not "is this a bug or strange feature in make.exe?",
but more one of "how can I fix this so I can move on and get on with my
project?". There is no mention of what affect quotes have on a make
command in the official GNU Make documentation. Does anyone have a
feeling for what is happening, and how I can solve the issue. I guess I
could write my own shell, in place of cmd.exe, but that is a little
over-the-top. I have tried doing makes within the full cygwin
environment, from sh.exe, but then get into issues of invoking
ActiveState perl from sh.exe, which I have tried but not succeeded at.

# Invoke of shell for the command as follows: CmdLineLook -i BEGIN {
$^W=1; }
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i BEGIN { $^W=1; }-
#
-------------------------------------------------------------------------

# Invoke of shell for the command as follows: CmdLineLook -i "BEGIN {
$^W=1; }"
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i "BEGIN-
3       -{-
4       -$^W=1;-
5       -}"-
#
-------------------------------------------------------------------------

Please, if anyone can help out here, I would be most appreciative.

Regards,

Kev.
kevin.hill@tab.co.nz


     ---------------------------------
     Subject:
     Re: Re[2]: Make quoted strings problem running from cmd.exe...
     ---------------------------------
     


     Tadeusz is correct.  Nmake must be quoting the quotes before
passing it
     to your program.  GNUMake doesn't do that so your program doesn't
see the
     quotes.

     Sorry, unless you quote the quotes or stick with the shells
provided by the
     cygwin product then you ain't goin' a get what you expect. 
However, the
     code
     is available for you to change as you see fit.

     Earnie.

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Make quoted strings problem running from cmd.exe...
  1999-08-16 18:44 Kevin Hill
@ 1999-08-16 19:41 ` Tadeusz Liszka
  1999-08-31 23:49   ` Tadeusz Liszka
  1999-08-31 23:49 ` Kevin Hill
  1 sibling, 1 reply; 28+ messages in thread
From: Tadeusz Liszka @ 1999-08-16 19:41 UTC (permalink / raw)
  To: Kevin Hill; +Cc: cygwin

Kevin Hill wrote:
> 
> Dear reader,
> 
> I have Cygwin b20.1 (including make version 3.75) and NT4.0 sp4. I am
> trying to use make from within the normal cmd.exe of NT, rather than
> from within any of the cygwin shells. The problem I have ONLY happens
> when I run from cmd.exe; it works find from within sh.
.......

Don't blame it on make - it is cmd.exe doing. Once shell parses the
inputline, make does what it can. cmd.exe is too stupid to properly
interpret quotes "" like true shell. Write small code and test VC++ and
Cygwin gcc and see what actually is processed by cmd/shell and what
comes to your code. I suspect that cmd passes quotes, and nmake
compensates for it. It is consistent with DOS/NT/Win32 philosophy where
each program is responsible for interpreting *.*, and cmd.exe simply
passes them down.
 
-- 
Tadeusz
:: The public opinion should be alarmed by its own nonexistence
:: (512)467-0618 ext. 526 ::       Stanislaw J. Lec, trans. TJL

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Make quoted strings problem running from cmd.exe...
@ 1999-08-16 18:44 Kevin Hill
  1999-08-16 19:41 ` Tadeusz Liszka
  1999-08-31 23:49 ` Kevin Hill
  0 siblings, 2 replies; 28+ messages in thread
From: Kevin Hill @ 1999-08-16 18:44 UTC (permalink / raw)
  To: cygwin

Dear reader,

I have Cygwin b20.1 (including make version 3.75) and NT4.0 sp4. I am
trying to use make from within the normal cmd.exe of NT, rather than
from within any of the cygwin shells. The problem I have ONLY happens
when I run from cmd.exe; it works find from within sh.

A simple makefile is shown below:

#--Contents of makefile-------------------------------------
all:		_all

_all:
	CmdLineLook -i "BEGIN { $$^W=1; }"
#--------------------------------------------------------

What I expect from this makefile is that my CmdLineLook programme (which
just outputs what it got on the command line and what the value of the
SHELL environment variable is) will receive two parameters, the first
being "-i", the second being "BEGIN ...... }". If I run with Microsoft's
nmake.exe, I get the following output, as expected:

#- NMAKE.EXE output ------------------------------------------------
Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        CmdLineLook -i "BEGIN { $^W=1; }"
0       -CmdLineLook-
1       --i-
2       -BEGIN { $^W=1; }-
SHELL=(empty)
#--------------------------------------------------------

If I run GNU make from NT's command prompt, I get the following
unexpected output:

#- GNUMake from cmd.exe output --------------------------------
CmdLineLook -i "BEGIN { $^W=1; }"
0       -CmdLineLook-
1       --i-
2       -BEGIN-
3       -{-
4       -$W=1;-
5       -}-
SHELL=cmd.exe
#--------------------------------------------------------

If I run GNU make within the full Cygwin bash shell, I get the following
expected output:
#- GNUMake from bash output --------------------------------
CmdLineLook -i "BEGIN { $^W=1; }"
0       -CmdLineLook-
1       --i-
2       -BEGIN { $^W=1; }-
SHELL=/bin/sh.exe
#--------------------------------------------------------

Is this a bug within Cygnus' implementation, am I using make in
unexected circumstances or am I doing something stupid. I tried changing
the shell in the makefile to see if I could get the one done from
cmd.exe to work, but it never seemed to affect what shell was actually
being run.

Any answers would be gratefully received.

Kev.
kevin.hill@tab.co.nz
New Zealand Totalisator Agency Board (TAB).

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~1999-08-31 23:49 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-17 15:25 Make quoted strings problem running from cmd.exe John Wiersba
1999-08-17 19:39 ` Chris Faylor
1999-08-18  0:08   ` Glenn Spell
1999-08-31 23:49     ` Glenn Spell
1999-08-31 23:49   ` Chris Faylor
1999-08-31 23:49 ` John Wiersba
  -- strict thread matches above, loose matches on Subject: below --
1999-08-18  9:26 John Wiersba
1999-08-31 23:49 ` John Wiersba
1999-08-17 18:12 Kevin Hill
1999-08-17 18:22 ` Mumit Khan
1999-08-31 23:49   ` Mumit Khan
1999-08-31 23:49 ` Kevin Hill
1999-08-17 16:52 Earnie Boyd
1999-08-31 23:49 ` Earnie Boyd
1999-08-17 16:31 Kevin Hill
1999-08-31 23:49 ` Kevin Hill
1999-08-17 15:20 Earnie Boyd
1999-08-31 23:49 ` Earnie Boyd
1999-08-17 14:59 John Wiersba
1999-08-31 23:49 ` John Wiersba
1999-08-17 14:03 Kevin Hill
1999-08-17 14:41 ` Glenn Spell
1999-08-31 23:49   ` Glenn Spell
1999-08-31 23:49 ` Kevin Hill
1999-08-16 18:44 Kevin Hill
1999-08-16 19:41 ` Tadeusz Liszka
1999-08-31 23:49   ` Tadeusz Liszka
1999-08-31 23:49 ` Kevin Hill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).