summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-03-12 12:04:10 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-03-12 12:04:10 -0700
commit995be66f0f0d26d1a96cbb8dfb429c3941157771 (patch)
treebdfcd011288f3ee5ca2ae228c5830f8d11b9f41f /Makefile.in
parentf7040f5b1615162845c84f41125f008a5eb604f3 (diff)
downloademacs-995be66f0f0d26d1a96cbb8dfb429c3941157771.tar.gz
Install update-game-score only on request
Most distributions do not install update-game-score properly due to setuid/setgid complications, so install it only when the installer specifies a user or group (Bug#25895). * .gitattributes: Remove lib-src/update-game-score.exe.manifest. * Makefile.in (gameuser, gamegroup, use_gamedir, PATH_GAME): New vars. (epaths-force): Use PATH_GAME. (uninstall): Remove snake-scores and tetris-scores only if shared. * configure.ac: Default --with-gameuser to 'no'. (UPDATE_MANIFEST): Remove. * etc/NEWS: Mention this. * lib-src/Makefile.in (UPDATE_MANIFEST): Remove. (use_gamedir): New macro. (UTILITIES): Remove update-game-score unless use_gamedir. (SCRIPTS): Remove $(UPDATE_MANIFEST). ($(DESTDIR)${archlibdir}): Install game directory program and data only if use_gamedir. * lib-src/update-game-score.exe.manifest: Remove, as update-game-score is no longer installed on MS-Windows. * lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score): Use auxiliary program only if setuid or setgid. * make-dist: Do not distribute update-game-score.exe.manifest. * src/callproc.c (init_callproc): Set Vshared_game_score_directory based on PATH_GAME, not DOS_NT. (syms_of_callproc): Remove unnecessary initialization of Vshared_game_score_directory.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index 82fb91fd9cd..18251b41043 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -266,8 +266,15 @@ archlibdir=@archlibdir@
# Where to put the etc/DOC file.
etcdocdir=@etcdocdir@
-# Where to install Emacs game score files.
+# User or group of the auxiliary program update-game-score, which is
+# installed on platforms with a game directory shared by multiple users.
+# On other platforms Emacs can update the score files itself.
+gameuser=@gameuser@
+gamegroup=@gamegroup@
+# Where to install game score files, if gameuser or gamegroup is nonempty.
gamedir=@gamedir@
+# Nonempty if and only if a shared gamedir is used.
+use_gamedir=$(gameuser)$(gamegroup)
# ==================== Utility Programs for the Build ====================
@@ -334,6 +341,9 @@ etc-emacsver:
${srcdir}/build-aux/move-if-change emacsver.tex.$$$$ \
${srcdir}/etc/refcards/emacsver.tex
+# The shared gamedir name as a C string literal, or a null ptr if not in use.
+PATH_GAME = $(if $(use_gamedir),"$(gamedir)",((char const *) 0))
+
# Generate epaths.h from epaths.in. This target is invoked by 'configure'.
# See comments in configure.ac for why it is done this way, as opposed
# to just letting configure generate epaths.h from epaths.in in a
@@ -359,7 +369,7 @@ epaths-force:
-e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \
-e 's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";' \
-e 's;\(#.*PATH_X_DEFAULTS\).*$$;\1 "${x_default_search_path}";' \
- -e 's;\(#.*PATH_GAME\).*$$;\1 "${gamedir}";' \
+ -e 's;\(#.*PATH_GAME\).*$$;\1 $(PATH_GAME);' \
-e 's;\(#.*PATH_DOC\).*$$;\1 "${etcdocdir}";') && \
${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h
@@ -811,10 +821,12 @@ uninstall: uninstall-$(NTDIR) uninstall-doc
-rm -f "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop"
-rm -f "$(DESTDIR)${appdatadir}/${EMACS_NAME}.appdata.xml"
-rm -f "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service"
+ ifneq (,$(use_gamedir))
for file in snake-scores tetris-scores; do \
file="$(DESTDIR)${gamedir}/$${file}"; \
[ -s "$${file}" ] || rm -f "$$file"; \
done
+ endif
### Windows-specific uninstall target for removing programs produced
### in nt/, and its Posix do-nothing shadow.