[Top][All Lists]

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

Re: few simple make syntax questions

From: Paul Smith
Subject: Re: few simple make syntax questions
Date: Thu, 07 Feb 2008 11:14:02 -0500

All of these questions are answered in the very good (if I do say so!)
GNU make manual.  You can find it here:

On Thu, 2008-02-07 at 11:02 -0500, joe shoemaker wrote:
> What does $(wildcard *~) mean?

The same thing as "ls *~": match all the files that end in tilde ("~").

> When you have something like this: src/, what does % in front
> of .py mean?

It's a pattern.  It matches any set of characters.  What EXACTLY it
means depends on where it's used; see the GNU make manual sections on
pattern rules, static pattern rules, etc.

> MODS is a make variable.  When you have ${MODS:%=%.pyc}, what does :%=
> %.pyc do?

It's shorthand for $(patsubst $(MODS),%,%.pyc), which is equivalent (in
this particular case) to $(addsuffix $(MODS),.pyc).

Or, "add .pyc to the end of every word in the value of the variable

> Also, what does this: represent in plain english?

Assuming there's a recipe after it, it means that any file can be built
from that same file extended with .sh by running that recipe.  Or, more
concretely, any file "foo" can be constructed from another file ""
using that recipe, for any string "foo".

 Paul D. Smith <address@hidden>       
 "Please remain calm--I may be mad, but I am a professional."--Mad Scientist

reply via email to

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