Tomwi/FeOSMusic — pull request #16 by mtheall (2012-05-25 14:55:05+00:00)
Title: clean generated graphics

Added '@rm -f $(GFX)/*.bin' to the 'clean' rule. This will remove the generated
graphics. But this leaves behind a problem. The generated files will not be
injected into the FAR.

$(wildcard gfx/*.bin) is resolved before the make commands begin, so if
gfx/*.bin is empty before you run make, then

for i in $(wildcard gfx/*.bin); do cp $$i fs; done

becomes

for i in ; do cp $$i fs; done

which effectively does nothing. If they existed first (like they do now because
they aren't removed by 'clean', or if you do 'make' a second time) then it works
because they were resolved already.

Changing this for loop to

cp $(GFX)/*.bin fs

fixes this problem. This is because the command is resolved at runtime, not
preprocessed like the wildcard expression above.