1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2025-07-04 09:46:59 +02:00

Revert "Rename objective-c files from .c to .m"

This reverts commit e400af99d436b003b93479e4892623f336f58a6b.
This commit is contained in:
Matthias Clasen 2018-05-22 17:21:04 -04:00
parent e25a2f95b3
commit 2e9f3a9afe
6 changed files with 12 additions and 23 deletions

@ -602,25 +602,10 @@ libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
-export-dynamic $(no_undefined) -export-dynamic $(no_undefined)
if OS_COCOA if OS_COCOA
# We cannot build .m files because it would require adding AC_PROG_OBJC in # Let's avoid polluting the CFLAGS of libgio with -xobjective-c
# configure.ac, and it cannot be added conditionally. That means we would always # We cannot simply rename the ObjC files to .m because it plays
# depend on an objective-c compiler even when not needed. To work around that # tricks with Automake. For further reference, see:
# limitation we rename .m files to .c and compile them separately with # https://bugzilla.gnome.org/show_bug.cgi?id=672777
# -xobjective-c into an intermediary library. Note that we cannot rename those
# files to .c directly in the source tree because Meson needs the .m extension.
# See https://bugzilla.gnome.org/show_bug.cgi?id=672777.
OBJC_FILES = \
gnextstepsettingsbackend.m \
gosxcontenttype.m \
gosxappinfo.m \
gcocoanotificationbackend.m \
$(NULL)
OBJC_C_FILES = $(OBJC_FILES:.m=.c)
BUILT_SOURCES += $(OBJC_C_FILES)
CLEANFILES += $(OBJC_C_FILES)
$(OBJC_C_FILES): %.c: %.m Makefile
cp $< $@
libgio_objc_2_0_la_CFLAGS = $(libgio_2_0_la_CFLAGS) -xobjective-c libgio_objc_2_0_la_CFLAGS = $(libgio_2_0_la_CFLAGS) -xobjective-c
libgio_objc_2_0_la_CPPFLAGS = $(libgio_2_0_la_CPPFLAGS) libgio_objc_2_0_la_CPPFLAGS = $(libgio_2_0_la_CPPFLAGS)
libgio_objc_2_0_la_LDFLAGS = $(libgio_2_0_la_LDFLAGS) -Wl,-framework,Foundation -Wl,-framework,AppKit libgio_objc_2_0_la_LDFLAGS = $(libgio_2_0_la_LDFLAGS) -Wl,-framework,Foundation -Wl,-framework,AppKit

@ -292,6 +292,11 @@ if host_system == 'windows'
settings_sources += files('gregistrysettingsbackend.c') settings_sources += files('gregistrysettingsbackend.c')
endif endif
# FIXME:
#if OS_COCOA
#settings_sources += files('gnextstepsettingsbackend.c')
#endif
application_headers = files( application_headers = files(
'gapplication.h', 'gapplication.h',
'gapplicationcommandline.h', 'gapplicationcommandline.h',
@ -407,11 +412,10 @@ if host_system != 'windows'
) )
if glib_have_cocoa if glib_have_cocoa
settings_sources += files('gnextstepsettingsbackend.m') contenttype_sources += files('gosxcontenttype.c')
contenttype_sources += files('gosxcontenttype.m') appinfo_sources += files('gosxappinfo.c')
appinfo_sources += files('gosxappinfo.m')
if glib_have_os_x_9_or_later if glib_have_os_x_9_or_later
unix_sources += files('gcocoanotificationbackend.m') unix_sources += files('gcocoanotificationbackend.c')
endif endif
else else
contenttype_sources += files('gcontenttype.c') contenttype_sources += files('gcontenttype.c')