glib/gobject/Makefile.am
James Henstridge c4391cbf37 require automake 1.7. Add calls to libtoolize and gtkdocize. Clean up some
2003-03-01  James Henstridge  <james@daa.com.au>

    * autogen.sh: require automake 1.7.  Add calls to libtoolize and
    gtkdocize.  Clean up some of the error messages.

    * configure.in: move version declaration to the top of the file
    (before AC_INIT), using M4 macros.
    GLIB_AC_DIVERT_BEFORE_HELP() calls no longer necessary, due to use
    of M4 macro expansion in help messages instead.
    Convert AC_ARG_WITH/AC_ARG_ENABLE calls to use AC_HELP_STRING to
    format help strings.  Use quadrigraphs to get square brackets to
    show correctly.
    Replace gtk-doc checks with a call to GTK_DOC_CHECK() macro.
    Use AC_CONFIG_COMMANDS([glibconfig.h], ...) to output
    glibconfig.h, so that "./config.status glibconfig.h" works.
    Add an extra AC_CONFIG_FILES call listing other files we want
    generated by config.status protected by an "if false" block.  This
    way automake generates the rules needed to rebuild the files for
    us.
    Add quotes in various places.

    * docs/reference/*/Makefile.am: convert to use the common
    gtk-doc.make file.  This localises the complexity to a single
    makefile fragment maintained with gtk-doc itself.

    * */Makefile.am: remove unneeded rules to build win32 files with
    config.status.  Automake now does this for us.
    Replace instances of @FOO@ with $(FOO) where appropriate -- this
    allows automake to do a better job checking the makefile.
    Add some files to DISTCLEANFILES where appropriate

    * Makefile.am: use the DISTCHECK_CONFIGURE_FLAGS variable to
    ensure that --enable-gtk-doc is passed to configure during a
    distcheck.  Remove the custom distcheck, since the standard one
    will now do.

    * gobject/Makefile.am: switch to BUILT_SOURCES, since that now
    works.
2003-03-04 10:10:48 +00:00

240 lines
6.1 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
INCLUDES = \
-DG_LOG_DOMAIN=\"GLib-GObject\" \
-I$(top_srcdir) \
-I$(top_srcdir)/glib \
-I$(top_builddir) \
$(GLIB_DEBUG_FLAGS) \
-DG_DISABLE_DEPRECATED \
-DGOBJECT_COMPILATION \
-DG_DISABLE_CONST_RETURNS
libglib = $(top_builddir)/glib/libglib-2.0.la
# libraries to compile and install
lib_LTLIBRARIES = libgobject-2.0.la
if MS_LIB_AVAILABLE
noinst_DATA = gobject-2.0.lib
install-ms-lib:
$(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir)
uninstall-ms-lib:
-rm $(DESTDIR)$(libdir)/gobject-2.0.lib
else
install-ms-lib:
uninstall-ms-lib:
endif
if PLATFORM_WIN32
no_undefined = -no-undefined
endif
if OS_WIN32
export_symbols = -export-symbols gobject.def
install-libtool-import-lib:
$(INSTALL) .libs/libgobject-2.0.dll.a $(DESTDIR)$(libdir)
$(INSTALL) gobject.def $(DESTDIR)$(libdir)/gobject-2.0.def
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libgobject-2.0.dll.a $(DESTDIR)$(libdir)/gobject-2.0.def
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif
# libtool stuff: set version and export symbols for resolving
libgobjectincludedir = $(includedir)/glib-2.0/gobject
libgobject_2_0_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-dynamic $(no_undefined) $(export_symbols)
libgobject_2_0_la_LIBADD = $(G_OBJECT_WIN32_RESOURCE) $(libglib)
libgobject_2_0_la_DEPENDENCIES = $(G_OBJECT_WIN32_RESOURCE) $(GOBJECT_DEF)
#
# setup source file variables
#
# GObject library header files for public installation
gobject_public_h_sources = \
gboxed.h \
gclosure.h \
genums.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 \
gmarshal.h
# GObject library header files that don't get installed
gobject_private_h_sources =
# GObject library C sources to build the library from
gobject_c_sources = \
gboxed.c \
gclosure.c \
genums.c \
gobject.c \
gparam.c \
gparamspecs.c \
gsignal.c \
gsourceclosure.c \
gtype.c \
gtypemodule.c \
gtypeplugin.c \
gvalue.c \
gvaluearray.c \
gvaluetransform.c \
gvaluetypes.c
# these sources (also mentioned above) are generated.
BUILT_SOURCES = gmarshal.h gmarshal.c
# 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)
#
# 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.
if CROSS_COMPILING
glib_genmarshal=$(GLIB_GENMARSHAL)
else
glib_genmarshal=./glib-genmarshal
endif
gmarshal.h: stamp-gmarshal.h
@true
stamp-gmarshal.h: @REBUILD@ gmarshal.list glib-genmarshal$(EXEEXT)
$(MAKE) glib-genmarshal$(EXEEXT)
echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
&& echo "#define __G_MARSHAL_H__" >> xgen-gmh \
&& $(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
&& echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
&& (cmp -s xgen-gmh gmarshal.h 2>/dev/null || cp xgen-gmh gmarshal.h) \
&& rm -f xgen-gmh xgen-gmh~ \
&& echo timestamp > $@
gmarshal.c: @REBUILD@ stamp-gmarshal.h
$(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
&& cp xgen-gmc gmarshal.c \
&& rm -f xgen-gmc xgen-gmc~
gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
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
gsignal.lo: gmarshal.c
# 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
noinst_PROGRAMS = testgobject testoverride
# source files
gobject_query_SOURCES = gobject-query.c
glib_genmarshal_SOURCES = glib-genmarshal.c
testgobject_SOURCES = testgobject.c
testoverride_SOURCES = testoverride.c
# link programs against libgobject
progs_LDADD = ./libgobject-2.0.la $(libglib)
glib_genmarshal_LDADD = $(libglib)
gobject_query_LDADD = $(progs_LDADD)
testgobject_LDADD = $(progs_LDADD)
testoverride_LDADD = $(progs_LDADD)
#
# manual pages to install
#
man_MANS = glib-genmarshal.1 glib-mkenums.1
#
# auxillary files
#
EXTRA_DIST += \
makefile.mingw.in \
makefile.msc.in \
gobject.def \
gobject.rc.in \
glib-genmarshal.1 \
glib-mkenums.in \
glib-mkenums.1
BUILT_EXTRA_DIST = \
makefile.mingw \
makefile.msc \
gobject.rc \
gmarshal.h \
gmarshal.c \
stamp-gmarshal.h
if OS_WIN32
$(G_OBJECT_WIN32_RESOURCE): gobject.rc
$(top_srcdir)/build/win32/lt-compile-resource gobject.rc $@
endif
gobject-2.0.lib: libgobject-2.0.la gobject.def
lib -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gobject.def -out:$@
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
install-data-local: install-ms-lib install-libtool-import-lib
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
distclean-local:
if test $(srcdir) = .; then :; else \
rm -f $(BUILT_EXTRA_DIST); \
fi