build: Stop distributing generated files in autotools tarballs

It is a bug if we distribute files which are generated at build time —
they should be built on the machine which is compiling GLib, not be
shipped in the tarball.

This brings the autotools-generated tarball in line with the
ninja-generated one, with the exception of man pages and gtk-doc HTML
output.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2018-07-30 19:58:24 +01:00
parent 47dcbd318f
commit 2a69cdb1cd
4 changed files with 46 additions and 23 deletions

View File

@ -288,6 +288,9 @@ unix_sources = \
gportalsupport.h \
$(portal_sources) \
$(NULL)
nodist_unix_sources = \
$(nodist_portal_sources) \
$(NULL)
giounixincludedir=$(includedir)/gio-unix-2.0/gio
giounixinclude_HEADERS = \
@ -316,6 +319,8 @@ endif
gdbus_daemon_sources = \
gdbusdaemon.c \
gdbusdaemon.h \
$(NULL)
nodist_gdbus_daemon_sources = \
gdbus-daemon-generated.c \
gdbus-daemon-generated.h \
$(NULL)
@ -336,6 +341,9 @@ win32_actual_sources = \
gwin32networkmonitor.h \
gwin32notificationbackend.c \
$(NULL)
nodist_win32_actual_sources = \
$(nodist_gdbus_daemon_sources) \
$(NULL)
win32_more_sources_for_vcproj = \
gwin32appinfo.c \
@ -353,6 +361,7 @@ appinfo_sources += gwin32appinfo.c gwin32appinfo.h
contenttype_sources += gcontenttype-win32.c
platform_libadd += -lshlwapi -lws2_32 -ldnsapi -liphlpapi
win32_sources = $(win32_actual_sources)
nodist_win32_sources = $(nodist_win32_actual_sources)
giowin32includedir=$(includedir)/gio-win32-2.0/gio
giowin32include_HEADERS = \
@ -392,7 +401,9 @@ portal_sources = \
gnetworkmonitorportal.h \
gproxyresolverportal.c \
gproxyresolverportal.h \
$(xdp_dbus_built_sources) \
$(NULL)
nodist_portal_sources = \
$(xdp_dbus_built_sources) \
$(NULL)
if OS_UNIX
@ -546,14 +557,16 @@ gio_base_sources = \
gzlibcompressor.c \
gzlibdecompressor.c \
gmountprivate.h \
gioenumtypes.h \
gioenumtypes.c \
glistmodel.c \
gliststore.c \
$(application_sources) \
$(gdbus_sources) \
$(local_sources) \
$(NULL)
nodist_gio_base_sources = \
gioenumtypes.h \
gioenumtypes.c \
$(NULL)
libgio_2_0_la_SOURCES = \
$(gio_base_sources) \
@ -563,6 +576,11 @@ libgio_2_0_la_SOURCES = \
$(win32_sources) \
$(settings_sources) \
$(NULL)
nodist_libgio_2_0_la_SOURCES = \
$(nodist_gio_base_sources) \
$(nodist_unix_sources) \
$(nodist_win32_sources) \
$(NULL)
EXTRA_DIST += strinfo.c
@ -762,8 +780,11 @@ gio_headers = \
gioincludedir=$(includedir)/glib-2.0/gio/
gioinclude_HEADERS = \
$(gio_headers) \
gioenumtypes.h
$(gio_headers) \
$(NULL)
nodist_gioinclude_HEADERS = \
gioenumtypes.h \
$(NULL)
nodist_gioinclude_HEADERS = \
gnetworking.h \
@ -785,7 +806,6 @@ EXTRA_DIST += \
gioenumtypes.c.template \
gio.rc.in \
gschema.dtd \
gconstructor_as_data.h \
$(NULL)
BUILT_EXTRA_DIST += \
@ -846,11 +866,13 @@ gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.py
glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
glib_compile_schemas_SOURCES = \
gconstructor_as_data.h \
gvdb/gvdb-format.h \
gvdb/gvdb-builder.h \
gvdb/gvdb-builder.c \
glib-compile-schemas.c
nodist_glib_compile_schemas_SOURCES = \
gconstructor_as_data.h \
$(NULL)
gsettings_LDADD = libgio-2.0.la \
$(top_builddir)/gobject/libgobject-2.0.la \

View File

@ -557,7 +557,8 @@ nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
resources_DEPENDENCIES = test.gresource
test_ltlibraries += libresourceplugin.la
libresourceplugin_la_SOURCES = resourceplugin.c plugin_resources.c
libresourceplugin_la_SOURCES = resourceplugin.c
nodist_libresourceplugin_la_SOURCES = plugin_resources.c
libresourceplugin_la_LDFLAGS = -avoid-version -module -export-dynamic $(no_undefined)
libresourceplugin_la_LIBADD = $(LDADD)

View File

@ -410,15 +410,26 @@ gspawn-win64-helper-console.c:
echo '#define HELPER_CONSOLE' >$@
echo '#include "gspawn-win32-helper.c"' >>$@
nodist_win_helper_sources = \
gspawn-win32-helper-console.c \
gspawn-win64-helper.c \
gspawn-win64-helper-console.c \
$(NULL)
BUILT_SOURCES += $(nodist_win_helper_sources)
CLEANFILES += $(nodist_win_helper_sources)
if OS_WIN32
if OS_WIN32_X64
bin_PROGRAMS += gspawn-win64-helper gspawn-win64-helper-console
nodist_gspawn_win64_helper_SOURCES = gspawn-win64-helper.c
nodist_gspawn_win64_helper_console_SOURCES = gspawn-win64-helper-console.c
gspawn_win64_helper_LDADD = libglib-2.0.la
gspawn_win64_helper_LDFLAGS = -mwindows
gspawn_win64_helper_console_LDADD = libglib-2.0.la
else
bin_PROGRAMS += gspawn-win32-helper gspawn-win32-helper-console
nodist_gspawn_win32_helper_console_SOURCES = gspawn-win32-helper-console.c
gspawn_win32_helper_LDADD = libglib-2.0.la
gspawn_win32_helper_LDFLAGS = -mwindows
gspawn_win32_helper_console_LDADD = libglib-2.0.la

View File

@ -40,7 +40,8 @@ AM_TESTS_ENVIRONMENT = \
MALLOC_CHECK_=2 \
MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
accumulator_SOURCES = accumulator.c testmarshal.c testmarshal.h
accumulator_SOURCES = accumulator.c
nodist_accumulator_SOURCES = testmarshal.c testmarshal.h
signals_SOURCES = signals.c
defaultiface_SOURCES = defaultiface.c testmodule.c testmodule.h
dynamictype_SOURCES = dynamictype.c testmodule.c testmodule.h
@ -68,18 +69,6 @@ testmarshal.c: testmarshal.h testmarshal.list $(glib_genmarshal)
&& rm -f xgen-gmc xgen-gmc~
BUILT_SOURCES += testmarshal.h testmarshal.c
CLEANFILES += stamp-testmarshal.h
CLEANFILES += stamp-testmarshal.h testmarshal.h testmarshal.c
EXTRA_DIST += testcommon.h testmarshal.list
BUILT_EXTRA_DIST += testmarshal.h testmarshal.c
endif # !CROSS_COMPILING
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 $(BUILT_EXTRA_DIST); \
fi
endif # !CROSS_COMPILING