Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <37B9F113.763EEF82@bigfoot.com> Date: Wed, 18 Aug 1999 11:32:35 +1200 From: Kevin Hill X-Mailer: Mozilla 4.06 [en] (WinNT; I) MIME-Version: 1.0 To: cygwin AT sourceware DOT cygnus DOT com Subject: RE: Make quoted strings problem running from cmd.exe... Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: arg 1: arg 2: 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 DOT Hill AT tab DOT co DOT 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 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 . > > $ make > prtcmd a "b c" d > arg 0: > arg 1: > arg 2: > arg 3: > prtcmd -i "BEGIN { $^W=1; }" > arg 0: > arg 1: <-i> > arg 2: > > > -----Original Message----- > > From: Glenn Spell [mailto:glenn AT gs DOT fay DOT nc DOT us] > > Sent: Tuesday, August 17, 1999 5:41 PM > > To: cygwin AT sourceware DOT cygnus DOT 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 ) _ _____ > > ) 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 AT sourceware DOT cygnus DOT com > > > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT 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 AT sourceware DOT cygnus DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com