diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-11-29 17:21:05 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-11-29 17:21:05 -0500 |
commit | 030e57b751f1b5b532ff71bf4b5deda9fc9d357a (patch) | |
tree | 5c847a2c824336d6864260bdfad0332cba5515c1 | |
parent | cce6aeb35102e8d65310224640ae7d23d5494ade (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: ; |