www.delorie.com/archives/browse.cgi | search |
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:mime-version:date:message-id:subject:from:to | |
:content-type; q=dns; s=default; b=OD/+lRZHaqOhzqq7p5cOhIXISLKiS | |
moMYnRHTsdCLci1hYMUYUUcgBNy7HEC49EPHEMF3jkdkzx5ggzFfDX8NnGKQnAmX | |
9zzS8gExXu9gVvtkBAgl1KbM4h21Mmi6c+tqCBH3OSypiCrlLuVcv+A6HsZtXUbv | |
G9sNuOdj4bSplI= | |
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:mime-version:date:message-id:subject:from:to | |
:content-type; s=default; bh=Zeo615xI5/ItgppaZ3jp6svFqls=; b=lSg | |
Rwj7sj69yYenJNTqZpQYReUee5Iz3mbiUxslmZz9Z65ukUNcCRfTonPNMSEoMpS5 | |
EjeM12NYQ8ii2nOC7VSQL4g3mYtmI9aqQlieETkR0Zxm1YeDJl9O6sUkN5Ky65kT | |
VDg8q6LvQ25W5wROYhdOkSRHvOmKQbyYhjJ74JOg= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1 |
MIME-Version: | 1.0 |
X-Received: | by 10.66.255.99 with SMTP id ap3mr35090851pad.102.1370446374206; Wed, 05 Jun 2013 08:32:54 -0700 (PDT) |
Date: | Wed, 5 Jun 2013 09:32:54 -0600 |
Message-ID: | <CAPzB_RzA3LBR8QKZA0NT6UJmkt6dr=qHj-s85RmY2xAd4K3KAQ@mail.gmail.com> |
Subject: | How does make determine which shells to invoke when executing external commands? |
From: | Hua Ai <tommy DOT ai AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Hi all, I have gone through FAQ and mailing lists but couldn't find an answer to this. I would appreciate it if someone could shed some lights on this: Basically I have a makefile that works in some computers but not others. Through troubleshooting I think I have located the problem to the lines below: $(PREFIX)/include/cyg/hal/basetype.h: $(REPOSITORY)/$(PACKAGE)/include/basetype.h @mkdir -p $(dir $@) @cp $< $@ @chmod u+w $@ 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). I know this because I replaced the line above with "@mkdir aboslute_path" in the make file, and find that it works if the absolute_path uses \ instead of /. If I leave -p in there, it would create a directory named "-p". If I type in "mkdir -p aboslute_path" in cygwin bash shell instead of running it from the makefile, it would support -p switch and forward slash / in the path. So it sounds like when make executes mkdir from a makefile, it invokes windows command shell(?) to run mkdir. But if I add "which mkdir" in the makefile, it returns "/usr/bin/mkdir", which is the same as if I types "which mkdir" in the bash shell. My questions are: 1. From what I described, do you think the make program invoked windows command shell to execute mkdir? How to confirm that (or is it apparent already)? 2. How can I make sure the make program consistently invokes bash shell for executing mkdir from the makefile? (some computer environment does this already, and others doesn't) Thanks in advance! Regards, Hua -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |