aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorUlrich Müller2025-03-13 21:06:01 +0100
committerUlrich Müller2025-03-14 08:01:47 +0100
commit5dc0981875b64f2ffe38e59871cc34db05ab5f18 (patch)
tree54f6f29322fb11dd2acf367125e6c200edec3864 /Makefile.in
parentf2f1fb7fe00d6d69fc081f423c1f9dff0f618e36 (diff)
downloademacs-5dc0981875b64f2ffe38e59871cc34db05ab5f18.tar.gz
emacs-5dc0981875b64f2ffe38e59871cc34db05ab5f18.zip
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.in22
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@
160# a subdirectory of this. 160# a subdirectory of this.
161libexecdir=@libexecdir@ 161libexecdir=@libexecdir@
162 162
163# Currently only used for the systemd service file. 163# Where to install object code libraries. Used for ELN_DESTDIR.
164libdir=@libdir@ 164libdir=@libdir@
165 165
166# Where to install emacs-module.h. 166# Where to install emacs-module.h.
@@ -207,15 +207,7 @@ desktopdir=$(datarootdir)/applications
207metainfodir=$(datarootdir)/metainfo 207metainfodir=$(datarootdir)/metainfo
208 208
209# Where the etc/emacs.service file is to be installed. 209# Where the etc/emacs.service file is to be installed.
210# The system value (typically /usr/lib/systemd/user) can be 210systemduserunitdir=@systemduserunitdir@
211# obtained with: pkg-config --variable=systemduserunitdir systemd
212# but that does not respect configure's prefix.
213# It is not clear where we should install this file when
214# prefix != /usr (or /usr/local?) (eg for non-root installs).
215# Other options include ~/.config/systemd/user/,
216# $XDG_RUNTIME_DIR/systemd/user/
217# It seems the user may end up having to make a manual link...
218systemdunitdir=$(libdir)/systemd/user
219 211
220# Where the etc/images/icons/hicolor directory is to be installed. 212# Where the etc/images/icons/hicolor directory is to be installed.
221icondir=$(datarootdir)/icons 213icondir=$(datarootdir)/icons
@@ -886,14 +878,16 @@ install-etc:
886 ${srcdir}/etc/emacs.metainfo.xml > $${tmp}; \ 878 ${srcdir}/etc/emacs.metainfo.xml > $${tmp}; \
887 ${INSTALL_DATA} $${tmp} "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml"; \ 879 ${INSTALL_DATA} $${tmp} "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml"; \
888 rm -f $${tmp} 880 rm -f $${tmp}
889 umask 022; $(MKDIR_P) "$(DESTDIR)$(systemdunitdir)" 881 ifneq ($(systemduserunitdir),)
882 umask 022; $(MKDIR_P) "$(DESTDIR)$(systemduserunitdir)"
890 tmp=etc/emacs.tmpservice; rm -f $${tmp}; \ 883 tmp=etc/emacs.tmpservice; rm -f $${tmp}; \
891 sed -e '/^##/d' \ 884 sed -e '/^##/d' \
892 -e "/^Documentation/ s/emacs(1)/${EMACS_NAME}(1)/" \ 885 -e "/^Documentation/ s/emacs(1)/${EMACS_NAME}(1)/" \
893 -e "/^ExecStart/ s|emacs|${bindir}/${EMACS}|" \ 886 -e "/^ExecStart/ s|emacs|${bindir}/${EMACS}|" \
894 ${srcdir}/etc/emacs.service > $${tmp}; \ 887 ${srcdir}/etc/emacs.service > $${tmp}; \
895 $(INSTALL_DATA) $${tmp} "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service"; \ 888 $(INSTALL_DATA) $${tmp} "$(DESTDIR)$(systemduserunitdir)/${EMACS_NAME}.service"; \
896 rm -f $${tmp} 889 rm -f $${tmp}
890 endif
897 thisdir=`pwd -P`; \ 891 thisdir=`pwd -P`; \
898 cd ${iconsrcdir} || exit 1; umask 022 ; \ 892 cd ${iconsrcdir} || exit 1; umask 022 ; \
899 for dir in */*/apps */*/mimetypes; do \ 893 for dir in */*/apps */*/mimetypes; do \
@@ -977,7 +971,9 @@ uninstall: uninstall-$(NTDIR) uninstall-doc uninstall-gsettings-schemas
977 fi) 971 fi)
978 -rm -f "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop" 972 -rm -f "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop"
979 -rm -f "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml" 973 -rm -f "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml"
980 -rm -f "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service" 974 ifneq ($(systemduserunitdir),)
975 -rm -f "$(DESTDIR)$(systemduserunitdir)/${EMACS_NAME}.service"
976 endif
981 ifneq (,$(use_gamedir)) 977 ifneq (,$(use_gamedir))
982 for file in snake-scores tetris-scores; do \ 978 for file in snake-scores tetris-scores; do \
983 file="$(DESTDIR)${gamedir}/$${file}"; \ 979 file="$(DESTDIR)${gamedir}/$${file}"; \