1

Using makefile wildcard command for file names with spaces

view story
linux-howto

http://askubuntu.com – I have a makefile that I use to compress pictures: src=$(wildcard Photos/*.jpg) $(wildcard Photos/*.JPG) out=$(subst Photos,Compressed,$(src)) all : $(out) clean: @rmdir -r Compressed Compressed: @mkdir Compressed Compressed/%.jpg: Photos/%.jpg Compressed @echo "Compressing $<" @convert "$<" -scale 20% "$@" Compressed/%.JPG: Photos/%.JPG Compressed @echo "Compressing $<" @convert "$<" -scale 20% "$@" However, when I have a picture with a space in its name, for example Piper PA-28-236 Dakota.JPG, I get this error: make: *** No rule to make target `Co (HowTos)