0

I have tried to simplify this makefile to the bare minimum, but cannot get it to use an executable to convert one type of file to another if the timestamps have changed. I'm sure there is a stupidly simple answer but cannot find it:

%.pvr : %.bmp
        $(toolpath) -i"$<" -fOGLPVRTC4 -r2 -x512 -y512 -m -o$@

all : 01.pvr

01.pvr : 01.bmp

I am attempting to convert all .bmp files specified to .pvr

01.pvr does not exist. 01.bmp does exist. However i always get

make: Nothing to be done for `all'.

Edit: ok, this was not the exact makefile I was using, in fact the files were not called 01.pvr and 01.bmp, they were foo.pvr and bar.bmp This seems to make a difference. What could that be?

2
  • 2
    I just tried your makefile, replacing your $(toolpath) command with 'cp $< $@'. It worked fine. It copied my 01.bmp to 01.pvr. You might want to try make -d to see whats going on.
    – Anil
    Commented Mar 2, 2012 at 15:59
  • Ah, so my files were actually foo.bmp and bar.pvr does this make a difference? Commented Mar 2, 2012 at 16:08

1 Answer 1

1

In %.X : %.Y kind of rules, % acts like a indicator of common substring. Your makefile can tell make how to make foo.pvr from foo.bmp, but not how to make bar.pvr from foo.bmp. You can find more details in the Pattern Match section of gmake manual.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .