Added GObject Introspection related rules
This commit is contained in:
parent
e2d3bab5a0
commit
b87589b155
@ -1,3 +1,5 @@
|
||||
m4_define([swe_glib_api_version], [1.0])
|
||||
|
||||
AC_INIT([swe-glib], [0.1], [gergely@polonkai.eu])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AM_INIT_AUTOMAKE([-Wall foreign])
|
||||
@ -8,6 +10,9 @@ if test "x$enable_debug" = "xyes" ; then
|
||||
AC_DEFINE([DEBUG], [1], [Define if debugging is enabled])
|
||||
fi
|
||||
|
||||
AC_SUBST([SWE_GLIB_API_VERSION], [swe_glib_api_version])
|
||||
AC_SUBST([SWE_GLIB_API_VERSION_U], [AS_TR_SH([swe_glib_api_version])])
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AM_PROG_AR
|
||||
@ -21,6 +26,7 @@ AM_GNU_GETTEXT_VERSION([0.17])
|
||||
LT_INIT
|
||||
AC_CHECK_LIB([m], [atan])
|
||||
GTK_DOC_CHECK([1.19], [--flavour no-tmpl])
|
||||
GOBJECT_INTROSPECTION_CHECK([1.0])
|
||||
PKG_PROG_PKG_CONFIG
|
||||
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
|
||||
PKG_CHECK_MODULES([GLIB], [glib-2.0])
|
||||
|
@ -2,6 +2,15 @@ AM_CPPFLAGS = -DG_LOG_DOMAIN=\"SWE-GLib\" -DLOCALEDIR=\"$(localedir)\" -D__SWE_G
|
||||
|
||||
lib_LTLIBRARIES = libswe-glib-0.1.la
|
||||
|
||||
INST_H_SRC_FILES = \
|
||||
swe-glib.h \
|
||||
gswe-types.h \
|
||||
gswe-moment.h \
|
||||
gswe-timestamp.h
|
||||
|
||||
INST_H_BUILT_FILES = \
|
||||
enumtypes.h
|
||||
|
||||
libswe_glib_sources = swe-glib.c gswe-moment.c gswe-timestamp.c enumtypes.c
|
||||
gswe_headers = gswe-timestamp.h gswe-types.h
|
||||
|
||||
@ -22,3 +31,25 @@ enumtypes.h: $(gswe_headers) enumtypes.h.template
|
||||
enumtypes.c: $(gswe_headers) enumtypes.h enumtypes.c.template
|
||||
$(GLIB_MKENUMS) --template $(filter %.template,$^) $(filter-out %.template,$^) > \
|
||||
enumtypes.c.tmp && mv enumtypes.c.tmp enumtypes.c
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
|
||||
include $(INTROSPECTION_MAKEFILE)
|
||||
SweGlib-$(SWE_GLIB_API_VERSION).gir: libswe-glib-0.1.la
|
||||
SweGlib_@SWE_GLIB_API_VERSION_U@_gir_FILES = $(INST_H_SRC_FILES) $(INST_H_BUILT_FILES) $(filter %.c,$(libswe_glib_0_1_la_SOURCES))
|
||||
SweGlib_@SWE_GLIB_API_VERSION_U@_gir_LIBS = libswe-glib-0.1.la
|
||||
SweGlib_@SWE_GLIB_API_VERSION_U@_gir_SCANNERFLAGS = --identifier-prefix=Gswe --symbol-prefix=gswe --warn-all
|
||||
SweGlib_@SWE_GLIB_API_VERSION_U@_gir_INCLUDES = GLib-2.0 GObject-2.0
|
||||
SweGlib_@SWE_GLIB_API_VERSION_U@_gir_CFLAGS = -D__SWE_GLIB_BUILDING__ -I$(top_srcdir) -I$(srcdir) -I$(builddir)
|
||||
SweGlib_@SWE_GLIB_API_VERSION_U@_gir_EXPORT_PACKAGES = swe-glib
|
||||
INTROSPECTION_GIRS = SweGlib-$(SWE_GLIB_API_VERSION).gir
|
||||
|
||||
girdir = $(datadir)/gir-1.0
|
||||
gir_DATA = SweGlib-$(SWE_GLIB_API_VERSION).gir
|
||||
|
||||
typelibsdir = $(libdir)/girepository-1.0
|
||||
typelibs_DATA = SweGlib-$(SWE_GLIB_API_VERSION).typelib
|
||||
|
||||
CLEANFILES += $(gir_DATA) $(typelibs_DATA)
|
||||
|
||||
endif
|
||||
|
@ -92,7 +92,7 @@ gswe_timestamp_class_init(GsweTimestampClass *klass)
|
||||
g_object_class_install_property(gobject_class, PROP_INSTANT_RECALC, g_param_spec_boolean("instant-recalc", "Instant recalculation", "Instantly recalculate values upon parameter change", FALSE, G_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GsweTimestamp:gregorian-valid
|
||||
* GsweTimestamp:gregorian-valid:
|
||||
*
|
||||
* If TRUE, the Gregorian value stored in the GsweTimestamp object is
|
||||
* currently considered as valid, thus, no recalculation is needed.
|
||||
@ -158,7 +158,7 @@ gswe_timestamp_class_init(GsweTimestampClass *klass)
|
||||
g_object_class_install_property(gobject_class, PROP_GREGORIAN_TIMEZONE_OFFSET, g_param_spec_double("gregorian-timezone-offset", "Gregorian timezone offset", "The offset relative to UTC in the Gregorian calendar", -24.0, 24.0, 0.0, G_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GsweTimestamp:julian-day-valid
|
||||
* GsweTimestamp:julian-day-valid:
|
||||
*
|
||||
* If TRUE, the Julian day value stored in the GsweTimestamp object is
|
||||
* currently considered as valid, thus, no recalculation is needed.
|
||||
|
Loading…
Reference in New Issue
Block a user