Re: Loop/wildcard-like syntax for GNU make?
"Matthew Bowie" <[email protected]>
| Newsgroups | gmane.org.user-groups.nmlug |
|---|---|
| Message-ID | <[email protected]> |
This one anchors the the gif so gif isn't replaced inside the filename (just
the extension). Guess could also add a . on there so it only matches things
that end in .gif instead of anything that ends in gif.
all:
for i in *.[Gg][Ii][Ff]; do make `echo $${i} | sed
s/"[gG][iI][fF]$$"/jpg/g`; done
%.jpg: %.[gG][iI][fF]
convert $*.[gG][iI][fF] $*.jpg
On 4/17/07, Matthew Bowie <[email protected]> wrote:
>
> Here's something that's probably more what you were looking for.
>
> all:
> for i in *.[Gg][Ii][Ff]; do make `echo $${i} | sed
> s/"[gG][iI][fF]"/jpg/g`; done
>
> %.jpg: %.[gG][iI][fF]
> convert $*.[gG][iI][fF] $*.jpg
>
> Seems to work for me, but might depend on your shell, etc. Might want to
> set the SHELL variable to be sure it works.
>
> Matt
>
>
> --
> Matthew Bowie
> Programmer/IT Consultant
> [email protected]
>
--
Matthew Bowie
Programmer/IT Consultant
[email protected]
_______________________________________________
NMLUG mailing list
[email protected]
http://lists.b9.com/cgi-bin/mailman/listinfo/nmlug