[lug] bash wildcard expansion from Makefile
D. Stimits
stimits at idcomm.com
Fri May 3 15:36:54 MDT 2002
Ok, this seems like it should be trivial, but I'm not a great bash shell
programmer. From a Makefile, I find a number of problems using bash
shell (and even greater problems doing without bash). From within a
segment of bash script as the means to bring a dependency up to date, it
does not seem possible to use wildcard expansion, EG:
mytarg:
cp Makefile* ../foo/
I've used a lot of quoting variations, the closest seems:
mytarg:
"cp" "Makefile*" "../foo/"
This of course fails because "Makefile*" is literal as a string, and the
"*" portion is not being considered for expansion inside of a string.
I've tried a number of different ways to try and get the "Makefile*"
expand to all of the variations, e.g., "Makefile.linux", "Makefile.dep".
Is there an easy way to turn on wildcard expansion, despite the quoting?
D. Stimits, stimits at idcomm.com
PS: The actual target is doing some packaging of sources, it isn't
really a build stage.
More information about the LUG
mailing list