Move pictures
33
Makefile
|
@ -11,33 +11,46 @@ PONIES= Main6/applejack-nohat \
|
|||
|
||||
|
||||
SCRIPT=$(PWD)/render_parts.php
|
||||
OUT_PLAIN=$(addsuffix .plain.txt,$(PONIES))
|
||||
OUT_COLOR=$(addsuffix .colored.txt,$(PONIES))
|
||||
OUT_SVG=$(addsuffix .svg,$(PONIES))
|
||||
OUT_PNG=$(addsuffix .png,$(PONIES))
|
||||
OUT_DIR=rendered
|
||||
OUT_PLAIN=$(addsuffix .txt,$(PONIES))
|
||||
OUT_COLOR=$(addprefix $(OUT_DIR)/,$(addsuffix .colored.txt,$(PONIES)))
|
||||
OUT_SVG=$(addprefix $(OUT_DIR)/,$(addsuffix .svg,$(PONIES)))
|
||||
OUT_PNG=$(addprefix $(OUT_DIR)/,$(addsuffix .png,$(PONIES)))
|
||||
OUT_ALL= $(OUT_COLOR) $(OUT_PLAIN) $(OUT_SVG) $(OUT_PNG)
|
||||
OUT_DIRS=$(sort $(dir $(OUT_ALL)))
|
||||
find_deps=$(subst ;,\\\;,$(wildcard $(1)/*))
|
||||
|
||||
all: $(OUT_ALL)
|
||||
|
||||
define rule_template
|
||||
$(1).colored.txt: $(call find_deps, $(1))
|
||||
$(SCRIPT) $(1) >$(1).colored.txt
|
||||
$(OUT_DIR)/$(1).colored.txt: $(dir $(OUT_DIR)/$(1))
|
||||
$(OUT_DIR)/$(1).colored.txt: $(call find_deps, $(1))
|
||||
$(SCRIPT) $(1) >$(OUT_DIR)/$(1).colored.txt
|
||||
|
||||
$(1).plain.txt: $(call find_deps, $(1))
|
||||
$(SCRIPT) $(1) >$(1).plain.txt nocolor
|
||||
$(1).txt: $(call find_deps, $(1))
|
||||
$(SCRIPT) $(1) >$(1).txt nocolor
|
||||
|
||||
$(1).svg: $(call find_deps, $(1))
|
||||
$(SCRIPT) $(1) >$(1).svg svg
|
||||
$(OUT_DIR)/$(1).svg: $(dir $(OUT_DIR)/$(1))
|
||||
$(OUT_DIR)/$(1).svg: $(call find_deps, $(1))
|
||||
$(SCRIPT) $(1) >$(OUT_DIR)/$(1).svg svg
|
||||
endef
|
||||
define dir_rule_template
|
||||
$(1) :
|
||||
mkdir -p $(1)
|
||||
endef
|
||||
|
||||
%.png : %.svg
|
||||
inkscape $*.svg -e $*.png
|
||||
|
||||
$(foreach pony,$(PONIES),$(eval $(call rule_template,$(pony))))
|
||||
$(foreach directory,$(OUT_DIRS),$(eval $(call dir_rule_template,$(directory))))
|
||||
|
||||
show: $(PONY).colored.txt
|
||||
@cat $(PONY).colored.txt
|
||||
|
||||
show_deps:
|
||||
@$(foreach d,$(call find_deps,$(PONY)), echo $(d);)
|
||||
|
||||
clean:
|
||||
rm -f $(OUT_ALL)
|
||||
rmdir --ignore-fail-on-non-empty $(OUT_DIRS) $(OUT_DIR)
|
||||
|
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |