X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2FMakefile.am;h=d285ffdefa257688bb6285de8ace755755335ddf;hb=0ccb288da103890dcf89ceda75fb8b488077a1de;hp=789ebdfaf05a963e42fbf4ff4cad367bbf0776a2;hpb=5309d10f8f68f5c66937ec96615c1197fd7f263c;p=platform%2Fupstream%2Fglib.git diff --git a/glib/Makefile.am b/glib/Makefile.am index 789ebdf..d285ffd 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -19,14 +19,15 @@ gregex_c = gregex_h = endif -if OS_UNIX -gtestutils_c = gtestutils.c -tests_subdir = tests +if HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS +gatomic_c = gatomic-gcc.c +else +gatomic_c = gatomic.c endif -SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . $(tests_subdir) +SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests -DIST_SUBDIRS = libcharset gnulib pcre update-pcre +DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests AM_CPPFLAGS = \ -I$(top_srcdir) \ @@ -74,6 +75,8 @@ EXTRA_DIST += \ glib.symbols \ gregex.c \ gregex.h \ + win_iconv.c \ + libglib-gdb.py.in \ $(MIRRORING_TAB_SOURCE) # These may be in the builddir too @@ -85,28 +88,31 @@ BUILT_EXTRA_DIST = \ lib_LTLIBRARIES = libglib-2.0.la +if OS_WIN32_AND_DLL_COMPILATION if MS_LIB_AVAILABLE noinst_DATA = glib-2.0.lib -install-ms-lib: - $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir) +install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir) +uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib +endif +endif -uninstall-ms-lib: - -rm $(DESTDIR)$(libdir)/glib-2.0.lib -else install-ms-lib: + $(install_ms_lib_cmd) + uninstall-ms-lib: -endif + $(uninstall_ms_lib_cmd) libglib_2_0_la_SOURCES = \ garray.c \ gasyncqueue.c \ - gatomic.c \ + $(gatomic_c) \ gbacktrace.c \ gbase64.c \ gbookmarkfile.c \ gbsearcharray.h \ gcache.c \ + gchecksum.c \ gcompletion.c \ gconvert.c \ gdataset.c \ @@ -117,6 +123,7 @@ libglib_2_0_la_SOURCES = \ gfileutils.c \ ghash.c \ ghook.c \ + ghostutils.c \ giochannel.c \ gkeyfile.c \ glibintl.h \ @@ -130,6 +137,7 @@ libglib_2_0_la_SOURCES = \ gnode.c \ goption.c \ gpattern.c \ + gpoll.c \ gprimes.c \ gqsort.c \ gqueue.c \ @@ -145,7 +153,7 @@ libglib_2_0_la_SOURCES = \ gstdio.c \ gstrfuncs.c \ gstring.c \ - $(gtestutils_c) \ + gtestutils.c \ gthread.c \ gthreadprivate.h \ gthreadpool.c \ @@ -161,7 +169,9 @@ libglib_2_0_la_SOURCES = \ gunidecomp.h \ gunidecomp.c \ gunicodeprivate.h \ + gurifuncs.c \ gutils.c \ + gvarianttype.c \ gdebug.h \ gprintf.c \ gprintfint.h @@ -188,6 +198,7 @@ glibsubinclude_HEADERS = \ gbase64.h \ gbookmarkfile.h \ gcache.h \ + gchecksum.h \ gcompletion.h \ gconvert.h \ gdataset.h \ @@ -197,6 +208,7 @@ glibsubinclude_HEADERS = \ gfileutils.h \ ghash.h \ ghook.h \ + ghostutils.h \ gi18n.h \ gi18n-lib.h \ giochannel.h \ @@ -211,6 +223,7 @@ glibsubinclude_HEADERS = \ gnode.h \ goption.h \ gpattern.h \ + gpoll.h \ gprimes.h \ gqsort.h \ gquark.h \ @@ -234,7 +247,9 @@ glibsubinclude_HEADERS = \ gtree.h \ gtypes.h \ gunicode.h \ + gurifuncs.h \ gutils.h \ + gvarianttype.h \ gwin32.h \ gprintf.h @@ -251,10 +266,14 @@ if PLATFORM_WIN32 no_undefined = -no-undefined endif -if OS_WIN32 -# This requires a very new libtool +if OS_WIN32_AND_DLL_COMPILATION export_symbols = -export-symbols glib.def +glib_win32_res = glib-win32-res.o +glib_win32_res_ldflag = -Wl,$(glib_win32_res) + +glib_def = glib.def + install-def-file: $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def @@ -267,11 +286,6 @@ uninstall-def-file: export_symbols = $(LIBTOOL_EXPORT_OPTIONS) endif -if OS_WIN32 -glib_win32_res = glib-win32-res.o -glib_win32_res_ldflag = -Wl,$(glib_win32_res) -endif - if ENABLE_REGEX if USE_SYSTEM_PCRE pcre_lib = $(PCRE_LIBS) @@ -286,7 +300,7 @@ 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_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) @GLIB_DEF@ +libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def) libglib_2_0_la_LDFLAGS = \ $(glib_win32_res_ldflag) \ @@ -295,17 +309,33 @@ libglib_2_0_la_LDFLAGS = \ INSTALL_PROGS= +gspawn-win32-helper-console.c: + echo '#define HELPER_CONSOLE' >$@ + echo '#include "gspawn-win32-helper.c"' >>$@ + +gspawn-win64-helper.c: + echo '#include "gspawn-win32-helper.c"' >$@ + +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 +gspawn_win64_helper_LDADD = libglib-2.0.la +gspawn_win64_helper_LDFLAGS = -mwindows +gspawn_win64_helper_console_LDADD = libglib-2.0.la +else INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console gspawn_win32_helper_LDADD = libglib-2.0.la gspawn_win32_helper_LDFLAGS = -mwindows gspawn_win32_helper_console_LDADD = libglib-2.0.la -gspawn-win32-helper-console.c: - echo '#include "gspawn-win32-helper.c"' >$@ +endif +endif glib-win32-res.o: glib.rc $(WINDRES) glib.rc $@ -endif bin_PROGRAMS = ${INSTALL_PROGS} @@ -313,15 +343,57 @@ if OS_UNIX INSTALL_PROGS += gtester gtester_SOURCES = gtester.c -gtester_LDADD = libglib-2.0.la +gtester_LDADD = libglib-2.0.la + +auto_config_binscripts = gtester-report +bin_SCRIPTS = ${auto_config_binscripts} +EXTRA_DIST += ${auto_config_binscripts} + +CONFIGVARS = \ + "bindir" : "${bindir}", \ + "glib-version" : "${GLIB_VERSION}" + +install-exec-hook: + for sf in ${auto_config_binscripts} ; do \ + mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \ + && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \ + -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \ + -e '1,1s|#! /usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \ + || exit $$? ; \ + rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \ + done endif glib-2.0.lib: libglib-2.0.la glib.def - lib -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@ + lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.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 + +distclean-local: + if test $(srcdir) = .; then :; else \ + rm -f libglib-gdb.py; \ + fi + +# install gdb scripts +gdbdir = $(datadir)/glib-2.0/gdb +dist_gdb_SCRIPTS = glib.py + +libglib-gdb.py: libglib-gdb.py.in + sed -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > libglib-gdb.py + + +install-data-hook: libglib-gdb.py + mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR) + $(INSTALL) libglib-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)/libglib-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)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR) + mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR) + rm -f $(DESTDIR)$(libdir)/libglib-2.0.so + ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so +endif