Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!tale From: tale@cs.rpi.edu (David C Lawrence) Newsgroups: comp.unix.wizards Subject: Re: Make:defining macros with filenames that have '$' in them Message-ID: Date: 24 Feb 90 08:06:07 GMT References: <27177@cup.portal.com> <12219@smoke.BRL.MIL> <1990Feb23.174537.5490@smsc.sony.com> Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 58 In article <27177@cup.portal.com> DeadHead@cup.portal.com (Bruce M Ong) writes: > I have to include a file with '$' in its name (i.e. abc.$cf) in > a macro definition in Make. In article <12219@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: > Did you try $$ ? In <1990Feb23.174537.5490@smsc.sony.com> dce@smsc.sony.com (David Elliott): > Did you? Well, I did when I sent Bruce pretty much exactly the same sentence. I made the following Makefile: whonk: whonk.$$ cat whonk.$$ Then did: $ echo This is a stupid filename. > whonk.\$ $ make whonk cat whonk.$ This is a stupid filename. Now I just tried something else, encouraged by your article saying that it doesn't work. $ /bin/make whonk make: Fatal error in reader: '$' at end of string `whonk.$' The first make, which worked, was with GNU Make 3.57. The make which produced the error is the one supplied with SunOS 4.0.3c. Doug: > Why are you guys posting this kind of question here instead of > comp.unix.questions, which was set up expressly for them? David: > While I agree in principle, this isn't a simple question. Perhaps not. As far as GNU Make was concerned it was a trivial exercise. At any rate it is not a UNIX-WIZARDS question. > So, it may take a wizard to figure out the correct answer (assuming > there is a correct answer other than "Don't use $ in filenames"). Well, I (no wizard, admittedly) couldn't figure out the Sun make problem by just playing around with it. I'm certain I could figure out whether it could be done if I could see the source code, but there seems to be this little problem involving the fact that it's all copyright by SMI so only four people on the whole bloody campus can look at it. (I might indeed discover, as a result of this note, that the sources are primarily free BSD and I can look at that (though I likely won't really care). I have no idea what Sun changed around from BSD sources.) Dave -- (setq mail '("tale@cs.rpi.edu" "tale@ai.mit.edu" "tale@rpitsmts.bitnet"))