From: Emmanuele Bassi Date: Wed, 24 May 2017 11:27:45 +0000 (+0100) Subject: build: Clean up libatspi X-Git-Tag: AT_SPI2_CORE_2_25_3~1^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1eb223bb48464d707290ef540581e9763b0ceee8;p=platform%2Fupstream%2Fat-spi2-core.git build: Clean up libatspi The sources list includes the headers twice, for good measure; the installed headers list includes a source file. The enumeration types are generated in the source directory, and blown away regardless if their content did not change. --- diff --git a/atspi/Makefile.am b/atspi/Makefile.am index 5267f47..07f0786 100644 --- a/atspi/Makefile.am +++ b/atspi/Makefile.am @@ -1,6 +1,16 @@ -lib_LTLIBRARIES = libatspi.la +lib_LTLIBRARIES = -libatspi_la_LDFLAGS = @LDFLAGS@ @LT_VERSION_INFO@ @LIBTOOL_EXPORT_OPTIONS@ -no-undefined +BUILT_SOURCES = + +CLEANFILES = +DISTCLEANFILES = +EXTRA_DIST = + +lib_LTLIBRARIES += libatspi.la + +libatspi_la_LDFLAGS = \ + @LDFLAGS@ @LT_VERSION_INFO@ @LIBTOOL_EXPORT_OPTIONS@ \ + -no-undefined libatspi_la_CFLAGS = \ $(DBUS_CFLAGS) \ @@ -19,9 +29,7 @@ libatspi_la_LIBADD = \ libatspi_la_DEPENDENCIES = $(top_builddir)/dbind/libdbind.la -libatspiincludedir = $(includedir)/at-spi-2.0/atspi - -libatspiinclude_HEADERS = \ +atspi_headers = \ atspi.h \ atspi-accessible.h \ atspi-action.h \ @@ -33,11 +41,9 @@ libatspiinclude_HEADERS = \ atspi-device-listener-private.h \ atspi-document.h \ atspi-editabletext.h \ - atspi-enum-types.h \ atspi-event-listener.h \ atspi-event-listener-private.h \ -atspi-gmain.c \ -atspi-gmain.h \ + atspi-gmain.h \ atspi-hyperlink.h \ atspi-hypertext.h \ atspi-image.h \ @@ -55,68 +61,47 @@ atspi-gmain.h \ atspi-types.h \ atspi-value.h -libatspi_la_SOURCES = \ +libatspi_la_SOURCES = \ $(BUILT_SOURCES) \ - $(libatspiinclude_HEADERS) \ - atspi.h \ atspi-accessible.c \ - atspi-accessible.h \ atspi-accessible-private.h \ atspi-action.c \ - atspi-action.h \ atspi-application.c \ - atspi-application.h \ atspi-collection.c \ - atspi-collection.h \ atspi-component.c \ - atspi-component.h \ - atspi-constants.h \ atspi-device-listener.c \ - atspi-device-listener.h \ atspi-device-listener-private.h \ atspi-document.c \ - atspi-document.h \ atspi-editabletext.c \ - atspi-editabletext.h \ atspi-event-listener.c \ - atspi-event-listener.h \ atspi-event-listener-private.h \ + atspi-gmain.c \ atspi-hyperlink.c \ - atspi-hyperlink.h \ atspi-hypertext.c \ - atspi-hypertext.h \ atspi-image.c \ - atspi-image.h \ atspi-matchrule.c \ - atspi-matchrule.h \ atspi-matchrule-private.h \ atspi-misc.c \ - atspi-misc.h \ atspi-misc-private.h \ atspi-object.c \ - atspi-object.h \ atspi-private.h \ atspi-registry.c \ - atspi-registry.h \ atspi-relation.c \ - atspi-relation.h \ atspi-selection.c \ - atspi-selection.h \ atspi-stateset.c \ - atspi-stateset.h \ atspi-table.c \ atspi-table-cell.c \ - atspi-table.h \ atspi-text.c \ - atspi-text.h \ - atspi-types.h \ atspi-value.c \ - atspi-value.h + $() -BUILT_SOURCES = \ +BUILT_SOURCES += \ atspi-enum-types.c \ atspi-enum-types.h +libatspiincludedir = $(includedir)/at-spi-2.0/atspi +libatspiinclude_HEADERS = $(atspi_headers) atspi-enum-types.h + #CLEANFILES = atspi-constants.h #atspi-constants.h: $(top_srcdir)/xml/spec.xml $(top_srcdir)/tools/c-constants-gen.py @@ -127,20 +112,28 @@ ENUM_TYPES = \ atspi-types.h atspi-enum-types.h: atspi-enum-types.h.template $(ENUM_TYPES) $(GLIB_MKENUMS) - $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template atspi-enum-types.h.template $(ENUM_TYPES)) > $@ + $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/atspi-enum-types.h.template $(addprefix $(srcdir)/, $(ENUM_TYPES)) > $@.tmp \ + && (cmp -s $@.tmp $@ || cp -f $@.tmp $@) \ + && rm -f $@.tmp atspi-enum-types.c: atspi-enum-types.c.template $(ENUM_TYPES) $(GLIB_MKENUMS) - $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template atspi-enum-types.c.template $(ENUM_TYPES)) > $@ + $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/atspi-enum-types.c.template $(addprefix $(srcdir)/, $(ENUM_TYPES)) > $@.tmp \ + && (cmp -s $@.tmp $@ || cp -f $@.tmp $@) \ + && rm -f $@.tmp + +CLEANFILES += \ + atspi-enum-types.c \ + atspi-enum-types.h + +EXTRA_DIST += \ + atspi-enum-types.c.template \ + atspi-enum-types.h.template -include $(INTROSPECTION_MAKEFILE) INTROSPECTION_GIRS = INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) -EXTRA_DIST = \ - atspi-enum-types.c.template \ - atspi-enum-types.h.template - if HAVE_INTROSPECTION Atspi-2.0.gir: libatspi.la Atspi_2_0_gir_INCLUDES = GLib-2.0 GObject-2.0 @@ -159,10 +152,9 @@ gir_DATA = $(INTROSPECTION_GIRS) typelibdir = $(libdir)/girepository-1.0 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) -CLEANFILES = \ +CLEANFILES += \ $(gir_DATA) \ $(typelib_DATA) - endif -include $(top_srcdir)/git.mk