mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-05 08:56:16 +01:00
f9eb9eed10
Perform a substantial cleanup of the build system with respect to building and installing testcases. First, Makefile.decl has been renamed glib.mk and substantially expanded. We intend to add more stuff here in the future, like canned rules for mkenums, marshallers, resources, etc. By default, tests are no longer compiled as part of 'make'. They will be built when 'make check' is run. The old behaviour can be obtained with --enable-always-build-tests. --disable-modular-tests is gone (because tests are no longer built by default). There is no longer any way to cause 'make check' to be a no-op, but that's not very useful anyway. A new glibtests.m4 file is introduced. Along with glib.mk, this provides for consistent handling of --enable-installed-tests and --enable-always-build-tests (mentioned above). Port our various test-installing Makefiles to the new framework. This patch substantially improves the situation in the toplevel tests/ directory. Things are now somewhat under control there. There were some tests being built that weren't even being run and we run those now. The long-running GObject performance tests in this directory have been removed from 'make check' because they take too long. As an experiment, 'make check' now runs the testcases on win32 builds, by default. We can't run them under gtester (since it uses a pipe to communicate with the subprocess) so just toss them in TESTS. Most of them are passing on win32. Things are not quite done here, but this patch is already a substantial improvement. More to come.
282 lines
8.0 KiB
Makefile
282 lines
8.0 KiB
Makefile
# GObject - 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
|
|
include $(top_srcdir)/glib.mk
|
|
|
|
SUBDIRS = . tests
|
|
|
|
AM_CPPFLAGS = \
|
|
-DG_LOG_DOMAIN=\"GLib-GObject\" \
|
|
$(glib_INCLUDES) \
|
|
$(GLIB_DEBUG_FLAGS) \
|
|
-DGOBJECT_COMPILATION
|
|
|
|
AM_CFLAGS = $(GLIB_WARN_CFLAGS)
|
|
|
|
libglib = $(top_builddir)/glib/libglib-2.0.la
|
|
|
|
# libraries to compile and install
|
|
lib_LTLIBRARIES = libgobject-2.0.la
|
|
|
|
if OS_WIN32_AND_DLL_COMPILATION
|
|
if MS_LIB_AVAILABLE
|
|
noinst_DATA += gobject-2.0.lib
|
|
|
|
install_ms_lib_cmd = $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir)
|
|
uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gobject-2.0.lib
|
|
endif
|
|
endif
|
|
|
|
install-ms-lib:
|
|
$(install_ms_lib_cmd)
|
|
|
|
uninstall-ms-lib:
|
|
$(uninstall_ms_lib_cmd)
|
|
|
|
if PLATFORM_WIN32
|
|
no_undefined = -no-undefined
|
|
endif
|
|
|
|
if OS_WIN32_AND_DLL_COMPILATION
|
|
gobject_win32_res = gobject-win32-res.o
|
|
gobject_win32_res_ldflag = -Wl,$(gobject_win32_res)
|
|
endif
|
|
|
|
libgobjectincludedir = $(includedir)/glib-2.0/gobject
|
|
libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
|
|
$(gobject_win32_res_ldflag) \
|
|
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
|
|
-export-dynamic $(no_undefined)
|
|
|
|
libgobject_2_0_la_CFLAGS = $(AM_CFLAGS) $(LIBFFI_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
|
|
|
|
libgobject_2_0_la_LIBADD = $(libglib) $(LIBFFI_LIBS)
|
|
|
|
libgobject_2_0_la_DEPENDENCIES = $(gobject_win32_res)
|
|
|
|
#
|
|
# setup source file variables
|
|
#
|
|
# GObject library header files for public installation
|
|
gobject_public_h_sources = \
|
|
glib-types.h \
|
|
gbinding.h \
|
|
gboxed.h \
|
|
gclosure.h \
|
|
genums.h \
|
|
gmarshal.h \
|
|
gobject.h \
|
|
gparam.h \
|
|
gparamspecs.h \
|
|
gsignal.h \
|
|
gsourceclosure.h \
|
|
gtype.h \
|
|
gtypemodule.h \
|
|
gtypeplugin.h \
|
|
gvalue.h \
|
|
gvaluearray.h \
|
|
gvaluecollector.h \
|
|
gvaluetypes.h \
|
|
gobjectnotifyqueue.c
|
|
|
|
# GObject library header files that don't get installed
|
|
gobject_private_h_sources = \
|
|
gatomicarray.h \
|
|
gtype-private.h
|
|
|
|
# GObject library C sources to build the library from
|
|
gobject_c_sources = \
|
|
gobject_probes.d \
|
|
gatomicarray.c \
|
|
gbinding.c \
|
|
gboxed.c \
|
|
gclosure.c \
|
|
genums.c \
|
|
gmarshal.c \
|
|
gobject.c \
|
|
gobject_trace.h \
|
|
gparam.c \
|
|
gparamspecs.c \
|
|
gsignal.c \
|
|
gsourceclosure.c \
|
|
gtype.c \
|
|
gtypemodule.c \
|
|
gtypeplugin.c \
|
|
gvalue.c \
|
|
gvaluearray.c \
|
|
gvaluetransform.c \
|
|
gvaluetypes.c
|
|
|
|
if ENABLE_DTRACE
|
|
gobject_probes.h: gobject_probes.d Makefile
|
|
$(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
|
|
@$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
|
|
gobject_probes.o: gobject_probes.d Makefile
|
|
$(AM_V_GEN) $(DTRACE) -G -s $< -o $@
|
|
BUILT_SOURCES += gobject_probes.h gobject_probes.o
|
|
CLEANFILES += gobject_probes.h
|
|
libgobject_2_0_la_LIBADD += gobject_probes.o
|
|
endif
|
|
|
|
if ENABLE_SYSTEMTAP
|
|
tapset_in_files = gobject.stp.in
|
|
tapsetdir = @ABS_TAPSET_DIR@
|
|
tapset_DATA = $(tapset_in_files:.stp.in=.stp)
|
|
EXTRA_DIST += $(tapset_in_files)
|
|
endif
|
|
|
|
# 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
|
|
gobject_extra_sources = \
|
|
gmarshal.list \
|
|
gmarshal.strings
|
|
|
|
|
|
#
|
|
# setup GObject library sources and their dependancies
|
|
#
|
|
gobject_target_headers = $(gobject_public_h_sources)
|
|
gobject_target_sources = $(gobject_c_sources)
|
|
EXTRA_HEADERS =
|
|
EXTRA_DIST += \
|
|
$(gobject_private_h_sources) \
|
|
$(gobject_extra_sources) \
|
|
marshal-genstrings.pl
|
|
|
|
# This is read by gobject-introspection/misc/ and gtk-doc
|
|
gobject-public-headers.txt: Makefile
|
|
$(AM_V_GEN) echo $(gobject_public_h_sources) > $@.tmp && mv $@.tmp $@
|
|
|
|
CLEANFILES += gobject-public-headers.txt
|
|
|
|
all-local: gobject-public-headers.txt
|
|
|
|
#
|
|
# rules to generate built sources
|
|
#
|
|
# setup autogeneration dependancies
|
|
gen_sources = xgen-gmh xgen-gmc xgen-gms
|
|
CLEANFILES += $(gen_sources)
|
|
|
|
# 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.
|
|
|
|
|
|
gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
|
|
$(AM_V_GEN) 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 = $(gobject_target_headers)
|
|
libgobject_2_0_la_SOURCES = $(gobject_target_sources)
|
|
|
|
#
|
|
# programs to compile and install
|
|
#
|
|
bin_PROGRAMS = gobject-query glib-genmarshal
|
|
bin_SCRIPTS = glib-mkenums
|
|
# source files
|
|
gobject_query_SOURCES = gobject-query.c
|
|
glib_genmarshal_SOURCES = glib-genmarshal.c
|
|
# link programs against libgobject
|
|
progs_LDADD = ./libgobject-2.0.la $(libglib)
|
|
glib_genmarshal_LDADD = $(libglib)
|
|
gobject_query_LDADD = $(progs_LDADD)
|
|
|
|
#
|
|
# auxillary files
|
|
#
|
|
EXTRA_DIST += \
|
|
makefile.msc.in \
|
|
gobject.rc.in \
|
|
libgobject-gdb.py.in \
|
|
glib-mkenums.in
|
|
|
|
CLEANFILES += libgobject-gdb.py
|
|
|
|
BUILT_EXTRA_DIST += \
|
|
makefile.msc \
|
|
gobject.rc
|
|
|
|
gobject-win32-res.o: gobject.rc
|
|
$(AM_V_GEN) $(WINDRES) gobject.rc $@
|
|
|
|
gobject-2.0.lib: libgobject-2.0.la gobject.def
|
|
lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gobject.def -out:$@
|
|
|
|
dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gobject.vcproj ../build/win32/vs10/gobject.vcxproj ../build/win32/vs10/gobject.vcxproj.filters
|
|
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
|
|
|
|
../build/win32/vs9/gobject.vcproj: $(top_srcdir)/build/win32/vs9/gobject.vcprojin
|
|
for F in $(libgobject_2_0_la_SOURCES); do \
|
|
case $$F in \
|
|
*.c) echo ' <File RelativePath="..\..\..\gobject\'$$F'" />' \
|
|
;; \
|
|
esac; \
|
|
done >libgobject.sourcefiles
|
|
$(CPP) -P - <$(top_srcdir)/build/win32/vs9/gobject.vcprojin >$@
|
|
rm libgobject.sourcefiles
|
|
|
|
../build/win32/vs10/gobject.vcxproj: $(top_srcdir)/build/win32/vs10/gobject.vcxprojin
|
|
for F in $(libgobject_2_0_la_SOURCES); do \
|
|
case $$F in \
|
|
*.c) echo ' <ClCompile Include="..\..\..\gobject\'$$F'" />' \
|
|
;; \
|
|
esac; \
|
|
done >libgobject.vs10.sourcefiles
|
|
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxprojin >$@
|
|
rm libgobject.vs10.sourcefiles
|
|
|
|
../build/win32/vs10/gobject.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin
|
|
for F in $(libgobject_2_0_la_SOURCES); do \
|
|
case $$F in \
|
|
*.c) echo ' <ClCompile Include="..\..\..\gobject\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
|
|
;; \
|
|
esac; \
|
|
done >libgobject.vs10.sourcefiles.filters
|
|
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin >$@
|
|
rm libgobject.vs10.sourcefiles.filters
|
|
|
|
install-data-local: install-ms-lib
|
|
|
|
uninstall-local: uninstall-ms-lib uninstall-gdb
|
|
|
|
distclean-local:
|
|
if test $(srcdir) = .; then :; else \
|
|
rm -f $(BUILT_EXTRA_DIST); \
|
|
fi
|
|
|
|
# install gdb scripts
|
|
gdbdir = $(datadir)/glib-2.0/gdb
|
|
dist_gdb_SCRIPTS = gobject.py
|
|
|
|
libgobject-gdb.py: libgobject-gdb.py.in
|
|
$(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libgobject-gdb.py.in > $(builddir)/libgobject-gdb.py
|
|
|
|
uninstall-gdb:
|
|
-rm -r $(DESTDIR)$(datadir)/gdb
|
|
|
|
install-data-hook: libgobject-gdb.py
|
|
mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)
|
|
$(INSTALL) $(builddir)/libgobject-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py
|
|
if HAVE_GLIB_RUNTIME_LIBDIR
|
|
mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
|
|
mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
|
|
mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
|
|
rm -f $(DESTDIR)$(libdir)/libgobject-2.0.so
|
|
ln -s $(GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgobject-2.0.so
|
|
endif
|