Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <2C08D4EECBDED41184BB00D0B74733420473EE0A@exchanger.cacheflow.com> From: "Karr, David" To: cygwin AT cygwin DOT com Subject: RE: using cygpath & make Date: Mon, 9 Jul 2001 14:44:48 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" First of all, change the end of the first line of the rule which ends with "${NEW_FLAGS}" to "$${NEW_FLAGS}". That will make the "$(NEW_FLAGS)" value print out correctly. I don't remember the details of why this is necessary. Second, you could do the same to the second line, but it will still print out an empty string, because each line of a Make rule is in a separate subshell. You set the value of "NEW_FLAGS" in a different subshell than you're printing it out (in the second line). If you're setting a variable in a subshell, everything that uses it has to be in the same subshell, so you'd have to use a "; \" to end the first line, to make the second line be in the same subshell. -----Original Message----- From: ASH, JAMES (SBCSI) [mailto:ja7295 AT sbc DOT com] Sent: Monday, July 09, 2001 2:33 PM To: cygwin AT cygwin DOT com Subject: using cygpath & make I'm using cygwin to develop applications that will be portable between by laptop and the various Unix boxes that we support. I would like to use cygpath to manage my path, classpath etc. I read this in the user guide on cygpath: "The -i option supresses the print out of the usage message if no filename argument was given. It can be used in make file rules converting variables to a proper format" This is exactly what I want to use cygpath for - specifically managing CLASSPATH in my make files. But as there is no example, I am at a loss as to how to go about doing this. I put together a simple target to illustrate what I am trying to do. mytemp: NEW_FLAGS=`cygpath -p -w /usr/local/bis`; echo new_flags is: "${NEW_FLAGS}" echo "${NEW_FLAGS} when I run 'make mytemp' , I get: $ make mytemp NEW_FLAGS=`cygpath -p -w /usr/local/bis`; echo new_flags is:"" new_flags is: echo "" NEW_FLAGS appears to be empty. running cygpath -p -w /usr/local/bis from the command line gives me: d:\bis which is correct. Can someone explain what the user guide is trying to tell me about how to use cygpath in a makefile? What am I missing?? Thanks. Jim -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/