tUpdate of Makefiles to allow installations by non-root users - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 6255a5767989271fbcc772ad77693ea4ce92c098
(DIR) parent 77793d23c7969d527638643e42d26cee68c896fe
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Wed, 17 Oct 2001 16:15:23 +0000
Update of Makefiles to allow installations by non-root users
Diffstat:
M Makefile.am | 6 +++---
M Makefile.in | 6 +++---
M doc/Makefile.am | 4 ++--
M doc/Makefile.in | 4 ++--
M src/Makefile.am | 7 ++++---
M src/Makefile.in | 7 ++++---
6 files changed, 18 insertions(+), 16 deletions(-)
---
(DIR) diff --git a/Makefile.am b/Makefile.am
t@@ -8,8 +8,8 @@ SCORE = ${SCOREDIR}/dopewars.sco
install-data-local:
${mkinstalldirs} ${SCOREDIR}
touch ${SCORE}
- chown root:games ${SCORE} || \
- chown root:wheel ${SCORE}
+ @chgrp games ${SCORE} || chgrp wheel ${SCORE} || \
+ echo "Unable to change group ownership of the high score file"
chmod 0660 ${SCORE}
${mkinstalldirs} ${DESKTOPDIR}
- ${INSTALL} -o root -g 0 -m 0644 ${DESKTOP} ${DESKTOPDIR}
+ ${INSTALL} -m 0644 ${DESKTOP} ${DESKTOPDIR}
(DIR) diff --git a/Makefile.in b/Makefile.in
t@@ -385,11 +385,11 @@ mostlyclean distclean maintainer-clean
install-data-local:
${mkinstalldirs} ${SCOREDIR}
touch ${SCORE}
- chown root:games ${SCORE} || \
- chown root:wheel ${SCORE}
+ @chgrp games ${SCORE} || chgrp wheel ${SCORE} || \
+ echo "Unable to change group ownership of the high score file"
chmod 0660 ${SCORE}
${mkinstalldirs} ${DESKTOPDIR}
- ${INSTALL} -o root -g 0 -m 0644 ${DESKTOP} ${DESKTOPDIR}
+ ${INSTALL} -m 0644 ${DESKTOP} ${DESKTOPDIR}
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
(DIR) diff --git a/doc/Makefile.am b/doc/Makefile.am
t@@ -7,6 +7,6 @@ man_MANS = dopewars.6
EXTRA_DIST = ${man_MANS}
install-data-local:
- ${INSTALL} -d -o root -g 0 -m 0755 ${DOCPATH}
- ${INSTALL} -o root -g 0 -m 0644 ${DOCS} ${DOCPATH}
+ ${INSTALL} -d -m 0755 ${DOCPATH}
+ ${INSTALL} -m 0644 ${DOCS} ${DOCPATH}
(DIR) diff --git a/doc/Makefile.in b/doc/Makefile.in
t@@ -248,8 +248,8 @@ mostlyclean distclean maintainer-clean
install-data-local:
- ${INSTALL} -d -o root -g 0 -m 0755 ${DOCPATH}
- ${INSTALL} -o root -g 0 -m 0644 ${DOCS} ${DOCPATH}
+ ${INSTALL} -d -m 0755 ${DOCPATH}
+ ${INSTALL} -m 0644 ${DOCS} ${DOCPATH}
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
(DIR) diff --git a/src/Makefile.am b/src/Makefile.am
t@@ -12,13 +12,14 @@ DOPEDIR = ${DESTDIR}${bindir}
DOPEBIN = ${DOPEDIR}/dopewars
install-exec-hook:
- chown root:games ${DOPEBIN} || \
- chown root:wheel ${DOPEBIN}
+ @chgrp games ${DOPEBIN} || chgrp wheel ${DOPEBIN} || \
+ ( echo "WARNING: Cannot change group of dopewars binary - the high"; \
+ echo "score file may be unreadable or unwriteable by some users" )
chmod 2755 ${DOPEBIN}
install-data-local:
${mkinstalldirs} ${PIXDIR}
- ${INSTALL} -o root -g 0 -m 0644 ${PIXMAPS} ${PIXDIR}
+ ${INSTALL} -m 0644 ${PIXMAPS} ${PIXDIR}
%.res: %.rc
windres -O coff -o $@ $<
(DIR) diff --git a/src/Makefile.in b/src/Makefile.in
t@@ -347,13 +347,14 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-exec-hook:
- chown root:games ${DOPEBIN} || \
- chown root:wheel ${DOPEBIN}
+ @chgrp games ${DOPEBIN} || chgrp wheel ${DOPEBIN} || \
+ ( echo "WARNING: Cannot change group of dopewars binary - the high"; \
+ echo "score file may be unreadable or unwriteable by some users" )
chmod 2755 ${DOPEBIN}
install-data-local:
${mkinstalldirs} ${PIXDIR}
- ${INSTALL} -o root -g 0 -m 0644 ${PIXMAPS} ${PIXDIR}
+ ${INSTALL} -m 0644 ${PIXMAPS} ${PIXDIR}
%.res: %.rc
windres -O coff -o $@ $<