Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <5.1.0.14.2.20010625161345.0257c1d8@pop3.cris.com> X-Sender: rrschulz AT pop3 DOT cris DOT com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 25 Jun 2001 16:17:46 -0700 To: cygwin AT cygwin DOT com, Earl Chew From: Randall R Schulz Subject: Re: Shell avoidance in make-3.79.1-3 In-Reply-To: <20010625181817.B22784@redhat.com> References: <3B37B58B DOT F87EA366 AT agilent DOT com> <3B37B58B DOT F87EA366 AT agilent DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Earl, What are you trying to do? What do you mean by "/bin/sh avoidance?" Make has no ability to interpret commands, and relies on a shell to do that for each command it decides to invoke. If you're trying to minimize the number of shell invocations, you can embed semicolons in make action lines to get more than one command invoked per shell invocation. You can combine that technique with end-of-line backslash escapes to keep multiple commands from piling up on a single line of the makefile. Otherwise, no, there's no way to completely take a command interpreter out of the loop when make needs to invoke actions. Randall Schulz Mountain View, CA USA At 15:18 2001-06-25, Christopher Faylor wrote: >Please check out the cygwin mailing list, where, within the last 24 >hours, the topic of not sending personal email to the package >maintainers (specifically me) has been discussed. > >Please do not CC or Bcc me on mail that is intended for the cygwin >mailing list. I read it quite regularly. > >Anyway, to answer your question: I can't provide any advice. I don't >know how to do this. > >cgf > >On Mon, Jun 25, 2001 at 03:04:59PM -0700, Earl Chew wrote: > >Can anyone offer some advice /bin/sh avoidance with make? > > > >I'm trying to figure out how to trigger make-3.79.1-3 to avoid > >invoking /bin/sh unnecessarily. > > > >I construct a makefile: > > > > all: ; sleep 15 > > > >Then I try: > > > >bash-2.05$ echo $SHELL > >/bin/sh > >bash-2.05$ ps > > PID PPID PGID WINPID TTY UID STIME COMMAND > > 317 1 317 317 -1 500 14:59:36 /bin/bash > > 261 317 261 458 -1 500 14:59:36 /usr/bin/ps > >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 > > > >I then try with SHELL unset: > > > >bash-2.05$ unset SHELL > >bash-2.05$ echo $SHELL > > > >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 > > 465 317 465 563 -1 500 15:01:41 /usr/bin/make > > 666 465 465 620 -1 500 15:01:41 /bin/sh > > 699 666 465 710 -1 500 15:01:41 /usr/bin/ps -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple