summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2011-12-01 16:08:29 +0000
committerJonny Lamb <jonny.lamb@collabora.co.uk>2011-12-01 16:08:29 +0000
commit26e813cf9758eb57f92d53e81853050735e067e1 (patch)
tree0304e44dd64aaee7aa05f343a03f89f5460de434
parent357d048c8de53c37baa3ae538b4ee3b46a5bd259 (diff)
glib: don't hard-code tools directory pathHEADmaster
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--glib/examples/extensions/Makefile.am38
-rw-r--r--glib/extensions/Makefile.am46
-rw-r--r--glib/telepathy-glib/codegen.am41
-rw-r--r--glib/tools/check-c-style.sh2
-rw-r--r--glib/tools/check-coding-style.mk4
-rw-r--r--glib/tools/check-misc.sh2
6 files changed, 64 insertions, 69 deletions
diff --git a/glib/examples/extensions/Makefile.am b/glib/examples/extensions/Makefile.am
index b1e1f4c5e..00ae0ca09 100644
--- a/glib/examples/extensions/Makefile.am
+++ b/glib/examples/extensions/Makefile.am
@@ -7,8 +7,6 @@
# class, or by omitting those options entirely we could have made an extension
# that will work on TpProxy or any subclass of TpProxy.
-tools_dir = $(top_srcdir)/tools
-
AM_CFLAGS = \
$(ERROR_CFLAGS) \
$(DBUS_CFLAGS) \
@@ -70,13 +68,13 @@ XSLTPROCFLAGS = --nonet --novalid
# Generated files which can be generated for all categories simultaneously
-_gen/all.xml: all.xml $(wildcard *.xml) $(tools_dir)/xincludator.py
+_gen/all.xml: all.xml $(wildcard *.xml) $(tp_tools_dir)/xincludator.py
$(mkdir_p) _gen
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/xincludator.py $< > $@
-extensions.html: _gen/all.xml $(tools_dir)/doc-generator.xsl
+extensions.html: _gen/all.xml $(tp_tools_dir)/doc-generator.xsl
$(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \
- $(tools_dir)/doc-generator.xsl \
+ $(tp_tools_dir)/doc-generator.xsl \
$< > $@
_gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \
@@ -85,8 +83,8 @@ _gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \
$< _gen/gtypes Example
_gen/signals-marshal.list: _gen/all.xml \
- $(tools_dir)/glib-signals-marshal-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@
+ $(tp_tools_dir)/glib-signals-marshal-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-signals-marshal-gen.py $< > $@
_gen/signals-marshal.h: _gen/signals-marshal.list Makefile.am
$(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_example_ext_marshal $< > $@
@@ -96,32 +94,32 @@ _gen/signals-marshal.c: _gen/signals-marshal.list Makefile.am
$(GLIB_GENMARSHAL) --body --prefix=_example_ext_marshal $< ; } > $@
_gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \
- $(tools_dir)/glib-client-marshaller-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< \
+ $(tp_tools_dir)/glib-client-marshaller-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-client-marshaller-gen.py $< \
_example_ext > $@
_gen/enums.h: _gen/all.xml \
- $(tools_dir)/c-constants-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/c-constants-gen.py \
+ $(tp_tools_dir)/c-constants-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/c-constants-gen.py \
Example \
$< _gen/enums
_gen/interfaces-body.h _gen/interfaces.h: _gen/all.xml \
- $(tools_dir)/glib-interfaces-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-interfaces-gen.py \
+ $(tp_tools_dir)/glib-interfaces-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-interfaces-gen.py \
Example _gen/interfaces-body.h _gen/interfaces.h $<
# Generated files which must be generated per "category". Each TpProxy
# subclass you want to use with --subclass will need to have its own category,
# although you can subdivide further if you want.
-_gen/connection.xml: connection.xml $(wildcard *.xml) $(tools_dir)/xincludator.py
+_gen/connection.xml: connection.xml $(wildcard *.xml) $(tp_tools_dir)/xincludator.py
$(mkdir_p) _gen
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/xincludator.py $< > $@
_gen/cli-connection-body.h _gen/cli-connection.h: _gen/connection.xml \
- $(tools_dir)/glib-client-gen.py Makefile.am
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
+ $(tp_tools_dir)/glib-client-gen.py Makefile.am
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-client-gen.py \
--group=connection \
--subclass=TpConnection \
--subclass-assert=TP_IS_CONNECTION \
@@ -130,8 +128,8 @@ _gen/cli-connection-body.h _gen/cli-connection.h: _gen/connection.xml \
$< Example_Cli _gen/cli-connection
_gen/svc-connection.c _gen/svc-connection.h: _gen/connection.xml \
- $(tools_dir)/glib-ginterface-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \
+ $(tp_tools_dir)/glib-ginterface-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-ginterface-gen.py \
--filename=_gen/svc-connection \
--signal-marshal-prefix=_example_ext \
--include='<telepathy-glib/dbus.h>' \
diff --git a/glib/extensions/Makefile.am b/glib/extensions/Makefile.am
index a5b603dd6..7ee9ce3d0 100644
--- a/glib/extensions/Makefile.am
+++ b/glib/extensions/Makefile.am
@@ -2,8 +2,6 @@
# generate code for interfaces that aren't stable enough for telepathy-glib
# yet, so we can start to adapt example code to use them.
-tools_dir = $(top_srcdir)/tools
-
AM_CFLAGS = \
$(ERROR_CFLAGS) \
$(DBUS_CFLAGS) \
@@ -85,9 +83,9 @@ XSLTPROCFLAGS = --nonet --novalid
# Generated files which can be generated for all categories simultaneously
-_gen/all.xml: all.xml $(xml_files) $(wildcard $(tp_spec_dir)/*.xml) $(tools_dir)/xincludator.py
+_gen/all.xml: all.xml $(xml_files) $(wildcard $(tp_spec_dir)/*.xml) $(tp_tools_dir)/xincludator.py
$(mkdir_p) _gen
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/xincludator.py $< > $@
_gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \
$(top_srcdir)/tools/glib-gtypes-generator.py
@@ -95,8 +93,8 @@ _gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \
$< _gen/gtypes Future
_gen/signals-marshal.list: _gen/all.xml \
- $(tools_dir)/glib-signals-marshal-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@
+ $(tp_tools_dir)/glib-signals-marshal-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-signals-marshal-gen.py $< > $@
_gen/signals-marshal.h: _gen/signals-marshal.list Makefile.am
$(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_future_ext_marshal $< > $@
@@ -106,19 +104,19 @@ _gen/signals-marshal.c: _gen/signals-marshal.list Makefile.am
$(GLIB_GENMARSHAL) --body --prefix=_future_ext_marshal $< ; } > $@
_gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \
- $(tools_dir)/glib-client-marshaller-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< \
+ $(tp_tools_dir)/glib-client-marshaller-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-client-marshaller-gen.py $< \
_future_ext > $@
_gen/enums.h: _gen/all.xml \
- $(tools_dir)/c-constants-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/c-constants-gen.py \
+ $(tp_tools_dir)/c-constants-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/c-constants-gen.py \
Future \
$< _gen/enums
_gen/interfaces-body.h _gen/interfaces.h: _gen/all.xml \
- $(tools_dir)/glib-interfaces-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-interfaces-gen.py \
+ $(tp_tools_dir)/glib-interfaces-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-interfaces-gen.py \
Future _gen/interfaces-body.h _gen/interfaces.h $<
# Generated files which must be generated per "category". Each TpProxy
@@ -128,13 +126,13 @@ _gen/interfaces-body.h _gen/interfaces.h: _gen/all.xml \
%.xml: %.xml.in
$(AM_V_GEN)sed -e "s|[@]tp_spec_dir[@]|$(tp_spec_dir)|g" $< > $@
-_gen/%.xml: %.xml $(wildcard $(srcdir)/*.xml) $(wildcard $(tp_spec_dir)/*.xml) $(tools_dir)/xincludator.py
+_gen/%.xml: %.xml $(wildcard $(srcdir)/*.xml) $(wildcard $(tp_spec_dir)/*.xml) $(tp_tools_dir)/xincludator.py
$(mkdir_p) _gen
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/xincludator.py $< > $@
_gen/svc-%.c _gen/svc-%.h: _gen/%.xml \
- $(tools_dir)/glib-ginterface-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \
+ $(tp_tools_dir)/glib-ginterface-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-ginterface-gen.py \
--filename=_gen/svc-$* \
--signal-marshal-prefix=_future_ext \
--include='<telepathy-glib/dbus.h>' \
@@ -144,8 +142,8 @@ _gen/svc-%.c _gen/svc-%.h: _gen/%.xml \
$< Future_Svc_
_gen/cli-channel-body.h _gen/cli-channel.h: _gen/channel.xml \
- $(tools_dir)/glib-client-gen.py Makefile.am
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
+ $(tp_tools_dir)/glib-client-gen.py Makefile.am
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-client-gen.py \
--group=channel \
--subclass=TpChannel \
--subclass-assert=TP_IS_CHANNEL \
@@ -154,8 +152,8 @@ _gen/cli-channel-body.h _gen/cli-channel.h: _gen/channel.xml \
$< Future_Cli _gen/cli-channel
_gen/cli-call-content-body.h _gen/cli-call-content.h: _gen/call-content.xml \
- $(tools_dir)/glib-client-gen.py Makefile.am
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
+ $(tp_tools_dir)/glib-client-gen.py Makefile.am
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-client-gen.py \
--group=call_content \
--subclass=FutureCallContent \
--subclass-assert=FUTURE_IS_CALL_CONTENT \
@@ -164,8 +162,8 @@ _gen/cli-call-content-body.h _gen/cli-call-content.h: _gen/call-content.xml \
$< Future_Cli _gen/cli-call-content
_gen/cli-call-stream-body.h _gen/cli-call-stream.h: _gen/call-stream.xml \
- $(tools_dir)/glib-client-gen.py Makefile.am
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
+ $(tp_tools_dir)/glib-client-gen.py Makefile.am
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-client-gen.py \
--group=call_stream \
--subclass=FutureCallStream \
--subclass-assert=FUTURE_IS_CALL_STREAM \
@@ -177,8 +175,8 @@ _gen/cli-call-stream-body.h _gen/cli-call-stream.h: _gen/call-stream.xml \
# have a TpCallEndpoint etc., they should appear on that
_gen/cli-misc-body.h _gen/cli-misc.h: _gen/misc.xml \
- $(tools_dir)/glib-client-gen.py Makefile.am
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
+ $(tp_tools_dir)/glib-client-gen.py Makefile.am
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-client-gen.py \
--group=misc \
--iface-quark-prefix=FUTURE_IFACE_QUARK \
--tp-proxy-api=0.7.6 \
diff --git a/glib/telepathy-glib/codegen.am b/glib/telepathy-glib/codegen.am
index 8be4573eb..11e1a60e6 100644
--- a/glib/telepathy-glib/codegen.am
+++ b/glib/telepathy-glib/codegen.am
@@ -115,7 +115,6 @@ nodist_libtelepathy_glib_internal_la_SOURCES = \
# Generated stuff
DROP_NAMESPACE = sed -e 's@xmlns:tp="http://telepathy\.freedesktop\.org/wiki/DbusSpec.extensions-v0"@@g'
-tools_dir = $(top_srcdir)/tools
# Bootstrapping
@@ -126,8 +125,8 @@ _gen/spec-stamp: $(wildcard $(tp_spec_dir)/*.xml) $(codegen_xml_files)
_gen/stable-stamp: $(wildcard $(abs_srcdir)/*.xml) _gen/spec-stamp
touch $@
-_gen/stable-spec.xml: stable-interfaces.xml _gen/stable-stamp $(tools_dir)/xincludator.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
+_gen/stable-spec.xml: stable-interfaces.xml _gen/stable-stamp $(tp_tools_dir)/xincludator.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/xincludator.py $< > $@
# Grab a list of re-entrant tp_cli_*_run_* methods we are committed to
# generating for backwards compatibility.
@@ -139,28 +138,28 @@ _gen/reentrant-methods.list: \
# Things generated from the whole spec at once
_gen/gtypes.h _gen/gtypes-body.h: _gen/stable-spec.xml \
- $(tools_dir)/glib-gtypes-generator.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-gtypes-generator.py \
+ $(tp_tools_dir)/glib-gtypes-generator.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-gtypes-generator.py \
_gen/stable-spec.xml \
_gen/gtypes Tp
_gen/telepathy-enums.h: _gen/stable-spec.xml \
- $(tools_dir)/c-constants-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/c-constants-gen.py \
+ $(tp_tools_dir)/c-constants-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/c-constants-gen.py \
Tp $< _gen/telepathy-enums
_gen/interfaces-body.h _gen/telepathy-interfaces.h: _gen/stable-spec.xml \
- $(tools_dir)/glib-interfaces-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-interfaces-gen.py \
+ $(tp_tools_dir)/glib-interfaces-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-interfaces-gen.py \
Tp _gen/interfaces-body.h _gen/telepathy-interfaces.h $<
_gen/register-dbus-glib-marshallers-body.h: _gen/stable-spec.xml \
- $(tools_dir)/glib-client-marshaller-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< _tp > $@
+ $(tp_tools_dir)/glib-client-marshaller-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-client-marshaller-gen.py $< _tp > $@
-_gen/tp-signals-marshal.list: $(tools_dir)/glib-signals-marshal-gen.py \
+_gen/tp-signals-marshal.list: $(tp_tools_dir)/glib-signals-marshal-gen.py \
_gen/stable-spec.xml
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py \
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-signals-marshal-gen.py \
_gen/stable-spec.xml > $@
_gen/signals-marshal.list: signals-marshal.list _gen/tp-signals-marshal.list
@@ -184,8 +183,8 @@ _gen/genums.h: _gen/spec-stamp genums.h.template $(our_headers) codegen.am
) > $@
_gen/error-str.h _gen/error-str.c: _gen/stable-spec.xml \
- $(tools_dir)/glib-errors-str-gen.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-errors-str-gen.py \
+ $(tp_tools_dir)/glib-errors-str-gen.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-errors-str-gen.py \
_gen/error-str $<
# Things generated per interface
@@ -193,13 +192,13 @@ _gen/error-str.h _gen/error-str.c: _gen/stable-spec.xml \
%.xml: %.xml.in
$(AM_V_GEN)sed -e "s|[@]tp_spec_dir[@]|$(tp_spec_dir)|g" $< > $@
-_gen/tp-spec-%.xml: %.xml _gen/spec-stamp $(tools_dir)/xincludator.py
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@
+_gen/tp-spec-%.xml: %.xml _gen/spec-stamp $(tp_tools_dir)/xincludator.py
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/xincludator.py $< > $@
_gen/tp-svc-%.c _gen/tp-svc-%.h: _gen/tp-spec-%.xml \
- $(tools_dir)/glib-ginterface-gen.py \
+ $(tp_tools_dir)/glib-ginterface-gen.py \
codegen.am
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \
+ $(AM_V_GEN)$(PYTHON) $(tp_tools_dir)/glib-ginterface-gen.py \
--filename=_gen/tp-svc-$* \
--signal-marshal-prefix=_tp \
--include='<telepathy-glib/dbus.h>' \
@@ -209,7 +208,7 @@ _gen/tp-svc-%.c _gen/tp-svc-%.h: _gen/tp-spec-%.xml \
_gen/tp-cli-%-body.h _gen/tp-cli-%.h: _gen/tp-spec-%.xml \
_gen/reentrant-methods.list \
- $(tools_dir)/glib-client-gen.py \
+ $(tp_tools_dir)/glib-client-gen.py \
codegen.am
$(AM_V_GEN)set -e; \
subclass= ; \
@@ -266,7 +265,7 @@ _gen/tp-cli-%-body.h _gen/tp-cli-%.h: _gen/tp-spec-%.xml \
subclass_assert=--subclass-assert=TP_IS_DBUS_DAEMON; \
;; \
esac; \
- $(PYTHON) $(tools_dir)/glib-client-gen.py \
+ $(PYTHON) $(tp_tools_dir)/glib-client-gen.py \
$$subclass $$subclass_assert \
--group `echo $* | tr - _` \
--iface-quark-prefix=TP_IFACE_QUARK \
diff --git a/glib/tools/check-c-style.sh b/glib/tools/check-c-style.sh
index 4330b1479..e1b96eb37 100644
--- a/glib/tools/check-c-style.sh
+++ b/glib/tools/check-c-style.sh
@@ -1,7 +1,7 @@
#!/bin/sh
fail=0
-( . "${tools_dir}"/check-misc.sh ) || fail=$?
+( . "${tp_tools_dir}"/check-misc.sh ) || fail=$?
if grep -n '^ *GError *\*[[:alpha:]_][[:alnum:]_]* *;' "$@"
then
diff --git a/glib/tools/check-coding-style.mk b/glib/tools/check-coding-style.mk
index 1c0a60f66..608678a40 100644
--- a/glib/tools/check-coding-style.mk
+++ b/glib/tools/check-coding-style.mk
@@ -1,12 +1,12 @@
check-coding-style:
@fail=0; \
if test -n "$(check_misc_sources)"; then \
- tools_dir=$(top_srcdir)/tools \
+ tp_tools_dir=$(tp_tools_dir) \
sh $(top_srcdir)/tools/check-misc.sh \
$(addprefix $(srcdir)/,$(check_misc_sources)) || fail=1; \
fi; \
if test -n "$(check_c_sources)"; then \
- tools_dir=$(top_srcdir)/tools \
+ tp_tools_dir=$(tp_tools_dir) \
sh $(top_srcdir)/tools/check-c-style.sh \
$(addprefix $(srcdir)/,$(check_c_sources)) || fail=1; \
fi;\
diff --git a/glib/tools/check-misc.sh b/glib/tools/check-misc.sh
index 89e8e871a..02f3187c9 100644
--- a/glib/tools/check-misc.sh
+++ b/glib/tools/check-misc.sh
@@ -2,7 +2,7 @@
fail=0
-( . "${tools_dir}"/check-whitespace.sh ) || fail=$?
+( . "${tp_tools_dir}"/check-whitespace.sh ) || fail=$?
if egrep '(Free\s*Software\s*Foundation.*02139|02111-1307)' "$@"
then