diff options
author | Alexander Larsson <alexl@redhat.com> | 2015-07-09 18:16:44 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2015-07-10 12:15:45 +0200 |
commit | 302f88e69da195ee44d5809a7355320f0072b47e (patch) | |
tree | 30c666f3ec5e1738e3f30fa34d75622b5a8207a8 /Makefile.am | |
parent | ef223b6a46b2426e0cafa4f58e6346f63856e873 (diff) | |
download | xdg-app-302f88e69da195ee44d5809a7355320f0072b47e.tar.gz |
Restructure directories and build
This moves a all source code into separate subdirs per binary. The
helper and the generic stuff goes into lib/ which is then used by all
the others. For now this is a completely internal library, but at
some point we will probably clean it up and expose some subset.
Also, we move the dbus proxy to libexecdir.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 142 |
1 files changed, 20 insertions, 122 deletions
diff --git a/Makefile.am b/Makefile.am index 97ae116..0c235a7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,9 @@ NULL = +bin_PROGRAMS = $(NULL) +libexec_PROGRAMS = $(NULL) +DISTCLEANFILES= $(NULL) + if BUILD_DOCUMENTATION SUBDIRS = doc endif @@ -11,6 +15,10 @@ AM_CPPFLAGS = \ -DXDG_APP_TRIGGERDIR=\"$(pkgdatadir)/triggers\" \ -DSYSTEM_FONTS_DIR=\"$(SYSTEM_FONTS_DIR)\" \ -DHELPER=\"$(bindir)/xdg-app-helper\" \ + -DDBUSPROXY=\"$(libexecdir)/xdg-dbus-proxy\" \ + -I$(srcdir)/libglnx \ + -I$(srcdir)/lib \ + -I$(builddir)/lib \ $(NULL) triggersdir = $(pkgdatadir)/triggers @@ -20,130 +28,18 @@ dist_triggers_SCRIPTS = \ triggers/desktop-database.trigger \ $(NULL) -bin_PROGRAMS = \ - xdg-app-helper \ - xdg-dbus-proxy \ - xdg-app \ - $(NULL) - -libexec_PROGRAMS = \ - xdg-app-session-helper \ - $(NULL) - -EXTRA_DIST = xdg-app.gresource.xml xdg-app-dbus-interfaces.xml org.freedesktop.systemd1.xml +EXTRA_DIST = data/xdg-app-dbus-interfaces.xml data/org.freedesktop.systemd1.xml +noinst_LTLIBRARIES = libglnx.la libglnx_srcpath := $(srcdir)/libglnx libglnx_cflags := $(BASE_CFLAGS) "-I$(libglnx_srcpath)" libglnx_libs := $(BASE_LIBS) include libglnx/Makefile-libglnx.am.inc -noinst_LTLIBRARIES = libglnx.la - -xdg_app_helper_SOURCES = xdg-app-helper.c -xdg_app_helper_LDADD = $(LIBSECCOMP_LIBS) -xdg_app_helper_CFLAGS = $(LIBSECCOMP_CFLAGS) - -dbus_built_sources = xdg-app-dbus.c xdg-app-dbus.h -systemd_dbus_built_sources = xdg-app-systemd-dbus.c xdg-app-systemd-dbus.h -BUILT_SOURCES = $(dbus_built_sources) $(systemd_dbus_built_sources) - -$(dbus_built_sources) : Makefile.am xdg-app-dbus-interfaces.xml - $(AM_V_GEN) $(GDBUS_CODEGEN) \ - --interface-prefix org.freedesktop.XdgApp. \ - --c-namespace XdgApp \ - --generate-c-code xdg-app-dbus \ - $(srcdir)/xdg-app-dbus-interfaces.xml \ - $(NULL) - -$(systemd_dbus_built_sources) : Makefile.am org.freedesktop.systemd1.xml - $(AM_V_GEN) $(GDBUS_CODEGEN) \ - --interface-prefix org.freedesktop.systemd1. \ - --c-namespace Systemd \ - --generate-c-code xdg-app-systemd-dbus \ - $(srcdir)/org.freedesktop.systemd1.xml \ - $(NULL) - -resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/xdg-app.gresource.xml) - -xdg-app-resources.h: xdg-app.gresource.xml - $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \ - --target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-header - -xdg-app-resources.c: xdg-app.gresource.xml $(resource_files) - $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \ - --target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-source - -# D-BUS service file -%.service: %.service.in config.log - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ - -servicedir = $(DBUS_SERVICE_DIR) -service_in_files = xdg-app-session.service.in -service_DATA = xdg-app-session.service - -EXTRA_DIST += $(service_in_files) - -xdg_app_session_helper_SOURCES = \ - xdg-app-session-helper.c \ - $(dbus_built_sources) \ - xdg-app-resources.h \ - xdg-app-resources.c \ - $(NULL) - -xdg_app_session_helper_LDADD = $(BASE_LIBS) -xdg_app_session_helper_CFLAGS = $(BASE_CFLAGS) - -xdg_app_SOURCES = \ - xdg-app-main.c \ - xdg-app-builtins.h \ - xdg-app-builtins-add-remote.c \ - xdg-app-builtins-delete-remote.c \ - xdg-app-builtins-list-remotes.c \ - xdg-app-builtins-repo-contents.c \ - xdg-app-builtins-install.c \ - xdg-app-builtins-make-current.c \ - xdg-app-builtins-update.c \ - xdg-app-builtins-uninstall.c \ - xdg-app-builtins-list.c \ - xdg-app-builtins-run.c \ - xdg-app-builtins-build-init.c \ - xdg-app-builtins-build.c \ - xdg-app-builtins-build-finish.c \ - xdg-app-builtins-build-export.c \ - xdg-app-builtins-repo-update.c \ - xdg-app-dir.c \ - xdg-app-dir.h \ - xdg-app-run.c \ - xdg-app-run.h \ - xdg-app-utils.h \ - xdg-app-utils.c \ - $(systemd_dbus_built_sources) \ - $(dbus_built_sources) \ - $(NULL) - -xdg_app_LDADD = $(BASE_LIBS) $(OSTREE_LIBS) $(SOUP_LIBS) libglnx.la -xdg_app_CFLAGS = $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(SOUP_CFLAGS) -I$(srcdir)/libglnx - -xdg_dbus_proxy_SOURCES = \ - xdg-app-proxy.c \ - xdg-app-proxy.h \ - dbus-proxy.c \ - $(NULL) - -xdg_dbus_proxy_LDADD = $(BASE_LIBS) libglnx.la -xdg_dbus_proxy_CFLAGS = $(BASE_CFLAGS) -I$(srcdir)/libglnx - -install-exec-hook: -if DISABLE_USERNS -if PRIV_MODE_SETUID - $(SUDO_BIN) chown root $(DESTDIR)$(bindir)/xdg-app-helper - $(SUDO_BIN) chmod u+s $(DESTDIR)$(bindir)/xdg-app-helper -else -if PRIV_MODE_FILECAPS - $(SUDO_BIN) setcap cap_sys_admin+ep $(DESTDIR)$(bindir)/xdg-app-helper -endif -endif -endif +include lib/Makefile.am.inc +include app/Makefile.am.inc +include session-helper/Makefile.am.inc +include dbus-proxy/Makefile.am.inc completiondir = $(datadir)/bash-completion/completions completion_DATA = completion/xdg-app @@ -152,15 +48,17 @@ EXTRA_DIST += $(completion_DATA) profiledir = $(sysconfdir)/profile.d profile_DATA = xdg-app.sh EXTRA_DIST += profile/xdg-app.sh.in - -envdir = $(datadir)/gdm/env.d -env_DATA = xdg-app.env -EXTRA_DIST += env.d/xdg-app.env.in +DISTCLEANFILES += xdg-app.sh xdg-app.sh: profile/xdg-app.sh.in $(AM_V_GEN) $(SED) -e "s|\@localstatedir\@|$(localstatedir)|" \ -e "s|\@sysconfdir\@|$(sysconfdir)|" $< > $@ +envdir = $(datadir)/gdm/env.d +env_DATA = xdg-app.env +EXTRA_DIST += env.d/xdg-app.env.in +DISTCLEANFILES += xdg-app.env + xdg-app.env: env.d/xdg-app.env.in $(AM_V_GEN) $(SED) -e "s|\@localstatedir\@|$(localstatedir)|" \ -e "s|\@sysconfdir\@|$(sysconfdir)|" $< > $@ |