[gxml/serialization] Fixes on Builds and GObject Introspection support
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/serialization] Fixes on Builds and GObject Introspection support
- Date: Sat, 1 Feb 2014 11:18:05 +0000 (UTC)
commit ef502d6913de426374dc0f70d3a4f8f3cfad9601
Author: Daniel Espinosa <esodan gmail com>
Date: Sat Feb 1 05:17:11 2014 -0600
Fixes on Builds and GObject Introspection support
configure.ac | 17 +++---------
gxml/Makefile.am | 52 ++++++++++++-------------------------
gxml/{gxml.deps => gxml-0.4.deps} | 0
3 files changed, 21 insertions(+), 48 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ee7c326..810b099 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,8 +99,8 @@ AC_SUBST([PROJECT_MAJOR_MINOR_VERSION])
API_VERSION=project_major_minor_version
AC_SUBST([API_VERSION])
-
-
+GXML_VERSION=project_base_version
+AC_SUBST([GXML_VERSION])
### Dependencies
@@ -155,15 +155,6 @@ fi
# Check for GObject Introspection
GOBJECT_INTROSPECTION_CHECK([1.32.0])
-AC_ARG_ENABLE([gi-system-install],
- AS_HELP_STRING([--enable-gi-system-install], [Install GObject Introspection files along with system
installed files [default=no]]),
- [enable_gi_system_install=$enableval],[enable_gi_system_install=no])
-AM_CONDITIONAL(ENABLE_GI_SYSTEM_INSTALL, [test x"$enable_gi_system_install" = "xyes"])
-
-
-
-# TODO: should libgxml.pc have no version number in it?
-
### Autoconf generating Makefiles
AC_CONFIG_FILES([
Makefile
@@ -184,8 +175,8 @@ AC_OUTPUT
# Print configuration summary
echo ""
-echo " Configuration summary for GXml"
+echo " Configuration summary for GXml-$GXML_VERSION"
echo " Installation prefix: $prefix"
-echo " Enable GObject Introspection System Install (--enable-gi-system-install): `if test
x$enable_gi_system_install != xno; then echo yes; else echo no; fi`"
+echo " Enable GObject Introspection (--enable-instrospection): `if test x$have_instrospection != xno;
then echo yes; else echo no; fi`"
echo " Documentation: ${have_valadoc}"
echo ""
diff --git a/gxml/Makefile.am b/gxml/Makefile.am
index 40e62e7..ee6d3f3 100644
--- a/gxml/Makefile.am
+++ b/gxml/Makefile.am
@@ -1,7 +1,8 @@
## Process this file with automake to produce Makefile.in
## Created by Anjuta and modified based on libfolks
-
+# Empty variable to be added elements later
+CLEANFILES=
### General Compilation flags
AM_CPPFLAGS = \
-include $(CONFIG_HEADER) \
@@ -109,7 +110,7 @@ gxml_HEADERS = gxml.h
vapidir = $(datadir)/vala/vapi
dist_vapi_DATA = \
gxml-0.4.vapi \
- gxml.deps \
+ gxml-0.4.deps \
$(NULL)
# .pc pkg-config file
@@ -129,34 +130,28 @@ GITIGNOREFILES = \
### GObject Introspection
-
-if ENABLE_GI_SYSTEM_INSTALL
-girdir = $(INTROSPECTION_GIRDIR)
-typelibdir = $(INTROSPECTION_TYPELIBDIR)
-else
-girdir = $(datadir)/gir-1.0
-typelibdir = $(libdir)/girepository-1.0
-endif
-
# dlname:
# Extract our dlname like libfolks does, see bgo#658002 and bgo#585116
# This is what g-ir-scanner does.
libgxml_dlname = \
`$(SED) -n "s/^dlname='\([A-Za-z0-9.+-]\+\)'/\1/p" libgxml-0.4.la`
--include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS =
-INTROSPECTION_SCANNER_ARGS =
+# This makes GObject Introspection optional and requires to use --enable-instrospection switch on configure
+if HAVE_INTROSPECTION
+INTROSPECTION_GIRS = GXml-$(API_VERSION).gir
INTROSPECTION_COMPILER_ARGS = --includedir=. -l $(libgxml_dlname)
-GXml-$(API_VERSION).gir: libgxml-0.4.la
-GIRS = GXml-$(API_VERSION).gir
-
-dist_gir_DATA = $(GIRS)
-nodist_typelib_DATA = $(GIRS:.gir=.typelib)
-
+GXml-0.4.gir: libgxml-0.4.la
+GXml-0.4.typelib: $(INTROSPECTION_GIRS)
+ $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) $< -o $@
+girdir = $(INTROSPECTION_GIRDIR)
+gir_DATA = $(INTROSPECTION_GIRS)
+typelibdir = $(INTROSPECTION_TYPELIBDIR)
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+CLEANFILES += $(gir_DATA) $(typelibs_DATA)
+endif
### Files to clean
BUILT_SOURCES = \
gxml_0_4_la_vala.stamp \
@@ -164,24 +159,11 @@ BUILT_SOURCES = \
gxml-0.4.vapi \
$(NULL)
-# TODO: should we add *.c to this list?, or is there a var of generated .c we can put in CLEANFILES?
-
-# gxml.pc
-# $(libgxml_la_VALASOURCES:.vala=.c) \
-# $(vapi_DATA) \
-# $(typelibs_DATA) \
-# $(INTROSPECTION_GIRS) \
-# gxml.vala.stamp
-
-## File used to indicate whether code needs rebuilding (?)
-CLEANFILES = \
- $(INTROSPECTION_GIRS) \
- $(typelibs_DATA) \
+CLEANFILES += \
$(BUILT_SOURCES) \
- $(nodist_typelib_DATA) \
$(libgxml_0_4_la_SOURCES:.vala=.c)
-MAINTAINERCLEANFILES = $(BUILT_SOURCES) $(dist_gir_DATA)
+MAINTAINERCLEANFILES = $(BUILT_SOURCES)
diff --git a/gxml/gxml.deps b/gxml/gxml-0.4.deps
similarity index 100%
rename from gxml/gxml.deps
rename to gxml/gxml-0.4.deps
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]