Quiet down the build a bit
[platform/upstream/glib.git] / glib / Makefile.am
index 6fd3fd3..d0da7b2 100644 (file)
@@ -1,7 +1,28 @@
 ## Process this file with automake to produce Makefile.in
 include $(top_srcdir)/Makefile.decl
 
-CLEANFILES=
+BUILT_SOURCES =
+DISTCLEANFILES =
+CLEANFILES =
+
+#
+# Generate glibconfig.h
+#
+# The timestamp of the stamp file is used to indicate if glibconfig.h is
+# up to date with respect to config.status.  In the usual case, changes
+# to config.status will not result in changes to glibconfig.h so we
+# avoid touching its timestamp (in order not to rebuild the whole tree).
+#
+DISTCLEANFILES += glibconfig-stamp glibconfig.h
+BUILT_SOURCES += glibconfig-stamp
+configexecincludedir = $(libdir)/glib-2.0/include
+nodist_configexecinclude_HEADERS = glibconfig.h
+glibconfig-stamp: ../config.status
+       $(AM_V_GEN) cd $(top_builddir) && \
+         $(SHELL) ./config.status glib/glibconfig.h
+       @touch glibconfig-stamp
+
+
 
 if HAVE_GOOD_PRINTF
 else
@@ -32,7 +53,7 @@ SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
 
 AM_CPPFLAGS =                          \
-       -I$(top_srcdir)                 \
+       $(glib_INCLUDES)                \
        $(pcre_inc)                     \
        -DG_LOG_DOMAIN=\"GLib\"         \
        $(GLIB_DEBUG_FLAGS)             \
@@ -41,23 +62,15 @@ AM_CPPFLAGS =                               \
        -DPCRE_STATIC
 
 glib.def: glib.symbols
-       $(AM_V_GEN) (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/    /' -e 's/G_GNUC_[^ ]*//g') > glib.def
-
-galias.h: $(srcdir)/makegalias.pl glib.symbols
-         $(AM_V_GEN) $(PERL) $(srcdir)/makegalias.pl < $(srcdir)/glib.symbols > galias.h
-
-galiasdef.c: $(srcdir)/makegalias.pl glib.symbols
-         $(AM_V_GEN) $(PERL) $(srcdir)/makegalias.pl -def < $(srcdir)/glib.symbols > galiasdef.c
+       $(AM_V_GEN) (echo -e EXPORTS; $(CPP) -P -DG_OS_WIN32 - <$(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/       /') > glib.def
 
 if OS_LINUX
 if HAVE_GNUC_VISIBILITY
 TESTS_ENVIRONMENT = GLIB_DEBUG_FLAGS="$(GLIB_DEBUG_FLAGS)"
-TESTS = abicheck.sh pltcheck.sh
+TESTS = abicheck.sh
 endif
 endif
 
-BUILT_SOURCES = galias.h galiasdef.c
-
 MIRRORING_TAB_SOURCE =                                 \
        glib-mirroring-tab/Makefile             \
        glib-mirroring-tab/gen-mirroring-tab.c  \
@@ -69,11 +82,11 @@ MIRRORING_TAB_SOURCE =                              \
 EXTRA_DIST +=                  \
        makefile.msc.in         \
        glib.rc.in              \
+       gen-iswide-table.py     \
        gen-unicode-tables.pl   \
        gen-script-table.pl     \
-       makegalias.pl           \
+       glibconfig.h.win32.in   \
        abicheck.sh             \
-       pltcheck.sh             \
        glib.symbols            \
        gregex.c                \
        gregex.h                \
@@ -84,9 +97,8 @@ EXTRA_DIST +=                         \
 # These may be in the builddir too
 BUILT_EXTRA_DIST =             \
        makefile.msc            \
-       glib.rc                 \
-       galias.h                \
-       galiasdef.c
+       glibconfig.h.win32      \
+       glib.rc
 
 lib_LTLIBRARIES = libglib-2.0.la
 
@@ -123,7 +135,8 @@ libglib_2_0_la_SOURCES =    \
        gconvert.c              \
        gdataset.c              \
        gdatasetprivate.h       \
-       gdate.c                 \
+       gdate.c                 \
+       gdatetime.c             \
        gdir.c                  \
        gerror.c                \
        gfileutils.c            \
@@ -131,11 +144,12 @@ libglib_2_0_la_SOURCES =  \
        ghook.c                 \
        ghostutils.c            \
        giochannel.c            \
-       gkeyfile.c              \
+       gkeyfile.c              \
        glibintl.h              \
        glib_trace.h            \
        glist.c                 \
-       gmain.c                 \
+       gmain-internal.h        \
+       gmain.c                 \
        gmappedfile.c           \
        gmarkup.c               \
        gmem.c                  \
@@ -165,6 +179,7 @@ libglib_2_0_la_SOURCES =    \
        gthreadprivate.h        \
        gthreadpool.c           \
        gtimer.c                \
+       gtimezone.c             \
        gtree.c                 \
        guniprop.c              \
        gutf8.c                 \
@@ -193,6 +208,9 @@ libglib_2_0_la_SOURCES =    \
        gprintf.c               \
        gprintfint.h
 
+if OS_UNIX
+libglib_2_0_la_SOURCES += glib-unix.c
+endif  
 
 EXTRA_libglib_2_0_la_SOURCES = \
        giounix.c       \
@@ -206,6 +224,10 @@ glibinclude_HEADERS =   \
        glib-object.h   \
        glib.h
 
+if OS_UNIX
+glibinclude_HEADERS += glib-unix.h
+endif
+
 glibsubincludedir=$(includedir)/glib-2.0/glib
 glibsubinclude_HEADERS =   \
        galloca.h       \
@@ -222,6 +244,7 @@ glibsubinclude_HEADERS =   \
        gconvert.h      \
        gdataset.h      \
        gdate.h         \
+       gdatetime.h     \
        gdir.h          \
        gerror.h        \
        gfileutils.h    \
@@ -263,10 +286,11 @@ glibsubinclude_HEADERS =   \
        gthread.h       \
        gthreadpool.h   \
        gtimer.h        \
+       gtimezone.h     \
        gtree.h         \
        gtypes.h        \
        gunicode.h      \
-       gurifuncs.h             \
+       gurifuncs.h     \
        gutils.h        \
        gvarianttype.h  \
        gvariant.h      \
@@ -278,7 +302,7 @@ install-data-local: install-ms-lib install-def-file
          echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
          echo "*** contents of this directory and type 'make install' again." ;        \
          false ;                                                                       \
-        fi
+       fi
 
 uninstall-local: uninstall-ms-lib uninstall-def-file
 
@@ -319,23 +343,22 @@ pcre_lib =
 pcre_inc =
 endif
 
-libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib)
+libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib) $(GLIB_RT_LIBS)
 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
 
-libglib_2_0_la_LDFLAGS = \
+libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
         $(glib_win32_res_ldflag) \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
        -export-dynamic $(no_undefined) $(export_symbols)
 
 INSTALL_PROGS=
 
-
 if ENABLE_DTRACE
 glib_probes.h: glib_probes.d Makefile
-       $(DTRACE) -C -h -s $< -o $@.tmp
-       sed -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
+       $(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
 glib_probes.o: glib_probes.d Makefile
-       $(DTRACE) -G -s $< -o $@
+       $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
 BUILT_SOURCES += glib_probes.h glib_probes.o
 CLEANFILES += glib_probes.h glib_probes.h.tmp
 libglib_2_0_la_LIBADD += glib_probes.o
@@ -343,7 +366,7 @@ endif
 
 if ENABLE_SYSTEMTAP
 tapset_in_files = glib.stp.in
-tapsetdir   = $(DESTDIR)@ABS_TAPSET_DIR@
+tapsetdir   = @ABS_TAPSET_DIR@
 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
 EXTRA_DIST += $(tapset_in_files)
 endif
@@ -359,6 +382,7 @@ gspawn-win64-helper-console.c:
        echo '#define HELPER_CONSOLE' >$@
        echo '#include "gspawn-win32-helper.c"' >>$@
 
+
 if OS_WIN32
 if OS_WIN32_X64
 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
@@ -389,8 +413,8 @@ bin_SCRIPTS = ${auto_config_binscripts}
 EXTRA_DIST += ${auto_config_binscripts}
 
 CONFIGVARS = \
-        "bindir"       : "${bindir}",          \
-        "glib-version"  : "${GLIB_VERSION}"
+       "bindir"        : "${bindir}",          \
+       "glib-version"  : "${GLIB_VERSION}"
 
 install-exec-hook:
        for sf in ${auto_config_binscripts} ; do \
@@ -408,7 +432,7 @@ endif
 glib-2.0.lib: libglib-2.0.la glib.def
        lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
 
-dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj
+dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj ../build/win32/vs10/glib.vcxproj ../build/win32/vs10/glib.vcxproj.filters
        files='$(BUILT_EXTRA_DIST)'; \
        for f in $$files; do \
          if test -f $$f; then d=.; else d=$(srcdir); fi; \
@@ -417,13 +441,38 @@ dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj
 ../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin
        for F in $(libglib_2_0_la_SOURCES); do \
                case $$F in \
-               *-gcc.c) \
+               *-gcc.c|*-unix.c) \
                        ;; \
                *.c)    echo '   <File RelativePath="..\..\..\glib\'$$F'" />' \
                        ;; \
                esac; \
        done >libglib.sourcefiles
        $(CPP) -P - <$(top_srcdir)/build/win32/vs9/glib.vcprojin >$@
+       rm libglib.sourcefiles
+
+../build/win32/vs10/glib.vcxproj: $(top_srcdir)/build/win32/vs10/glib.vcxprojin
+       for F in $(libglib_2_0_la_SOURCES); do \
+               case $$F in \
+               *-gcc.c|*-unix.c) \
+                       ;; \
+               *.c) echo '    <ClCompile Include="..\..\..\glib\'$$F'" />' \
+                    ;; \
+               esac; \
+       done >libglib.vs10.sourcefiles
+       $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxprojin >$@
+       rm libglib.vs10.sourcefiles
+
+../build/win32/vs10/glib.vcxproj.filters: $(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin
+       for F in $(libglib_2_0_la_SOURCES); do \
+               case $$F in \
+               *-gcc.c|*-unix.c) \
+                       ;; \
+               *.c) echo '    <ClCompile Include="..\..\..\glib\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
+                    ;; \
+               esac; \
+       done >libglib.vs10.sourcefiles.filters
+       $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin >$@  
+       rm libglib.vs10.sourcefiles.filters
 
 distclean-local:
        if test $(srcdir) = .; then :; else \