diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2018-06-22 01:04:08 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2018-06-22 01:07:19 +0100 |
commit | 59c12bc8aad67d80129e21e3829cb7f7bb91be53 (patch) | |
tree | c28c3a35413a4263d48aa30d1270cdfcbc0b96d3 | |
parent | c14cf3e3804b9102fe90f2250e24576552136e85 (diff) | |
download | glib-objc-check.tar.gz |
build: Use .m files directlyobjc-check
If we're on macOS we can count on an Objective C compiler to exist.
-rw-r--r-- | gio/Makefile.am | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/gio/Makefile.am b/gio/Makefile.am index 9dccb6829..91826f91c 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -601,39 +601,17 @@ libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -export-dynamic $(no_undefined) -# We cannot build .m files because it would require adding AC_PROG_OBJC in -# configure.ac, and it cannot be added conditionally. That means we would always -# depend on an objective-c compiler even when not needed. To work around that -# limitation we rename .m files to .c and compile them separately with -# -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. -# This must be done outside of "if OS_COCOA" block otherwise distcheck fails. -# 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) -EXTRA_DIST += $(OBJC_FILES) -$(OBJC_C_FILES): %.c: %.m Makefile - cp $< $@ - if OS_COCOA -libgio_objc_2_0_la_CFLAGS = $(libgio_2_0_la_CFLAGS) -xobjective-c +libgio_objc_2_0_la_OBJCFLAGS = $(AM_OBJCFLAGS) $(libgio_2_0_la_CFLAGS) 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_SOURCES = \ - gnextstepsettingsbackend.c \ - gosxcontenttype.c \ - gosxappinfo.c \ - gosxappinfo.h + gnextstepsettingsbackend.m \ + gosxcontenttype.m \ + gosxappinfo.m if MAC_OS_X_9 libgio_objc_2_0_la_SOURCES += \ - gcocoanotificationbackend.c + gcocoanotificationbackend.m endif noinst_LTLIBRARIES += libgio-objc-2.0.la |