Commit 862fe11f authored by Philip Withnall's avatar Philip Withnall

build: Conditionally add gwin32.c to sources without using EXTRA_ prefix

Instead of messing around with EXTRA_*_SOURCES and manually handling .lo
files, why not just add gwin32.c to the GLib sources conditionally?

This will hopefully fix `make distcheck` failing due to gwin32.Plo not
being generated in the sub-builddir≠srcdir stage, due to depcomp
inexplicably not generating it. (Note that it is correctly generated in
non-distcheck builds.)
Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parent bcafcc5b
......@@ -1772,18 +1772,6 @@ dnl ****************************************
dnl *** platform dependent source checks ***
dnl ****************************************
AC_MSG_CHECKING(for platform-dependent source)
case "$host" in
*-*-cygwin*|*-*-mingw*)
PLATFORMDEP=gwin32.lo
;;
*)
PLATFORMDEP=
;;
esac
AC_MSG_RESULT($PLATFORMDEP)
AC_SUBST(PLATFORMDEP)
AC_MSG_CHECKING([whether to compile timeloop])
case "$host" in
*-*-cygwin*|*-*-mingw*|*-*-minix)
......
......@@ -222,13 +222,17 @@ libglib_2_0_la_SOURCES += gthread-posix.c
endif
endif
if PLATFORM_WIN32
libglib_2_0_la_SOURCES += gwin32.c
endif
EXTRA_libglib_2_0_la_SOURCES = \
giounix.c \
giowin32.c \
gspawn.c \
gspawn-private.h \
gspawn-win32.c \
gwin32.c
$(NULL)
glibincludedir=$(includedir)/glib-2.0
glibinclude_HEADERS = \
......@@ -360,8 +364,8 @@ pcre_inc =
endif
libglib_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS) $(LIBSYSTEMD_CFLAGS)
libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib) $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) $(LIBSYSTEMD_LIBS)
libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib) $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) $(LIBSYSTEMD_LIBS)
libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ $(glib_win32_res) $(glib_def)
libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
$(glib_win32_res_ldflag) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment