diff --git a/README.md b/README.md index 55a8d06..ae2bf9c 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,15 @@ include plantuml-toolset/wsd.mk After that you can invoke it in a number of ways: ```shell -# Find all *.wsd in the current directory and make svg's out of them +# Find all *.wsd in the current directory recursively and make svg's out of them $ make # Same but make png's $ make FORMAT=png +# Same but make both png's and svg's +$ make FORMAT="png svg" + # Make examples/conversation.png $ make FORMAT=png examples/conversation.wsd ``` diff --git a/wsd.mk b/wsd.mk index 08553d5..7f23b18 100644 --- a/wsd.mk +++ b/wsd.mk @@ -1,9 +1,9 @@ FORMAT ?= svg -SOURCES = $(wildcard ./*.wsd) -TARGETS = $(patsubst %.wsd,%.$(FORMAT),$(SOURCES)) +SOURCES = $(wildcard *.wsd **/*.wsd) +TARGETS = $(foreach fmt, $(FORMAT), $(patsubst %.wsd,%.$(fmt),$(SOURCES))) STYLE ?= style.isvg -.PHONY: all clean toolset force +.PHONY: all clean install-toolset force validate = test -s $@ || { rm $@; exit 1; }