defsdir = $(datadir)/pygtk/2.0/defs defs_DATA = leaftag.defs INCLUDES = \ -DG_LOG_DOMAIN=\"leaftag-python\" \ -DDATADIR=\"$(datadir)\" \ -DLIBDIR=\"$(libdir)\" \ $(LEAFTAG_PYTHON_CFLAGS) \ $(PYTHON_INCLUDES) pkgpythondir = $(pyexecdir)/gtk-2.0 pkgpyexecdir = $(pyexecdir)/gtk-2.0 pkgpyexec_LTLIBRARIES = leaftag.la leaftag_la_LDFLAGS = -module -avoid-version -export-symbols-regex initleaftag leaftag_la_LIBADD = $(LEAFTAG_PYTHON_LIBS) leaftag_la_SOURCES = leaftagmodule.c leaftag.c #nodist_leaftag_la_SOURCES = leaftag.c CLEANFILES = leaftag.c EXTRA_DIST = leaftag.override $(defs_DATA) leaftag.c: $(defs_DATA) leaftag.override %.c: %.defs (cd $(srcdir) \ && $(PYGTK_CODEGEN) \ --register $(PYGTK_DEFSDIR)/gtk-types.defs \ --override $*.override \ --prefix py$* $*.defs) > gen-$*.c \ && cp gen-$*.c $*.c \ && rm -f gen-$*.c update-defs: @python $(datadir)/pygtk/2.0/codegen/h2def.py $(includedir)/libleaftag/*.h > leaftag.defs.tmp @sed -e 's/define-function lt_\(create\|get\|source_lookup\|tag_lookup\)/define-function \1/g' \ -e 's/\("schema"\))/\1 (default NULL))/g' \ -e 's/"tag_names")/"tags")/g' \ -e '/get_tag_names_valid/,/^$$/ { s/"tags")/"tag_names")/g }' \ leaftag.defs.tmp > leaftag.defs @rm -f leaftag.defs.tmp @echo Definitions updated