Message-ID: <352BBDA7.7D2BFE29@home.com> From: "Edward F. Sowell" MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: When in Rome... Content-Type: multipart/mixed; boundary="------------EAA5A4E0AADB3D971A282DE1" Lines: 88 Date: Wed, 08 Apr 1998 18:10:03 GMT NNTP-Posting-Host: cc984399-a.flrtn1.occa.home.com NNTP-Posting-Date: Wed, 08 Apr 1998 11:10:03 PST Organization: @Home Network To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk This is a multi-part message in MIME format. --------------EAA5A4E0AADB3D971A282DE1 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I have a complaint about the way GNU make deals with the DOS/Windows path separator, '\'. It has been pointed out to me that I can't use mydir\myfile in a GNU makefile because \ is an escape character for GNU make. The suggested workarounds are (a) use \\ or (b) use /. Well, there are cases (like mine) where neither will really work. First, a silly little example. The makefile: ../gpp/myfunct.obj: myfunct.cpp gcc -v -c -o ../gpp/myfunct.obj myfunct.cpp move myfunct.obj f:/spark/doc/examples/int will not work, failing at the move. Says "Too many parameters - /spark" Apparently, the / are not converted to \ for DOS commands. If I change the move to move myfunct.obj f:\spark\doc\examples\int it doesn't give an error message, but the file is renamed fsparkdocexamplesint! If I change it to move myfunct.obj f:\\spark\\doc\\examples\\int then it works. But look at the inconsistency! Now, I know I can change the whole thing to ..\\gpp\\myfunct.obj: myfunct.cpp gcc -v -c -o ..\\gpp\\myfunct.obj myfunct.cpp move myfunct.obj f:\\spark\\doc\\examples\\int so it works and is consistent. Therefore, looking for a rule on path separators I can use consistently, I was moved to the (somewhat unappealing) \\. But then the really serious problems began. Suppose that make is interacting with other programs that read and write path strings from/to files, and invoking system functions, e.g., file opening, etc. What am I to do then? I am lead into a constant changing of code and data files, "\\" to "\" for use by the system functions and back to "\\" for make. This, for me, is intolerable, since my code must be built with other compilers and make programs too. I think I can see why things are the way they are here... GPP and GNU make are being used primarily by workstation warriors who are being required to move their Unix apps to the Windows environment. For them, all of the above is not likely to be a problem. But, for those of us who were hoping for a public domain C++ environment for apps born and raised in Dos/Windows, it really doesn't meet the need. Unfortunately, it has taken a couple weeks out of my life to discover this. I should add that my code WAS designed to work also under Unix. So I carefully set compile switches to use \ for DOS/Windows or / for Unix. That is, when in Unix I do as the Unix world dictates, avoiding the temptation to try force Unix to work with DOS/Windows syntax. Shouldn't those who port Unix to Dos/Windows be doing acting in kind? If there is something I'm missing that will cause me to retract the above analysis, I'd like to hear about it. Ed Sowell --------------EAA5A4E0AADB3D971A282DE1 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Edward F. Sowell Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Edward F. Sowell n: Sowell;Edward F. adr;dom: 1207 N. Van Buren St.;;;Placentia;California;92870; email;internet: sowelled AT home DOT com tel;work: 714-278-3291 tel;fax: 714-278-7168 x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard --------------EAA5A4E0AADB3D971A282DE1--