diff options
| author | Ulrich Müller <ulm@gentoo.org> | 2025-03-13 21:06:01 +0100 |
|---|---|---|
| committer | Ulrich Müller <ulm@gentoo.org> | 2025-03-14 08:01:47 +0100 |
| commit | 5dc0981875b64f2ffe38e59871cc34db05ab5f18 (patch) | |
| tree | 54f6f29322fb11dd2acf367125e6c200edec3864 /Makefile.in | |
| parent | f2f1fb7fe00d6d69fc081f423c1f9dff0f618e36 (diff) | |
New configure option --with-systemduserunitdir
* configure.ac (systemduserunitdir): New variable and option.
* Makefile.in (systemduserunitdir): New, set by configure.
(install-etc, uninstall): Don't install emacs.service when
systemduserunitdir is unspecified.
* etc/NEWS: Announce the new configure option. (Bug#76924)
Diffstat (limited to 'Makefile.in')
| -rw-r--r-- | Makefile.in | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Makefile.in b/Makefile.in index ca6d991bce6..0ba11c9aa5b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -160,7 +160,7 @@ sharedstatedir=@sharedstatedir@ # a subdirectory of this. libexecdir=@libexecdir@ -# Currently only used for the systemd service file. +# Where to install object code libraries. Used for ELN_DESTDIR. libdir=@libdir@ # Where to install emacs-module.h. @@ -207,15 +207,7 @@ desktopdir=$(datarootdir)/applications metainfodir=$(datarootdir)/metainfo # Where the etc/emacs.service file is to be installed. -# The system value (typically /usr/lib/systemd/user) can be -# obtained with: pkg-config --variable=systemduserunitdir systemd -# but that does not respect configure's prefix. -# It is not clear where we should install this file when -# prefix != /usr (or /usr/local?) (eg for non-root installs). -# Other options include ~/.config/systemd/user/, -# $XDG_RUNTIME_DIR/systemd/user/ -# It seems the user may end up having to make a manual link... -systemdunitdir=$(libdir)/systemd/user +systemduserunitdir=@systemduserunitdir@ # Where the etc/images/icons/hicolor directory is to be installed. icondir=$(datarootdir)/icons @@ -886,14 +878,16 @@ install-etc: ${srcdir}/etc/emacs.metainfo.xml > $${tmp}; \ ${INSTALL_DATA} $${tmp} "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml"; \ rm -f $${tmp} - umask 022; $(MKDIR_P) "$(DESTDIR)$(systemdunitdir)" + ifneq ($(systemduserunitdir),) + umask 022; $(MKDIR_P) "$(DESTDIR)$(systemduserunitdir)" tmp=etc/emacs.tmpservice; rm -f $${tmp}; \ sed -e '/^##/d' \ -e "/^Documentation/ s/emacs(1)/${EMACS_NAME}(1)/" \ -e "/^ExecStart/ s|emacs|${bindir}/${EMACS}|" \ ${srcdir}/etc/emacs.service > $${tmp}; \ - $(INSTALL_DATA) $${tmp} "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service"; \ + $(INSTALL_DATA) $${tmp} "$(DESTDIR)$(systemduserunitdir)/${EMACS_NAME}.service"; \ rm -f $${tmp} + endif thisdir=`pwd -P`; \ cd ${iconsrcdir} || exit 1; umask 022 ; \ for dir in */*/apps */*/mimetypes; do \ @@ -977,7 +971,9 @@ uninstall: uninstall-$(NTDIR) uninstall-doc uninstall-gsettings-schemas fi) -rm -f "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop" -rm -f "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml" - -rm -f "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service" + ifneq ($(systemduserunitdir),) + -rm -f "$(DESTDIR)$(systemduserunitdir)/${EMACS_NAME}.service" + endif ifneq (,$(use_gamedir)) for file in snake-scores tetris-scores; do \ file="$(DESTDIR)${gamedir}/$${file}"; \ |
