First off I wanted to give a belayed thanks to Allan and Harvey for their feedback.
My first attempt at attacking this problem was incorrect because this Makefile runs on *nix and Windows, whereas my solution seems to work only on Unix / Linux. Using the find command in $(shell find -type f) is not portable in this case. Looking through the make functions, I didn't seem to find anything that would go and list out files given an argument of a top level directory. I know of the foreach iterator and in conjunction with the wildcard function could list everything out, however you would still need to get a list of all the subdirectories to pass to it. There is an easier way to do this right? Thanks, Randy On Mon, Apr 20, 2009 at 8:28 PM, Allan Wind <[email protected]>wrote: > On 2009-04-20T19:50:34, Randy Kao wrote: > > I was trying to implement a variable assignment to all files below the > > current directory where my Makefile resides currently. > > Here is what I do: > > rootdir = $(word 1,$(patsubst %/,%,$(dir $(MAKEFILE_LIST)))) > > > /Allan > -- > Allan Wind > Life Integrity, LLC > http://lifeintegrity.com > > > > _______________________________________________ > Help-make mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-make >
_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
