Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- asdf@jkl:~/tmp$ ls
- foo bar.md foo.md Makefile
- asdf@jkl:~/tmp$ cat Makefile
- # define a space
- space:=
- space+=
- .SECONDEXPANSION:
- %.html: $$(subst $$(space),\$$(space),%).md
- pandoc "$<" -o "$@"
- asdf@jkl:~/tmp$ # verify it works when no spaces
- asdf@jkl:~/tmp$ make foo.html
- pandoc "foo.md" -o "foo.html"
- asdf@jkl:~/tmp$ # now verify on spaces
- asdf@jkl:~/tmp$ make foo\ bar.html
- pandoc "foo bar.md" -o "foo bar.html"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement