help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to write rules for files with special characters?


From: John Graham-Cumming
Subject: Re: how to write rules for files with special characters?
Date: Wed, 04 Jun 2008 13:50:51 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peng Yu wrote:
| For a file named as abc+=.cc, how do I refer to such name in Makefile?
| I tried to abc\+\=.cc, but it seems not working.

GNU Make's escaping rules won't help you there (see
http://www.cmcrossroads.com/content/view/8442/120/) but you can just
define a variable to contain the equals sign and use it to hide the =
from the parser.

e.g.

e := =

abc+$e.cc: ; @echo Making $@

Or if you really want to do something wild you can define a variable
called = which expands to =

e := =
$e := =

abc+$=def: ; @echo Making $@

John.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIRoGbLphrp73n/hARAizcAKDZMfN0R+rGcGMwjhKxPPm8kNlMbACcDfhY
8oUCusTKfL35mcwjvDMWaTQ=
=3DAd
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]