Advertisement
Guest User

Stackoverflow question 21693582

a guest
Feb 11th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. asdf@jkl:~/tmp$ ls
  2. foo bar.md foo.md Makefile
  3.  
  4. asdf@jkl:~/tmp$ cat Makefile
  5. # define a space
  6. space:=
  7. space+=
  8.  
  9. .SECONDEXPANSION:
  10. %.html: $$(subst $$(space),\$$(space),%).md
  11. pandoc "$<" -o "$@"
  12.  
  13. asdf@jkl:~/tmp$ # verify it works when no spaces
  14. asdf@jkl:~/tmp$ make foo.html
  15. pandoc "foo.md" -o "foo.html"
  16.  
  17. asdf@jkl:~/tmp$ # now verify on spaces
  18. asdf@jkl:~/tmp$ make foo\ bar.html
  19. pandoc "foo bar.md" -o "foo bar.html"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement