bug-make
[Top][All Lists]
Advanced

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

Re: problems with directory in make


From: Sam Ravnborg
Subject: Re: problems with directory in make
Date: Wed, 11 Jun 2003 22:11:29 +0200
User-agent: Mutt/1.4.1i

On Wed, Jun 11, 2003 at 10:36:11AM -0400, Paul D. Smith wrote:
> 
> This would work:
> 
>   install:
>         cd LINUX/mod; mod2=`echo *`

Or without launching a shell:
install:        mod2 := $(patsubst LINUX/%,%,$(wildcard LINUX/*))

$(wildcard LINUX/*) will list all files in the LINUX directory,
including the LINUX/ part of the path.

$(patsubst LINUX/%,% ...) replaces all occurences of LINUX/ with nothing.
The second '%' tell make to take what it matched with '%' in the first
part and use that string.
So with LINUX/abc.c using "LINUX/%", then % will match abc.c (the stem)
and that is the string used.

But them we start to use the advanced make features, and in this
case the basics are missing.

        Sam




reply via email to

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