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