mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
e773d7dba6
Mon Dec 11 04:44:11 2000 Tim Janik <timj@gtk.org> * gboxed.c: fixed dealing with collection/lcopy of NULL values. * gclosure.h: removed insane ramblings, added G_CALLBACK() a casting convenience macro. * Makefile.am: cleanups, marshaller generation rules. * gmarshal.[hc]: new files with GRuntime standard marshallers. * glib-genmarshal.c: fix log domain, support gruntime standard marshallers, suport G_TYPE_PARAM, come with extern "C" and #include gmarshal.h. * glib-genmarshal.1: reflect glib-genmarshal.c updates. * gobject.[hc]: implement object constructor. rework parameter changed notification queueing, we support queue freezes now and don't dispatch from an idle handler anymore. parameter->property rename hassle. implemented ::properties_changed and ::notify::* signals for property change notification (the later supports property names as details). added signal connection and named data properties. (g_signal_connect_object): new function to setup while_alive connections. (g_object_class_install_property): sink properties now, since they are initially floating. (g_object_steal_data): (g_object_set_data_full): (g_object_set_data): (g_object_get_data): set/get data by using g_datalist_*() functions directly. (g_object_queue_param_changed): nuked. (g_object_freeze_notify): start queueing of property changes (freeze/ thaw calls stack). (g_object_notify): announce changes of a certain property directly. (g_object_thaw_notify): process queue of property changes, therefore emitting GObject::notify::detail with detail being the changed properties names. (G_OBJECT_WARN_INVALID_PROPERTY_ID): saner macro variant of former G_WARN_INVALID_PARAM_ID(). * gparam.[hc]: param specs are now initially floating and need to be sunken with g_param_spec_sink(), support G_TYPE_PARAM values. added G_PARAM_CONSTRUCT and G_PARAM_CONSTRUCT_ONLY parameter flags, required by GObjectClass.constructor(). * gparamspecs.[hc]: added GParamSpecParam, GParamSpecPointer and GParamSpecCCallback, param specs for G_TYPE_PARAM, G_TYPE_POINTER and G_TYPE_CCALLBACK respectively. * gsignal.[hc]: cleanups. (signal_id_lookup): after walking the anchestry, try interfaces as well. (g_signal_new): new function to create signals from varargs type list. (g_signal_connect_closure): closure connection variant that works from signal name+detail. (g_signal_connect_data): c handler connection variant that works from signal name+detail. (g_signal_emit_valist): emit signal for an instance with paraneters collected from a va_list. (g_signal_emit): emit signal, taking parameters from varargs list. (g_signal_emit_by_name): same as g_signal_emit, working from signal name+detail. (signal_emit_R): return whether return_value needs to be altered. * gtype.[hc]: set log-domain to GRuntime, i'm slowly getting to all the points that need to reflect the upcoming rename. melt g_type_conforms_to() functionality into g_type_is_a(), as that is what we really want (liskov substitution principle). assorted changes to other files due to conforms_to->is_a. * gvalue.[hc]: implemented g_value_set_instance() that sets a value from an instantiatable type via the value_table's collect_value() function (based on an idea from James Henstridge <james@daa.com.au>). cleanups/fixes. * gvaluetypes.[hc]: implement G_TYPE_CCALLBACK and G_TYPE_PARAM.
189 lines
5.8 KiB
Makefile
189 lines
5.8 KiB
Makefile
# GRuntime - GLib Type, Object, Parameter and Signal Library
|
|
# Copyright (C) 1997,98,99,2000 Tim Janik and Red Hat, Inc.
|
|
#
|
|
## Process this file with automake to produce Makefile.in
|
|
|
|
INCLUDES = @STRIP_BEGIN@ \
|
|
-DG_LOG_DOMAIN=g_log_domain_gruntime \
|
|
-I$(top_srcdir) \
|
|
-I$(top_builddir) \
|
|
@GLIB_DEBUG_FLAGS@ \
|
|
@STRIP_END@
|
|
|
|
# libraries to compile and install
|
|
lib_LTLIBRARIES = libgobject-1.3.la
|
|
|
|
# libtool stuff: set version and export symbols for resolving
|
|
libgobjectincludedir = $(includedir)/glib-2.0/gobject
|
|
libgobject_1_3_la_LDFLAGS = @STRIP_BEGIN@ \
|
|
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
|
|
-export-dynamic \
|
|
@STRIP_END@
|
|
libgobject_1_3_la_LIBADD = # $(libglib)
|
|
|
|
#
|
|
# setup source file variables
|
|
#
|
|
# GRuntime header files for public installation (non-generated)
|
|
gruntime_public_h_sources = @STRIP_BEGIN@ \
|
|
gboxed.h \
|
|
gbsearcharray.h \
|
|
gclosure.h \
|
|
genums.h \
|
|
gobject.h \
|
|
gparam.h \
|
|
gparamspecs.h \
|
|
gsignal.h \
|
|
gtype.h \
|
|
gtypemodule.h \
|
|
gtypeplugin.h \
|
|
gvalue.h \
|
|
gvaluecollector.h \
|
|
gvaluetypes.h \
|
|
@STRIP_END@
|
|
# GRuntime header files that don't get installed
|
|
gruntime_private_h_sources =
|
|
# GRuntime C sources to build the library from
|
|
gruntime_c_sources = @STRIP_BEGIN@ \
|
|
gboxed.c \
|
|
gbsearcharray.c \
|
|
gclosure.c \
|
|
genums.c \
|
|
gobject.c \
|
|
gparam.c \
|
|
gparamspecs.c \
|
|
gsignal.c \
|
|
gtype.c \
|
|
gtypemodule.c \
|
|
gtypeplugin.c \
|
|
gvalue.c \
|
|
gvaluetypes.c \
|
|
@STRIP_END@
|
|
|
|
# we use our own built_sources variable rules to avoid automake's
|
|
# BUILT_SOURCES oddities
|
|
# we generate frequently rebuild files piggyback on a stamp file, so sources
|
|
# depending on them only get rebuild when the built source actually changed
|
|
# content
|
|
|
|
# built sources that get installed with the header files
|
|
gruntime_built_public_sources = @STRIP_BEGIN@ \
|
|
gmarshal.h \
|
|
@STRIP_END@
|
|
# built sources that don't get installed
|
|
gruntime_built_sources = @STRIP_BEGIN@ \
|
|
stamp-gmarshal.h \
|
|
gmarshal.c \
|
|
${gruntime_built_public_sources} \
|
|
@STRIP_END@
|
|
# non-header sources (headers should be specified in the above variables)
|
|
# that don't serve as direct make target sources, i.e. they don't have
|
|
# their own .lo rules and don't get publically installed
|
|
gruntime_extra_sources = @STRIP_BEGIN@ \
|
|
gmarshal.list \
|
|
gmarshal.strings \
|
|
@STRIP_END@
|
|
|
|
|
|
#
|
|
# setup GRuntime sources and their dependancies
|
|
#
|
|
gruntime_target_headers = $(gruntime_public_h_sources) $(gruntime_built_public_sources)
|
|
gruntime_target_sources = $(gruntime_c_sources)
|
|
MAINTAINERCLEANFILES += $(gruntime_built_sources)
|
|
EXTRA_HEADERS +=
|
|
EXTRA_DIST += $(gruntime_private_h_sources) $(gruntime_extra_sources)
|
|
EXTRA_DIST += $(gruntime_built_sources)
|
|
|
|
#
|
|
# rules to generate built sources
|
|
#
|
|
# setup autogeneration dependancies
|
|
gen_sources = xgen-gmh xgen-gmc xgen-gms
|
|
CLEANFILES += $(gen_sources)
|
|
Makefile: oldest-source-stamp # oh boy, does automake SUCK!
|
|
oldest-source-stamp: $(gruntime_built_sources)
|
|
$(OBJECTS): oldest-source-stamp ${gruntime_built_public_sources} # this is our oldest file, used for implicit auto-generation deps
|
|
# initial creation of the real stamp-* files
|
|
gmarshal.h: # never add deps here
|
|
test -f "$(srcdir)/$@" || touch $(srcdir)/$@
|
|
# normal autogeneration rules
|
|
# all autogenerated files need to be generated in the srcdir,
|
|
# so old versions get remade and are not confused with newer
|
|
# versions in the build dir. thus a development setup requires
|
|
# srcdir to be writable, passing --disable-rebuilds to
|
|
# ../configure will supress all autogeneration rules.
|
|
$(srcdir)/stamp-gmarshal.h: @REBUILD@ gmarshal.list gmarshal.h glib-genmarshal
|
|
cd $(srcdir) \
|
|
&& echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
|
|
&& echo "#define __G_MARSHAL_H__" >> xgen-gmh \
|
|
&& ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --header >> xgen-gmh \
|
|
&& echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
|
|
&& (cmp -s xgen-gmh gmarshal.h || cp xgen-gmh gmarshal.h) \
|
|
&& rm -f xgen-gmh xgen-gmh~ \
|
|
&& echo timestamp > $(@F)
|
|
$(srcdir)/gmarshal.c: @REBUILD@ $(srcdir)/stamp-gmarshal.h
|
|
cd $(srcdir) \
|
|
&& ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --body >> xgen-gmc \
|
|
&& cp xgen-gmc gmarshal.c \
|
|
&& rm -f xgen-gmc xgen-gmc~
|
|
$(srcdir)/gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
|
|
cd $(srcdir) \
|
|
&& grep '^[A-Z]' $(srcdir)/gmarshal.list \
|
|
| sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
|
|
&& cp xgen-gms gmarshal.strings \
|
|
&& rm -f xgen-gms xgen-gms~
|
|
glib-genmarshal.o: gmarshal.strings
|
|
|
|
|
|
# target platform:
|
|
libgobjectinclude_HEADERS = $(gruntime_target_headers)
|
|
libgobject_1_3_la_SOURCES = $(gruntime_target_sources)
|
|
|
|
#
|
|
# programs to compile and install
|
|
#
|
|
bin_PROGRAMS = gobject-query glib-genmarshal
|
|
# source files
|
|
gobject_query_SOURCES = gobject-query.c
|
|
glib_genmarshal_SOURCES = glib-genmarshal.c
|
|
# link programs against libgobject
|
|
progs_LDADD = ../libglib-1.3.la libgobject-1.3.la
|
|
glib_genmarshal_LDADD = ../libglib-1.3.la # can't have libgobject here
|
|
gobject_query_LDADD = $(progs_LDADD)
|
|
|
|
#
|
|
# manual pages to install
|
|
#
|
|
man_MANS = glib-genmarshal.1
|
|
|
|
#
|
|
# auxillary files
|
|
#
|
|
EXTRA_DIST += \
|
|
makefile.mingw.in \
|
|
makefile.msc.in \
|
|
gobject.def \
|
|
gobject.rc.in \
|
|
glib-genmarshal.1
|
|
|
|
BUILT_EXTRA_DIST = \
|
|
makefile.mingw \
|
|
makefile.msc \
|
|
gobject.rc
|
|
|
|
gobject.rc: $(top_builddir)/config.status $(top_srcdir)/gobject/gobject.rc.in
|
|
cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
|
|
|
makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gobject/makefile.mingw.in
|
|
cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
|
|
|
makefile.msc: $(top_builddir)/config.status $(top_srcdir)/gobject/makefile.msc.in
|
|
cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
|
|
|
dist-hook: $(BUILT_EXTRA_DIST)
|
|
files='$(BUILT_EXTRA_DIST)'; \
|
|
for f in $$files; do \
|
|
if test -f $$f; then d=.; else d=$(srcdir); fi; \
|
|
cp $$d/$$f $(distdir) || exit 1; done
|