mirror of
https://gitlab.com/mattia.basaglia/ASCII-Pony.git
synced 2024-11-22 04:07:59 +01:00
Print random pony
This commit is contained in:
parent
ea440b470d
commit
ee19b0040f
1 changed files with 11 additions and 2 deletions
13
Makefile
13
Makefile
|
@ -10,7 +10,8 @@ PONIES= applejack-nohat \
|
||||||
rose \
|
rose \
|
||||||
lyra
|
lyra
|
||||||
|
|
||||||
MAKEFILE_DIR=$(dir $(lastword $(MAKEFILE_LIST)))
|
MAKEFILE=$(lastword $(MAKEFILE_LIST))
|
||||||
|
MAKEFILE_DIR=$(dir $(MAKEFILE))
|
||||||
PONY_DIR=$(MAKEFILE_DIR)Ponies
|
PONY_DIR=$(MAKEFILE_DIR)Ponies
|
||||||
SCRIPT=$(MAKEFILE_DIR)render_parts.php
|
SCRIPT=$(MAKEFILE_DIR)render_parts.php
|
||||||
OUT_DIR=$(MAKEFILE_DIR)rendered
|
OUT_DIR=$(MAKEFILE_DIR)rendered
|
||||||
|
@ -23,7 +24,7 @@ OUT_ALL= $(OUT_COLOR) $(OUT_PLAIN) $(OUT_SVG) $(OUT_PNG) $(OUT_BASH)
|
||||||
OUT_DIRS=$(sort $(dir $(OUT_ALL)))
|
OUT_DIRS=$(sort $(dir $(OUT_ALL)))
|
||||||
find_deps=$(addprefix $(PONY_DIR)/,$(subst ;,\\\;,$(wildcard $(1)/*)))
|
find_deps=$(addprefix $(PONY_DIR)/,$(subst ;,\\\;,$(wildcard $(1)/*)))
|
||||||
|
|
||||||
.PHONY: show show_deps cleans
|
.PHONY: show show_deps cleans list random
|
||||||
|
|
||||||
all: $(OUT_ALL)
|
all: $(OUT_ALL)
|
||||||
|
|
||||||
|
@ -68,3 +69,11 @@ show_deps:
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OUT_ALL)
|
rm -f $(OUT_ALL)
|
||||||
rmdir --ignore-fail-on-non-empty $(OUT_DIRS) $(OUT_DIR)
|
rmdir --ignore-fail-on-non-empty $(OUT_DIRS) $(OUT_DIR)
|
||||||
|
|
||||||
|
list:
|
||||||
|
@$(foreach pony,$(PONIES), echo $(pony);)
|
||||||
|
|
||||||
|
random: PONY=$(shell make -f $(MAKEFILE) list | shuf | head -n 1)
|
||||||
|
random:
|
||||||
|
@make -f $(MAKEFILE) show PONY=$(PONY)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue