diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-11-29 17:24:04 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-11-29 17:24:04 -0500 |
commit | dd45c0d7f49e165b7055617d032b59c5173a6e7c (patch) | |
tree | 4b46e091e98faa8f5417db0c095f9c46149739e2 | |
parent | 8f30b0e170c9b8dfbf66a77183ef6a2f8ede332f (diff) | |
parent | 5714a584a3f8cd576df4a2042286b10cf76e54c3 (diff) |
Merge ../twentyeleven-child
-rw-r--r-- | Makefile | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -1,12 +1,16 @@ pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH))))) +pick = $(firstword $(foreach prog,$1,$(call pathsearch,$(prog))) false) RM = rm -f CP = cp PATCH = patch SASS = sass -PHP := $(firstword $(call pathsearch,php5) $(call pathsearch,php)) -SVG2PNG = rsvg-convert -PNGCRUSH = $(firstword $(call pathsearch,pngcrush) $(call pathsearch,cp)) +PHP = $(call pick,php5 php) +PNGCRUSH = $(call pick,pngcrush cp) +SVG2PNG = $(call pick,rsvg-convert convert) +ifeq ($(notdir $(SVG2PNG)),rsvg-convert) +SVG2PNG_OUTFLAG = -o +endif default: all @@ -28,9 +32,11 @@ all: .gitignore $(targets) $(PHP) -f $< > $@ %.png: %.svg - $(SVG2PNG) $< > $@.$$$$ && $(PNGCRUSH) $@.$$$$ $@ ; $(RM) $@.$$$$ + $(SVG2PNG) $< $(SVG2PNG_OUTFLAG) $@.$$$$ && \ + $(PNGCRUSH) $@.$$$$ $@ ; \ + $(RM) $@.$$$$ -################################################################################ +########################################################################### in_dir = $(patsubst ./%,%,$(dir $1)) my_dir = $(patsubst %/,%,$(dir $1)) @@ -50,7 +56,7 @@ endef echo '# but these:' >> '$@' $(foreach file,$(srcfiles),$(call gitignore_file,$(file))) -################################################################################ +########################################################################### git2make = $1 $(subst *,.*,$1) gitignore_y = $(call git2make,$(shell sed -n 's/^[^\#!]/&/p' .gitignore)) @@ -63,7 +69,7 @@ clean: .gitignore PHONY distclean: .gitignore PHONY $(RM) -r $(gitignore) -################################################################################ +########################################################################### .PHONY: FORCE PHONY FORCE: ; |