glib/gio/gdbus-2.0/codegen/Makefile.am
Nirbheek Chauhan b9f2ea4235 gdbus-codegen: Don't assume bindir and datadir share prefix
This assumption breaks when, for instance:

* Called as /bin/gdbus-codegen
* Installed on Windows in a directory that is not `bin/`

For such cases, we cannot make any assumptions about the directory
structure, and must hard-code the datadir.

https://bugzilla.gnome.org/show_bug.cgi?id=786785
2017-10-11 09:48:38 +01:00

29 lines
600 B
Makefile

include $(top_srcdir)/glib.mk
bin_SCRIPTS =
codegendir = $(datadir)/glib-2.0/codegen
codegen_PYTHON = \
__init__.py \
codegen.py \
codegen_main.py \
codegen_docbook.py \
config.py \
dbustypes.py \
parser.py \
utils.py \
$(NULL)
CLEANFILES += config.pyc
bin_SCRIPTS += gdbus-codegen
CLEANFILES += gdbus-codegen
EXTRA_DIST += gdbus-codegen.in
gdbus-codegen: gdbus-codegen.in Makefile $(codegen_PYTHON)
$(AM_V_GEN) sed -e 's,@DATADIR\@,$(datadir),' -e 's,@PYTHON\@,$(PYTHON),' $< > $@.tmp && mv $@.tmp $@
@chmod a+x $@
clean-local:
rm -f *~