diff --git a/Makefile.am b/Makefile.am index 7bbfef70..cd3c8c8b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ NULL = bin_PROGRAMS = $(NULL) +dist_installed_test_scripts = $(NULL) noinst_PROGRAMS = $(NULL) noinst_LTLIBRARIES = $(NULL) libexec_PROGRAMS = $(NULL) @@ -81,7 +82,7 @@ include tests/Makefile.am.inc bwrap_PROGRAMS = flatpak-bwrap flatpak_bwrap_SOURCES = $(bwrap_SOURCES) flatpak_bwrap_CFLAGS = $(bwrap_CFLAGS) -flatpak_bwrap_LDFLAGS = $(bwrap_LDFLAGS) +flatpak_bwrap_LDADD = $(bwrap_LDADD) bwrapdir = $(libexecdir) include bubblewrap/Makefile-bwrap.am.inc diff --git a/autogen.sh b/autogen.sh index b38e34c6..6a100675 100755 --- a/autogen.sh +++ b/autogen.sh @@ -22,8 +22,8 @@ if ! test -f libglnx/README.md -a -f bubblewrap/README.md; then git submodule update --init fi # Workaround automake bug with subdir-objects and computed paths -sed -e 's,$(libglnx_srcpath),'${srcdir}/libglnx,g < libglnx/Makefile-libglnx.am >libglnx/Makefile-libglnx.am.inc -sed -e 's,$(bwrap_srcpath),'${srcdir}/bubblewrap,g < bubblewrap/Makefile-bwrap.am >bubblewrap/Makefile-bwrap.am.inc +sed -e 's,$(libglnx_srcpath),libglnx,g' < libglnx/Makefile-libglnx.am >libglnx/Makefile-libglnx.am.inc +sed -e 's,$(bwrap_srcpath),bubblewrap,g' < bubblewrap/Makefile-bwrap.am >bubblewrap/Makefile-bwrap.am.inc GTKDOCIZE=$(which gtkdocize 2>/dev/null) if test -z $GTKDOCIZE; then diff --git a/common/Makefile.am.inc b/common/Makefile.am.inc index 06d676d9..a3b5ddd5 100644 --- a/common/Makefile.am.inc +++ b/common/Makefile.am.inc @@ -2,7 +2,6 @@ noinst_LTLIBRARIES += libflatpak-common.la dbus_built_sources = common/flatpak-dbus.c common/flatpak-dbus.h systemd_dbus_built_sources = common/flatpak-systemd-dbus.c common/flatpak-systemd-dbus.h -BUILT_SOURCES += $(dbus_built_sources) $(systemd_dbus_built_sources) $(dbus_built_sources) : data/org.freedesktop.Flatpak.xml $(AM_V_GEN) $(GDBUS_CODEGEN) \ @@ -20,6 +19,14 @@ $(systemd_dbus_built_sources) : data/org.freedesktop.systemd1.xml $(srcdir)/data/org.freedesktop.systemd1.xml \ $(NULL) +nodist_libflatpak_common_la_SOURCES = \ + $(dbus_built_sources) \ + $(systemd_dbus_built_sources) \ + $(NULL) + +BUILT_SOURCES += $(nodist_libflatpak_common_la_SOURCES) +CLEANFILES += $(nodist_libflatpak_common_la_SOURCES) + libflatpak_common_la_SOURCES = \ common/flatpak-common-types.h \ common/flatpak-dir.c \ @@ -39,8 +46,6 @@ libflatpak_common_la_SOURCES = \ common/gvdb/gvdb-builder.c \ common/flatpak-db.c \ common/flatpak-db.h \ - $(dbus_built_sources) \ - $(systemd_dbus_built_sources) \ $(NULL) libflatpak_common_la_CFLAGS = \ diff --git a/document-portal/Makefile.am.inc b/document-portal/Makefile.am.inc index d4929685..64fbe5fc 100644 --- a/document-portal/Makefile.am.inc +++ b/document-portal/Makefile.am.inc @@ -19,11 +19,14 @@ systemduserunit_DATA += document-portal/xdg-document-portal.service service_in_files += document-portal/org.freedesktop.portal.Documents.service.in dbus_service_DATA += document-portal/org.freedesktop.portal.Documents.service +nodist_xdg_document_portal_SOURCES = \ + $(xdp_dbus_built_sources) \ + $(ps_dbus_built_sources) \ + $(NULL) + xdg_document_portal_SOURCES = \ document-portal/xdp-main.c \ document-portal/xdp-enums.h \ - $(xdp_dbus_built_sources) \ - $(ps_dbus_built_sources) \ document-portal/xdp-util.h \ document-portal/xdp-util.c \ document-portal/xdp-fuse.h \ diff --git a/lib/Makefile.am.inc b/lib/Makefile.am.inc index 4dc41fa4..f1d51278 100644 --- a/lib/Makefile.am.inc +++ b/lib/Makefile.am.inc @@ -1,7 +1,9 @@ lib_LTLIBRARIES += libflatpak.la noinst_PROGRAMS += test-libflatpak -public_headers = \ +flatpakincludedir = $(includedir)/flatpak + +flatpakinclude_HEADERS = \ lib/flatpak.h \ lib/flatpak-ref.h \ lib/flatpak-error.h \ @@ -13,37 +15,33 @@ public_headers = \ lib/flatpak-version-macros.h \ $(NULL) -generated_public_headers = \ +nodist_flatpakinclude_HEADERS = \ lib/flatpak-enum-types.h \ $(NULL) BUILT_SOURCES += \ - lib/flatpak-enum-types.c \ - lib/flatpak-enum-types.h \ + $(nodist_flatpakinclude_HEADERS) \ + $(nodist_libflatpak_la_SOURCES) \ $(NULL) DISTCLEANFILES += \ - lib/flatpak-enum-types.c \ - lib/flatpak-enum-types.h \ + $(nodist_flatpakinclude_HEADERS) \ + $(nodist_libflatpak_la_SOURCES) \ $(NULL) -lib/flatpak-enum-types.h: $(public_headers) lib/flatpak-enum-types.h.template +lib/flatpak-enum-types.h: $(flatpakinclude_HEADERS) lib/flatpak-enum-types.h.template $(AM_V_GEN) $(GLIB_MKENUMS) --template $(filter %.template,$^) $(filter-out %.template,$^) > \ lib/flatpak-enum-types.h.tmp && mv lib/flatpak-enum-types.h.tmp lib/flatpak-enum-types.h -lib/flatpak-enum-types.c: $(public_headers) lib/flatpak-enum-types.c.template +lib/flatpak-enum-types.c: $(flatpakinclude_HEADERS) lib/flatpak-enum-types.c.template $(AM_V_GEN) $(GLIB_MKENUMS) --template $(filter %.template,$^) $(filter-out %.template,$^) > \ lib/flatpak-enum-types.c.tmp && mv lib/flatpak-enum-types.c.tmp lib/flatpak-enum-types.c EXTRA_DIST += lib/flatpak-enum-types.c.template lib/flatpak-enum-types.h.template -flatpakincludedir = $(includedir)/flatpak -flatpakinclude_HEADERS = $(public_headers) $(generated_public_headers) - -sources = \ +libflatpak_la_SOURCES = \ lib/flatpak.c \ - lib/flatpak-enum-types.c \ lib/flatpak-ref.c \ lib/flatpak-installed-ref.c \ lib/flatpak-installed-ref-private.h \ @@ -56,10 +54,13 @@ sources = \ lib/flatpak-installation.c \ $(NULL) -libflatpak_la_SOURCES = \ - $(public_headers) \ - $(generated_public_headers) \ - $(sources) \ +nodist_libflatpak_la_SOURCES = \ + lib/flatpak-enum-types.c \ + $(NULL) + +sources = \ + $(libflatpak_la_SOURCES) \ + $(nodist_libflatpak_la_SOURCES) \ $(NULL) libflatpak_la_CFLAGS = \ @@ -109,7 +110,10 @@ INTROSPECTION_GIRS = if HAVE_INTROSPECTION Flatpak-1.0.gir: libflatpak.la Makefile -introspected_headers = $(public_headers) +introspected_headers = \ + $(flatpakinclude_HEADERS) \ + $(nodist_flatpakinclude_HEADERS) \ + $(NULL) introspected_sources = $(filter-out %-private.h,$(sources)) Flatpak_1_0_gir_NAMESPACE = Flatpak diff --git a/permission-store/Makefile.am.inc b/permission-store/Makefile.am.inc index ec06f642..441f2a9a 100644 --- a/permission-store/Makefile.am.inc +++ b/permission-store/Makefile.am.inc @@ -8,10 +8,11 @@ systemduserunit_DATA += permission-store/xdg-permission-store.service service_in_files += permission-store/org.freedesktop.impl.portal.PermissionStore.service.in dbus_service_DATA += permission-store/org.freedesktop.impl.portal.PermissionStore.service -ps_dbus_built_sources = permission-store/permission-store-dbus.c permission-store/permission-store-dbus.h -BUILT_SOURCES += $(ps_dbus_built_sources) +nodist_xdg_permission_store_SOURCES = permission-store/permission-store-dbus.c permission-store/permission-store-dbus.h +BUILT_SOURCES += $(nodist_xdg_permission_store_SOURCES) +CLEANFILES += $(nodist_xdg_permission_store_SOURCES) -$(ps_dbus_built_sources) : data/org.freedesktop.impl.portal.PermissionStore.xml +$(nodist_xdg_permission_store_SOURCES) : data/org.freedesktop.impl.portal.PermissionStore.xml $(AM_V_GEN) $(GDBUS_CODEGEN) \ --interface-prefix org.freedesktop.impl.portal. \ --c-namespace Xdg \ @@ -19,8 +20,10 @@ $(ps_dbus_built_sources) : data/org.freedesktop.impl.portal.PermissionStore.xml $(srcdir)/data/org.freedesktop.impl.portal.PermissionStore.xml \ $(NULL) +# also used by the document portal +ps_dbus_built_sources = $(nodist_xdg_permission_store_SOURCES) + xdg_permission_store_SOURCES = \ - $(ps_dbus_built_sources) \ permission-store/permission-store.c \ permission-store/xdg-permission-store.c \ permission-store/xdg-permission-store.h \ diff --git a/tests/Makefile.am.inc b/tests/Makefile.am.inc index 23a69458..1d4a1074 100644 --- a/tests/Makefile.am.inc +++ b/tests/Makefile.am.inc @@ -59,7 +59,7 @@ tests/package_version.txt: Makefile tests/test-basic.sh: tests/package_version.txt -installed_test_SCRIPTS += \ +dist_installed_test_scripts += \ buildutil/tap-driver.sh \ tests/test-configure \ tests/make-test-app.sh \ @@ -79,16 +79,17 @@ installed_test_keyringdir = $(installed_testdir)/test-keyring installed_test_dbsdir = $(installed_testdir)/dbs if ENABLE_INSTALLED_TESTS -installed_test_keyring_DATA = \ +dist_installed_test_keyring_DATA = \ + tests/test-keyring/README \ tests/test-keyring/pubring.gpg \ tests/test-keyring/secring.gpg \ $(NULL) -installed_test_dbs_DATA = tests/dbs/no_tables +dist_installed_test_dbs_DATA = tests/dbs/no_tables endif -EXTRA_DIST += $(installed_test_SCRIPTS) $(installed_test_data) $(installed_test_keyring_DATA) $(installed_test_dbs_DATA) +EXTRA_DIST += $(installed_test_data) -test_scripts = \ +dist_test_scripts = \ tests/test-basic.sh \ tests/test-run.sh \ tests/test-run-system.sh \