delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/03/22:27:44

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <50028CAE26D1D3118C7F00A0CC50D6256A926E@EMWARESERVER>
From: Scott Carter <scarter AT emware DOT com>
To: "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com>
Cc: "'Chad Loder'" <cloder AT acm DOT org>
Subject: RE: Cygpath, backslashes, and sh.exe
Date: Tue, 3 Oct 2000 20:26:41 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

I don't know if you tried to use it this way, or if you just typed it
incorrectly in your email, but the syntax of the subst function is
incorrect. There should not be a comma immediately after subst.

wrong: $(subst,\\,\\\\,$(shell cygpath -w $<))
right: $(subst \\,\\\\,$(shell cygpath -w $<))

Scott Carter

-----Original Message-----
From: Chad Loder [mailto:cloder AT acm DOT org]
Sent: Tuesday, October 03, 2000 06:55 PM
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Cygpath, backslashes, and sh.exe


Hi all. Thanks for your help with cygpath (I *did* look in 
the FAQ, I just didn't know what to look for). :)

cygpath *seems* to be doing the right thing (it's hard
to tell), but there is some sort of problem with
backslashes. I have a rule like this:

%.obj : %.cpp
	$(CC) $(CPPFLAGS) $(shell cygpath -w $<)

The idea is that this will invoke sh.exe with something like:

 /c/VC98/bin/cl.exe /Fo:globref.obj c:\r7\jni\src\globref.cpp

But instead it seems to do:

 /c/VC98/bin/cl.exe /Fo:globref.obj c:r7jnisrcglobref.cpp

which causes the compiler to bomb out with:

 fatal error C1083: Cannot open source file: 'c:r7jnisrcglobref.cpp': No
such file or  directory

I figured I need to escape the backslashes before passing them
to a shell command. So I tried things like:

%.obj : %.cpp
	$(CC) $(CPPFLAGS) $(subst,\\,\\\\,$(shell cygpath -w $<))

but the subst function seems to just return an empty string (this
happens even when I use something without backslashes,
like $(subst,a,b,whatever).

Has anyone run into this?

Thanks,
	c

	c

At 05:50 PM 10/3/2000 -0500, you wrote:
>Chad:
>
>    Hey, no problem.  Let me know if you run into other problems.  My
>company uses it's own make system under cygwin as well.  We also use Visual
>C++ as the compiler.
>
>cheers,
>-Matt



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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