RE: Problems with Make, VPATH and MS-DOS paths
Nate Bohlmann wrote on Monday, November 17, 2003 5:53 PM: Hi, I'm having a problem getting MS-DOS paths to work properly with VPATH under GNU Make 3.80. The problem is that the VPATH processing tacks on a Unix path separator ('/') to the end of the VPATH giving me a source file name something similar to code\src\fw/foo.c. This is a significant problem for the compiler I'm using (NOT gcc) since it spits out map and list files based on the stem of the input source name which it decides is 'fw/foo.c'. Because of this same compiler, I cannot use Unix path names under a cygwin shell due to the fact that it screws up the internal processing of this compiler. So, I would like to know if it's possible to get the VPATH processing to use an MS-DOS separator when generating source file names. I've tried using the --win32 switch with no success. Thanks in advance Nate Bohlmann ([EMAIL PROTECTED]) Old, put still valid: http://www.cygwin.com/ml/cygwin/2000-06/msg01318.html :) -- 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/
Re: Problems with Make, VPATH and MS-DOS paths
Thanks everyone for your help. Turns out that the backquoting specified here won't work to a shell incompatibility (I don't care to fix this now). However, $(shell ... ) does work so thanks. Nate 11/18/03 11:35:07 AM, Shankar Unni [EMAIL PROTECTED] wrote: Nate Bohlmann wrote: How exactly does a command line tool help with VPATH'ing inside of Make? You use cygpath to generate names to pass to your broken compiler. (Yes, broken - Win32, and most tools running on it like VC++, are perfectly happy with / as path separators). I.e. instead of just doing .c.o: $(BROKENCOMPILER) -c $? -o $*.o # or whatever You do .c.o: $(BROKENCOMPILER) -c `cygpath -w $?` -o `cygpath -w $*`.o (Those are back-quotes, by the way). -- 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/ -- 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/
RE: Problems with Make, VPATH and MS-DOS paths
From: Nate Bohlmann Sent: Monday, November 17, 2003 8:53 PM 11/17/03 12:31:23 PM, Hannu E K Nevalainen [EMAIL PROTECTED] wrote: From: Nate Bohlmann Sent: Monday, November 17, 2003 5:53 PM Hi, I'm having a problem getting MS-DOS paths to work properly with VPATH under GNU Make 3.80. The problem is that the VPATH processing tacks on a Unix path separator ('/') to the end of the VPATH giving me a source file name something similar to code\src\fw/foo.c. This is a significant problem for the compiler I'm using (NOT gcc) since it spits out map and list files based on the stem of the input source name which it decides is 'fw/foo.c'. SNIP $ cygpath --help IMO it should help to solve all your problems. cygpath is part of the base package so there is no need go looking for it either; if you have cygwin then you have cygpath too. SNIP How exactly does a command line tool help with VPATH'ing inside of Make? Sorry, if what I've written doesn't apply to your needs, but why so sceptic? cygpath doesn't help with VPATH specifically, but with the use of what make has found based on VPATH. -- info man, excerpt -- This is done with the automatic variables such as `$^' (*note Automatic Variables: Automatic.). For instance, the value of `$^' is a list of all the prerequisites of the rule, including the names of the directories in which they were found, and the value of `$@' is the target. Thus: foo.o : foo.c cc -c $(CFLAGS) $^ -o $@ -- end of excerpt -- To give you the idea what I'm thinking of: foo.o : foo.c arg1=`cygpath -d $^`; \ arg2=`cygpath -d [EMAIL PROTECTED]; \ cc -c $(CFLAGS) $arg1 -o $arg2 ...should IMO be possible. NOTE that the above HAS NOT BEEN TESTED and *IS NOT* expected to work as it is written - look at it as pseudocode with a slight bash-tint. If the example above doesn't produce the expected result, then try creating a (bash)script that you launch with/from (the) make/Makefile - with args as indicated above. In that script you then have the liberty to use cygpath in any manner necessary to achieve what you wish. NOTE: There is a patch in the mail archives that makes cygpath more fit for $^ processing. Here: http://www.cygwin.com/ml/cygwin-patches/2003-q4/msg00063.html - you need to get the cygpath source from cvs - as this doesn't seem to have made it into binary builds on the mirrors yet. /Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E -- printf(LocalTime: UTC+%02d\n,(DST)? 2:1); -- --END OF MESSAGE-- -- 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/
Re: Problems with Make, VPATH and MS-DOS paths
Nate Bohlmann wrote: How exactly does a command line tool help with VPATH'ing inside of Make? You use cygpath to generate names to pass to your broken compiler. (Yes, broken - Win32, and most tools running on it like VC++, are perfectly happy with / as path separators). I.e. instead of just doing .c.o: $(BROKENCOMPILER) -c $? -o $*.o # or whatever You do .c.o: $(BROKENCOMPILER) -c `cygpath -w $?` -o `cygpath -w $*`.o (Those are back-quotes, by the way). -- 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/
RE: Problems with Make, VPATH and MS-DOS paths
From: Nate Bohlmann Sent: Monday, November 17, 2003 5:53 PM Hi, I'm having a problem getting MS-DOS paths to work properly with VPATH under GNU Make 3.80. The problem is that the VPATH processing tacks on a Unix path separator ('/') to the end of the VPATH giving me a source file name something similar to code\src\fw/foo.c. This is a significant problem for the compiler I'm using (NOT gcc) since it spits out map and list files based on the stem of the input source name which it decides is 'fw/foo.c'. SNIP $ cygpath --help IMO it should help to solve all your problems. cygpath is part of the base package so there is no need go looking for it either; if you have cygwin then you have cygpath too. /Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E -- printf(LocalTime: UTC+%02d\n,(DST)? 2:1); -- --END OF MESSAGE-- -- 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/
Re: RE: Problems with Make, VPATH and MS-DOS paths
11/17/03 12:31:23 PM, Hannu E K Nevalainen [EMAIL PROTECTED] wrote: From: Nate Bohlmann Sent: Monday, November 17, 2003 5:53 PM Hi, I'm having a problem getting MS-DOS paths to work properly with VPATH under GNU Make 3.80. The problem is that the VPATH processing tacks on a Unix path separator ('/') to the end of the VPATH giving me a source file name something similar to code\src\fw/foo.c. This is a significant problem for the compiler I'm using (NOT gcc) since it spits out map and list files based on the stem of the input source name which it decides is 'fw/foo.c'. SNIP $ cygpath --help IMO it should help to solve all your problems. cygpath is part of the base package so there is no need go looking for it either; if you have cygwin then you have cygpath too. SNIP How exactly does a command line tool help with VPATH'ing inside of Make? -- 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/