On Sun, 2011-10-23 at 19:21 +0200, earlgrey wrote: > __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard > $(MODVERDIR)/*.mod))) > > with MODVERDIR=fglrx-11.06[Driver 8.861]
There's no problem with underscores. The problem with [] is that these are special to the shell's globbing capability, just like "*" is a special character. Ditto for the whitespace. Run "man 7 glob" for details. If you try this from the shell: echo fglrx-11.06[Driver 8.861]/*.mod you will not get back what you want either. You have to escape special characters: MODVERDIR = fglrx-11.06\[Driver\ 8.861\] then it will work. I should point out that (a) GNU make doesn't support spaces in targets in general, so the whitespace will continue to be a problem for you going forward, and (b) if you insist on using shell-special characters like [] in your filenames you'll have to be very careful about how you write your shell commands in recipes, to quote all the filenames that might contain these characters. My advice: don't use these kinds of pathnames. You can make it work but the ongoing effort will be significant. -- ------------------------------------------------------------------------------- Paul D. Smith <psm...@gnu.org> Find some GNU make tips at: http://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make