summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Merry <dev@randomguy3.me.uk>2010-12-13 15:49:02 +0000
committerAlex Merry <dev@randomguy3.me.uk>2010-12-13 15:49:02 +0000
commitac927e4bb28be0a6fbad76b2c197a802b311108f (patch)
tree3b64a413d97835ed06169bd4faa2ea2e25f38738
parentefe1adf5541b70426a3de86748211d8d3b4996fa (diff)
Makefile cleanups
-rw-r--r--Makefile26
1 files changed, 14 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index d469f20..867ea6f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,14 @@
all:
-GIT = git
-GZIP = gzip
-TAR = tar
-XSLTPROC = xsltproc --xinclude --nonet
-CANONXML = xmllint --nsclean --noblanks --c14n --nonet
+INSTALL ?= install
+XSLTPROC ?= xsltproc
+PYTHON ?= python
+XMLLINT ?= xmllint
+EGREP ?= egrep
+
+XSLTPROCCMD = $(XSLTPROC) --xinclude --nonet
XML_LINEBREAKS = perl -pe 's/>/>\n/g'
DROP_NAMESPACE = perl -pe '$$hash = chr(35); s{xmlns:tp="http://telepathy\.freedesktop\.org/wiki/DbusSpec$${hash}extensions-v0"}{}g'
-PYTHON = python
XMLS = $(wildcard spec/*.xml)
TEMPLATES = $(wildcard doc/templates/*)
@@ -16,8 +17,8 @@ INTROSPECT = $(INTERFACE_XMLS:spec/%.xml=introspect/%.xml)
CANONICAL_NAMES = $(INTERFACE_XMLS:spec/%.xml=tmp/%.name)
$(CANONICAL_NAMES): tmp/%.name: spec/%.xml tools/extract-nodename.py
- @install -d tmp
- python tools/extract-nodename.py $< > $@
+ @$(INSTALL) -d tmp
+ $(PYTHON) tools/extract-nodename.py $< > $@
tr a-z A-Z < $@ > $@.upper
tr A-Z a-z < $@ > $@.lower
tr -d _ < $@ > $@.camel
@@ -32,13 +33,13 @@ doc/spec.html: doc/templates/oldspec.html
cp $< $@
doc/spec/index.html: $(XMLS) tools/doc-generator.py tools/specparser.py $(TEMPLATES)
- @install -d doc
+ @$(INSTALL) -d doc
$(PYTHON) tools/doc-generator.py spec/all.xml doc/spec/ mpris-spec \
org.mpris
$(INTROSPECT): introspect/%.xml: spec/%.xml tools/spec-to-introspect.xsl
- @install -d introspect
- $(XSLTPROC) tools/spec-to-introspect.xsl $< | $(DROP_NAMESPACE) > $@
+ @$(INSTALL) -d introspect
+ $(XSLTPROCCMD) tools/spec-to-introspect.xsl $< | $(DROP_NAMESPACE) > $@
all: $(GENERATED_FILES)
@echo "Your spec HTML starts at:"
@@ -48,7 +49,7 @@ all: $(GENERATED_FILES)
FIXME.out: $(XMLS)
@echo ' GEN ' $@
- @egrep -A 5 '[F]IXME|[T]ODO|[X]XX' $(XMLS) \
+ @$(EGREP) -A 5 '[F]IXME|[T]ODO|[X]XX' $(XMLS) \
> FIXME.out || true
clean:
@@ -57,4 +58,5 @@ clean:
rm -fr introspect
rm -rf tmp
rm -rf doc/spec
+ rm -rf tools/*.pyc