Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com> List-Archive: <http://sources.redhat.com/ml/cygwin/> List-Post: <mailto:cygwin AT sources DOT redhat DOT com> List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <17B78BDF120BD411B70100500422FC6309E2CF@IIS000> From: Bernard Dautrevaux <Dautrevaux AT microprocess DOT com> To: "'Randall R Schulz'" <rrschulz AT cris DOT com>, Bernard Dautrevaux <Dautrevaux AT microprocess DOT com>, cygwin AT cygwin DOT com Subject: RE: Shell avoidance in make-3.79.1-3 !! CORRECTED !! needs attent ion from cygwin MAKE maintainer Date: Tue, 26 Jun 2001 21:12:30 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" > -----Original Message----- > From: Randall R Schulz [mailto:rrschulz AT cris DOT com] > Sent: Tuesday, June 26, 2001 9:28 PM > To: Bernard Dautrevaux; cygwin AT cygwin DOT com > Subject: RE: Shell avoidance in make-3.79.1-3 !! CORRECTED !! needs > attent ion from cygwin MAKE maintainer > > > Bernard, > > God, am I out of it lately. > > I never wrote a makefile with the action on the same line as the rule > target name and colon, even when there were no dependent > targets. However, > the semicolon _is_ what the code in job.c is keying off of, correct? No because the semicolon here is in fact a separator, and is thus stripped from the command by make when reading the makefile... > > The problem could be solved by breaking the line, omitting > the semicolon > and thus fitting within make's criteria for a "simple" (directly > executable) action. Regretfully not; read th erest of my mail; even this will break the "packaged" make-3.79.1-3, but will work perfectly if you recompile the make-3.79.1-3 sources!... That's what I've said this mail needs attention from the make maintainers :-) > > I hope I'm not still off base.... You know I was starting on the same base as you, thinking the semicolon was not stripped correctly ;-) so if you feel off base, I was too... Bernard > > Randall Schulz > Mountain View, CA USA > > > At 11:28 2001-06-26, Bernard Dautrevaux wrote: > > > -----Original Message----- > > > From: Randall R Schulz [mailto:rrschulz AT cris DOT com] > > > Sent: Tuesday, June 26, 2001 4:26 PM > > > To: cygwin AT cygwin DOT com > > > Subject: Re: Shell avoidance in make-3.79.1-3 [Correction] > > > > > > > > > Earl, > > > > > > I'm guessing it's the semicolon. You found the code where the > > > decision is > > > made, what does it say? > > > > > > But... Following your lead, I looked at ps.c. What a mess. > > > > > > CORRECTION: ... I looked at >>> job.c <<<. > > > > > > > > > Look at line 2414. Search for "sh_chars_sh" which is used > to inialize > > > "sh_chars" which is tested on line 2569. > > > > > > Why is the semicolon there in your makefile, anyway? > > > >The semicolon is needed to *introduce* the commands of the > rule, otherwise > >ps would be a dependency. The other way to do is replace the > semicolon by > >NL/TAB, but I use semicolon myself quite often when the rule > is so simple. > > > >Just a thought (I don't have make source available right > on): is it possible > >make keeps the semicolon in the rule command? > > > >... searching ... found make-3.79.1 ... > > > >looking at read.c, in read_makefile the semicolon seems to > be stripped from > >the command, so that should be OK; there just some bizarre > twiddling with > >variable_expands somewhere the first time one set cmdleft, > but I take for > >granted it works at least a bit, and as it overwrites the > semicolon by a > >NUL,... > > > >To understand more you should try to debug make. Just trying... > > > >$ configure > > ... > >$ make > > ... > >$ mkdir TEST > >$ cd TEST > >$ echo "all: ; ps" > Makefile > >$ ../make > >ps > > PID TTY TIME CMD > >18681 ttya0 00:00:00 csh > >20969 ttya0 00:00:00 make > >20970 ttya0 00:00:00 ps > > > >Hey!... What's the problem? it works!... Oh wait, I'm > working on a Linux box > >here :-) is there a difference under cygwin? > > > >bash-2.05$ mkdir TEST > >bash-2.05$ echo "all: ; ps" > >all: ; ps > >bash-2.05$ echo "all: ; ps" > Makefile > >bash-2.05$ make > >ps > > PID PPID PGID WINPID TTY UID STIME COMMAND > > 159 1 159 159 -1 500 17:37:55 /usr/bin/sh > > 467 159 467 487 -1 500 17:37:58 /usr/bin/bash > > 95 467 95 499 -1 500 17:38:27 /usr/bin/make > > 310 95 95 232 -1 500 17:38:27 /usr/bin/sh > > 562 310 95 358 -1 500 17:38:27 /usr/bin/ps > > > >Hey, don't work... So the problem is in some WIN32/Cygwin > specific code... > >but I'm not able to check now; you should try to do it > yourself, compiling > >make for debug, then trying to debug it with gdb. > > > >Wait, I can try this; it's a little bit longer on cygwin > than on Linux > >(especially as I had to "unload" my PC for cygwin to be able > to configure), > >but its running smoothly and, BADANG: > > > >$ cd TEST > >$ ../make > >ps > > PID PPID PGID WINPID TTY UID STIME COMMAND > > 302 1 302 302 -1 500 17:46:53 /usr/bin/bash > > 500 302 500 73 -1 500 18:30:48 > >/cygdrive/y/WORK/V3/i486-unknown-linux/Import > >ed/cygnus/make/make > > 453 500 500 331 -1 500 18:30:48 /usr/bin/ps > > > >IT WORKS!... > > > >So what version am I using? > >$ ../make --version > >GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > >Built for i686-pc-cygwin > >Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 > > 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-make AT gnu DOT org>. > > > >$ type make > >make is hashed (/usr/bin/make) > > > >$ make --version > >GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > >Built for i686-pc-cygwin > >Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 > > 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-make AT gnu DOT org>. > > > >It seems to be the same MAKE version, except that I just > rebuild it, OOTB > >:-), from the sources I downloaded from a cygwin mirror... > (my installed.db > >says the installed make is 3.79.1-3 and I'm quite sure the > sources were got > >at the same time). > > > >So probably there's something in the environment of the cygwin make > >maintainer ?-0 I can't say more, regretfully, but I hope > this will allow to > >understand what's happenning. > > > >HTH, > > > > Bernard > > > >PS: To whom it can help, putting the ps on a separate line with th > >efollowing Makefile: > > > >all: > > ps > > > >does not change anything: my recompiled make works OK, the > standard one sill > >fork a shell to execute ps... > > > > > > > > Randy > > > > > > > > > At 17:10 2001-06-25, you wrote: > > > >Randall R Schulz wrote: > > > > > That leaves only the question: Why are you asking > when you know > > > > > already? > > > > > > > >The makefile: > > > > > > > > all: ; ps > > > > > > > >tells me: > > > > > > > >bash-2.05$ make -f ../foo.mk > > > >ps > > > > PID PPID PGID WINPID TTY UID STIME COMMAND > > > > 317 1 317 317 -1 500 14:59:36 /bin/bash > > > > 461 317 461 549 -1 500 14:59:41 > /usr/bin/make > > > > 591 461 461 224 -1 500 14:59:41 /bin/sh > > > > 662 591 461 585 -1 500 14:59:41 > /usr/bin/ps > > > > > > > >that make is invoking /bin/sh in order to invoke /usr/bin/ps. > > > > > > > >Why isn't make invoking /usr/bin/ps directly? > > > > > > > >Earl > > > > > > > > > -- > > > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > > > Bug reporting: http://cygwin.com/bugs.html > > > Documentation: http://cygwin.com/docs.html > > > FAQ: http://cygwin.com/faq/ > > > > > > >-------------------------------------------- > >Bernard Dautrevaux > >Microprocess Ingenierie > >97 bis, rue de Colombes > >92400 COURBEVOIE > >FRANCE > >Tel: +33 (0) 1 47 68 80 80 > >Fax: +33 (0) 1 47 88 97 85 > >e-mail: dautrevaux AT microprocess DOT com > > b DOT dautrevaux AT usa DOT net > >-------------------------------------------- > > > >-- > >Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > >Bug reporting: http://cygwin.com/bugs.html > >Documentation: http://cygwin.com/docs.html > >FAQ: http://cygwin.com/faq/ > -------------------------------------------- Bernard Dautrevaux Microprocess Ingenierie 97 bis, rue de Colombes 92400 COURBEVOIE FRANCE Tel: +33 (0) 1 47 68 80 80 Fax: +33 (0) 1 47 88 97 85 e-mail: dautrevaux AT microprocess DOT com b DOT dautrevaux AT usa DOT net -------------------------------------------- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/