API = leaftag-gtk-api.xml RAW_API = leaftag-gtk-api.raw ADDITIONAL_API = INCLUDE_API = \ $(GTK_SHARP_PREFIX)/share/gapi-2.0/gdk-api.xml \ $(GTK_SHARP_PREFIX)/share/gapi-2.0/art-api.xml \ $(GTK_SHARP_PREFIX)/share/gapi-2.0/atk-api.xml \ $(GTK_SHARP_PREFIX)/share/gapi-2.0/pango-api.xml \ $(GTK_SHARP_PREFIX)/share/gapi-2.0/gtk-api.xml METADATA = leaftag-gtk-sharp.metadata ASSEMBLY_NAME = leaftag-gtk-sharp references = -pkg:glib-sharp-2.0 -pkg:gtk-sharp-2.0 TARGET = $(ASSEMBLY) ASSEMBLY = $(ASSEMBLY_NAME).dll gapidir = $(datadir)/gapi-2.0 noinst_DATA = $(ASSEMBLY) gapi_DATA = $(API) $(ADDITIONAL_API) CLEANFILES = \ $(ASSEMBLY) \ generated-stamp generated/*.cs \ $(API) \ $(RAW_API) \ glue/generated.c DISTCLEANFILES = AssemblyInfo.cs sources = build_sources = $(addprefix $(srcdir)/, $(sources)) AssemblyInfo.cs customs = \ TagDialog.custom build_customs = $(addprefix $(srcdir)/, $(customs)) EXTRA_DIST = \ AssemblyInfo.cs.in \ leaftag-gtk-sharp.snk \ $(RAW_API) \ $(METADATA) \ $(customs) \ $(sources) $(API): $(srcdir)/$(RAW_API) $(srcdir)/$(METADATA) sed -e 's/ name="LeaftagGtk/ name="/g' $(srcdir)/$(RAW_API) > $(API) chmod u+w $(API) $(GAPI_FIXUP) --api=$(API) --metadata=$(srcdir)/$(METADATA) generated-stamp: $(API) $(srcdir)/$(ADDITIONAL_API) $(build_customs) rm -f generated/* && \ $(GAPI_CODEGEN) --generate $(API) \ --include $(INCLUDE_API) --outdir=generated --customdir=$(srcdir) \ --assembly-name=$(ASSEMBLY_NAME) \ && sed -e 's/\(namespace Leaftag.Gtk\)/using gtk = Gtk;\n\n\1/' -e 's/\(\t\| \|(\)Gtk\./\1gtk./g' -i generated/*.cs \ && touch generated-stamp $(ASSEMBLY): $(build_sources) generated-stamp leaftag-gtk-sharp.snk $(CSC) /unsafe /out:$(ASSEMBLY) /target:library $(references) $(build_sources) $(GENERATED_SOURCES) install-data-local: @if test -n '$(TARGET)'; then \ echo "$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS)"; \ $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1; \ fi uninstall-local: @if test -n '$(TARGET)'; then \ echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \ $(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \ fi