X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=KGtrMefq9Nz1hwhZZg16yhqMqmtUfg9voVxpksfHpo1 mKZMlW+94z2QzBHFq/wOExPvRw3jJ3bL/Uoo8Rh2++Rm0NaUP/Vx51KyE16iy0gG 2A7uMDsYGDKAD2TedQDlyHN07QD8Fx5C9WOCOOPPKBicqH0hqnmI4fijrclMN2J0 = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=7h4goUeRRsYUNH36tSAR562P/R0=; b=tRZGEUrS7XhvnBqoP 8TW7m9dSgWdnAo7o/N+/bXa+oNiNd+eE/o1t8laBe6HF8ow7tv8FnAXjRYzWLua4 vogP8RyB37r+NPxx+8EaCRq6VxHoRoEPrQRBbwcC3ezP91S8JBWNRHADBBdtW6Md 5UtXMS6nvtFvCOrAZFP0xxJB5o= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.1 Message-ID: <51AF6A55.2090203@etr-usa.com> Date: Wed, 05 Jun 2013 10:41:57 -0600 From: Warren Young User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Cygwin-L Subject: Re: How does make determine which shells to invoke when executing external commands? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 6/5/2013 09:32, Hua Ai wrote: > > I have gone through FAQ and mailing lists but couldn't find an answer > to this. The answer is in the GNU make docs, or in the O'Reilly book if you prefer. > Especially, this line: > > @mkdir -p $(dir $@) > > It seems that, for the computers where it didn't work, the makefile > always invokes the mkdir from windows (Windows 7 64bit). That means those computers have a native Windows version of GNU make on them, most likely the one from MinGW. MinGW GNU make is built to use cmd.exe to interpret shell commands, not /bin/sh as Cygwin's GNU make does by default. The docs will further enlighten you about how the SHELL variable can override this default behavior. I suspect "SHELL=/bin/sh" still won't do the right thing, though, since MinGW GNU make doesn't understand POSIX paths. Something like SHELL=c:\cygwin\bin\sh.exe *might* work. A superior solution is to get everyone to use Cygwin make. If you can't do that, because you don't have any influence over the software installed on the other computers, you might have to switch to one of the portable Makefile builders, so you can ship both POSIX and MinGW makefiles. Bakefile (http://bakefile.org/) can do this for sure. CMake and Scons probably can, too. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple