PDA

View Full Version : Makefile space question


cwaldbieser
July 1st, 2006, 12:05 PM
I am trying to write a makefile where some of the prerequisites have embedded spaces. E.g.

mytarget: prereq with spaces
@echo 'prereq is ?<'


make sees this as a rule that says "mytarget" has 3 prerequisites, "prereq", "with", and "spaces". Is there any way I can get it to treat "prereq with spaces" as a single prerequisite?

Thanks.

toojays
July 1st, 2006, 08:56 PM
Use backslashes to escape the spaces:mytarget: prereq\ with\ spaces
@echo 'prereq is ?<'