delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/11/07:22:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
content-class: urn:content-classes:message
MIME-Version: 1.0
Subject: RE: if construct doesn't work in makefile
Date: Thu, 11 Nov 2004 13:21:37 +0100
Message-ID: <D7FBE8A336018A4EB5EBDC6C898821930991C931@HUELVA.belgium.fhm.de>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: "Morche Matthias" <Matthias DOT Morche AT P7S1Produktion DOT de>
To: <cygwin AT cygwin DOT com>
X-OriginalArrivalTime: 11 Nov 2004 12:21:38.0115 (UTC) FILETIME=[FE02C130:01C4C7E8]
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id iABCM8bZ027030

cygwin-owner AT cygwin DOT com wrote:
> Hi,
> 
>   In my make file I am trying to check whether a directory exists or
> not then set a path differently if doesn't exist.
>   I am using cygwin installed on windows 2000.
>   The if construct I have is as follows.
> 
>   if test [-dc:/tools]; then DRIVE = c:/tools; else DRIVE =
> c:/altTools; fi 
> 
>  pls help me out.
> 
> Regards,
> sitaram

Does the following work better?
if test [ -d /cygdrive/C/tools ]; then DRIVE=c:/tools; else DRIVE=

By the way: this seems not to be a cygwin problem and it would be very helpful to provide at least the error message.

See http://cygwin.com/problems.html

  matthias


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019