Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: if construct doesn't work in makefile Date: Thu, 11 Nov 2004 13:21:37 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Morche Matthias" To: X-OriginalArrivalTime: 11 Nov 2004 12:21:38.0115 (UTC) FILETIME=[FE02C130:01C4C7E8] X-IsSubscribed: yes Content-Transfer-Encoding: 8bit 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/