help-make
[
Top
][
All Lists
]
Advanced
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
A better way to perform substitution in make
From
:
Randy Kao
Subject
:
A better way to perform substitution in make
Date
:
Mon, 20 Apr 2009 19:50:34 -0700
Hi all,
I was trying to implement a variable assignment to all files below the current directory where my Makefile resides currently.
I ended up with the following:
ALLFILES := $(shell find . -type f)
The only problem with this was that it gave me a leading "./" (i.e. ./abc.txt, ./dir1/foo.bar, ./dir2/foo.txt, etc) in front of the files.
I then tried to use make's patsubst and filter-out to remove the "./" with no luck.
EDITEDFILES := $(patsubst ./,,$(ALLFILES))
Is there something obviously wrong that I'm missing or is there even a better way to do this entirely?
Your feedback is greatly appreciated as usual.
Thanks for your time,
Randy
reply via email to
[Prev in Thread]
Current Thread
[
Next in Thread
]
A better way to perform substitution in make
,
Randy Kao
<=
Re: A better way to perform substitution in make
,
Harvey Chapman
,
2009/04/20
Re: A better way to perform substitution in make
,
Allan Wind
,
2009/04/21
Re: A better way to perform substitution in make
,
Randy Kao
,
2009/04/30
Prev by Date:
Re: Pattern rules with directories
Next by Date:
Re: A better way to perform substitution in make
Previous by thread:
Pattern rules with directories
Next by thread:
Re: A better way to perform substitution in make
Index(es):
Date
Thread