Fix missing osx files when running "make dist"

Fixes #528, #1381.
This commit is contained in:
Xavier Claessens 2018-05-23 10:07:22 -04:00 committed by Xavier Claessens
parent d3735df34f
commit c627fb4926

View File

@ -601,13 +601,13 @@ libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-dynamic $(no_undefined) -export-dynamic $(no_undefined)
if OS_COCOA
# We cannot build .m files because it would require adding AC_PROG_OBJC in # 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 # 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 # 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 # limitation we rename .m files to .c and compile them separately with
# -xobjective-c into an intermediary library. Note that we cannot rename those # -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. # 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. # See https://bugzilla.gnome.org/show_bug.cgi?id=672777.
OBJC_FILES = \ OBJC_FILES = \
gnextstepsettingsbackend.m \ gnextstepsettingsbackend.m \
@ -618,9 +618,11 @@ OBJC_FILES = \
OBJC_C_FILES = $(OBJC_FILES:.m=.c) OBJC_C_FILES = $(OBJC_FILES:.m=.c)
BUILT_SOURCES += $(OBJC_C_FILES) BUILT_SOURCES += $(OBJC_C_FILES)
CLEANFILES += $(OBJC_C_FILES) CLEANFILES += $(OBJC_C_FILES)
EXTRA_DIST += $(OBJC_FILES)
$(OBJC_C_FILES): %.c: %.m Makefile $(OBJC_C_FILES): %.c: %.m Makefile
cp $< $@ cp $< $@
if OS_COCOA
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