Make:defining macros with filenames that have '$' in them
David C Lawrence
tale at cs.rpi.edu
Sat Feb 24 19:06:07 AEST 1990
In article <27177 at cup.portal.com> DeadHead at 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 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
> Did you try $$ ?
In <1990Feb23.174537.5490 at smsc.sony.com> dce at 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 at cs.rpi.edu" "tale at ai.mit.edu" "tale at rpitsmts.bitnet"))
More information about the Comp.unix.wizards
mailing list