1 # from gyp-generated Makefile 2 empty := 3 space := $(empty) $(empty) 4 5 replace_spaces = $(subst $(space),?,$1) 6 unreplace_spaces = $(subst ?,$(space),$1) 7 dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1))) 8 9 test: foo 10 echo $(call dirx,foo/bar) 11 echo $(call dirx,foo bar/baz quux) 12 echo $(call dirx,foo,bar) 13 14 foo: 15 mkdir foo "foo bar" 16 17