Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@sources.redhat.com Delivered-To: mailing list cygwin@sources.redhat.com Message-Id: <200010040051.e940pxh07139@laxmls02.socal.rr.com> X-Sender: cloder@pop-server.socal.rr.com X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0 Date: Tue, 03 Oct 2000 17:54:38 -0700 To: cygwin@sourceware.cygnus.com From: Chad Loder Subject: Cygpath, backslashes, and sh.exe In-Reply-To: <003101c02d8c$500db1c0$3c5350d8@guinness> References: <200010032006.e93K6ih16791@laxmls02.socal.rr.com> <200010032207.e93M7bh18034@laxmls02.socal.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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@sourceware.cygnus.com