summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gratz <Stromeko@Stromeko.DE>2012-01-31 20:44:37 +0100
committerAchim Gratz <Stromeko@Stromeko.DE>2012-04-20 21:04:12 +0200
commit353a0c519bae0fce277de48adc8cf582d986b7e0 (patch)
tree4577304b8757f8f85932796309062a4f0e23be54
parent41624c1809d015a4d41601917ce09234dd8f567b (diff)
downloadorg-mode-353a0c519bae0fce277de48adc8cf582d986b7e0.tar.gz
introduce $(SUDO) to make install with administrative privileges customizable
defaults.mk: define SUDO to map to sudo, add comment to define blank if administrative privileges are not needed (already root on Linux or Administrator on Windows) targets.mk: use newly defined $(SUDO) uinstead of plain sudo, replaces some braces with parentheses
-rw-r--r--default.mk4
-rw-r--r--targets.mk4
2 files changed, 6 insertions, 2 deletions
diff --git a/default.mk b/default.mk
index b3c3f6c..0835938 100644
--- a/default.mk
+++ b/default.mk
@@ -76,6 +76,10 @@ SED = sed
# CP = cp -p # try this if there is no install
CP = install -p
+# How to obtain administrative privileges
+# SUDO = # leave blank if you don't need this
+SUDO = sudo
+
# Name of the program to install info files
# INSTALL_INFO = ginstall-info # Debian: avoid harmless warning message
INSTALL_INFO = install-info
diff --git a/targets.mk b/targets.mk
index 8b0d9da..d33e98c 100644
--- a/targets.mk
+++ b/targets.mk
@@ -44,12 +44,12 @@ test-dirty::
$(BTEST)
up2: update
- sudo ${MAKE} install
+ $(SUDO) $(MAKE) install
update:
git remote update
git pull
- ${MAKE} all
+ $(MAKE) all
install: $(INSTSUB)