summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore15
-rw-r--r--Makefile59
-rw-r--r--img/swoosh.svg36
-rw-r--r--theme.mk10
4 files changed, 104 insertions, 16 deletions
diff --git a/.gitignore b/.gitignore
index 639f69d..d6b708e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,13 +1,26 @@
+<<<<<<< HEAD
# DO NOT EDIT, this file is automatically made by `Makefile'
#
# ignore everyting
*
# but these:
+!img
+img/*
!img/swoosh.svg
!style.scss
!header.php.patch
-!Makefile
!logo-style.scss.php
!license.txt
!css_shadow.php
!twentyeleven-fix.scss
+!.gitignore
+!theme.mk
+=======
+# ignore everyting
+*
+# but these:
+!license.txt
+!twentyeleven-fix.scss
+!.gitignore
+>>>>>>> ea262045fbf26c153e6e4c46b5b67ad296cda8c1
+!Makefile
diff --git a/Makefile b/Makefile
index c782b9b..7df9dba 100644
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,20 @@
+pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH)))))
+
RM = rm -f
CP = cp
PATCH = patch
SASS = sass
-PHP = php5
+PHP := $(firstword $(call pathsearch,php5) $(call pathsearch,php))
+SVG2PNG = rsvg-convert
+PNGCRUSH = $(firstword $(call pathsearch,pngcrush) $(call pathsearch,cp))
-srcfiles = \
- img/swoosh.svg \
- style.scss \
- header.php.patch \
- Makefile \
- logo-style.scss.php \
- license.txt \
- css_shadow.php \
- twentyeleven-fix.scss
+default: all
-all: header.php style.css img/swoosh.png .gitignore
+include theme.mk
+srcfiles += twentyeleven-fix.scss license.txt
+srcfiles += .gitignore theme.mk Makefile
-style.css: logo-style.scss twentyeleven-fix.scss
+all: .gitignore $(targets)
%: %.patch ../twentyeleven/%
$(RM) $@
@@ -30,12 +28,43 @@ style.css: logo-style.scss twentyeleven-fix.scss
$(PHP) -f $< > $@
%.png: %.svg
- rsvg-convert $< > $@.$$$$ && pngcrush $@.$$$$ $@ ; $(RM) $@.$$$$
+ $(SVG2PNG) $< > $@.$$$$ && $(PNGCRUSH) $@.$$$$ $@ ; $(RM) $@.$$$$
+
+################################################################################
-.gitignore: Makefile
+in_dir = $(patsubst ./%,%,$(dir $1))
+my_dir = $(patsubst %/,%,$(dir $1))
+define gitignore_file
+$(if $(in_dir),
+ $(call gitignore_file,$(my_dir))
+ echo '$(my_dir)/*' >> '$@';
+)
+echo '!$1' >> '$@';
+endef
+
+.gitignore: Makefile theme.mk
echo "# DO NOT EDIT, this file is automatically made by \`Makefile'" >$@
echo '# ' >> '$@'
echo '# ignore everyting' >> '$@'
echo '*' >> '$@'
echo '# but these:' >> '$@'
- for file in $(srcfiles); do echo !"$$file" >> '$@'; done
+ $(foreach file,$(srcfiles),$(call gitignore_file,$(file)))
+
+################################################################################
+
+git2make = $1 $(subst *,.*,$1)
+gitignore_y = $(call git2make,$(shell sed -n 's/^[^\#!]/&/p' .gitignore))
+gitignore_n = $(call git2make,$(shell sed -n 's/^!//p' .gitignore))
+gitignore_i = . .. .git %/.. %/.
+gitignore = $(filter-out $(gitignore_i) $(wildcard $(gitignore_n)),$(wildcard $(gitignore_y)))
+
+clean: .gitignore PHONY
+ $(RM) -r $(filter-out $(targets),$(gitignore))
+distclean: .gitignore PHONY
+ $(RM) -r $(gitignore)
+
+################################################################################
+
+.PHONY: FORCE PHONY
+FORCE: ;
+PHONY: ;
diff --git a/img/swoosh.svg b/img/swoosh.svg
new file mode 100644
index 0000000..673d82d
--- /dev/null
+++ b/img/swoosh.svg
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="472.22217"
+ height="200"
+ id="svg3317"
+ version="1.1">
+ <g
+ id="layer1"
+ transform="translate(8.7936,98.031149)">
+ <g
+ id="g2987"
+ transform="matrix(1.7188591,0,0,1.7188591,6.3213594,-73.301236)">
+ <path
+ d="M 37.90015,-14.3874 4.4389,69.05135 l -13.2325,32.9175 274.73,0 0,-116.35625 -228.03625,0 z"
+ style="fill:#2210d2;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path2558" />
+ <path
+ d="m 45.0439,68.6826 c 0,-33.42625 52.35375,-61.11375 120.685,-65.99875 2.66375,-0.18875 8.05,-0.10375 8.05,-0.8025 0,-1.7475 -8.5525,-1.49375 -12.89375,-1.49375 -81.06,0 -146.7525,36.7675 -146.7525,80.23625 0,7.3975 1.90625,14.5575 5.46375,21.345 l 44.36875,0 C 51.93015,92.1701 45.0439,80.80385 45.0439,68.6826"
+ style="fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path2564" />
+ <path
+ d="m 187.33765,7.1126 c -72.5425,0 -131.35,27.59125 -131.35,61.62875 0,12.23625 7.60125,23.64 20.70625,33.2275 l 189.2425,0 0,-82.60875 C 244.02015,11.6676 216.81265,7.1126 187.33765,7.1126"
+ style="fill:#1e90ff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path2566" />
+ <path
+ d="m 206.1264,1.6901 c -0.0237,0.885 -15.815,1.165 -20.545,1.0325 -4.73125,-0.13125 -8.54625,-0.955 -8.52125,-1.84 0.025,-0.885 3.88,-1.49625 8.61,-1.365 4.73,0.13125 20.4825,1.2875 20.45625,2.1725"
+ style="fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path2580" />
+ <path
+ d="m 221.5464,3.79385 c -0.0613,0.45375 -7.78,-0.22 -10.07875,-0.53125 -2.30125,-0.3125 -4.115,-0.93375 -4.05375,-1.38875 0.0613,-0.45375 1.975,-0.56875 4.27625,-0.25625 2.3,0.3125 9.9175,1.7225 9.85625,2.17625"
+ style="fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path2582" />
+ </g>
+ </g>
+</svg>
diff --git a/theme.mk b/theme.mk
new file mode 100644
index 0000000..dfc72e8
--- /dev/null
+++ b/theme.mk
@@ -0,0 +1,10 @@
+srcfiles = \
+ img/swoosh.svg \
+ style.scss \
+ header.php.patch \
+ logo-style.scss.php \
+ css_shadow.php
+
+targets = header.php style.css img/swoosh.png
+
+style.css: logo-style.scss twentyeleven-fix.scss