[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: about subst
Re: about subst
Tue, 29 Aug 2006 01:18:55 -0700 (PDT)
Thank you for your reply!
Your answer has answered all of my questions. Cool!
Date: Mon, 28 Aug 2006 10:16:23 +0200
From: "Danny Boelens" <address@hidden>
Subject: Re: about subst
Content-Type: text/plain; charset="iso-8859-1"
----- Original Message -----
From: "Lin George" <address@hidden>
Sent: Sunday, August 27, 2006 2:18 PM
Subject: about subst
> rm $(subst /,\,$@)
> Could anyone tell me what means $(subst /,\,$@)?
> page in the make manual covers this point?
There are multiple pages covering this single line.
First of all, this is a rule for Foo, the target, and
the rule has no
prerequisites, only commands. See Chapter 4, Writing
Then we have the subst function (see 8.2 Functions for
and Analysis) which is used as argument for rm. And
just in case: rm is
unix command to remove files are directories. Since
the syntax is
fro, to, something) it is clear that this will replace
by backward slashes (\) in something ($@ in this
And finally we have $@, which is the file name of the
target of the
the name of the archive file is the target is an
archive member). See
In your example the subst isn't doing much as there
are no forward
in your target. To give a better example:
rm $(subst /,\,$@)
is a rule for some/dir/with/foo, and when its commands
are executed it
(try to) remove some\dir\with\foo.
Hope this helps,
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
- about subst, Lin George, 2006/08/27
- Re: about subst,
Lin George <=