summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makefile
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-11-09 12:05:45 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-11-09 13:38:40 +0100
commitc72ae7644364ee7bdbd00767e0e4fcf39b5e3689 (patch)
treef1fac8767be67afa8ecde21530bb72168494b89d /crawl-ref/source/makefile
parentf3cad8dced4002bcb0713d39fe684e15de42988a (diff)
downloadcrawl-ref-c72ae7644364ee7bdbd00767e0e4fcf39b5e3689.tar.gz
crawl-ref-c72ae7644364ee7bdbd00767e0e4fcf39b5e3689.zip
Don't set a $prefix by default. Set DATADIR/SAVEDIR if $prefix is /usr or /usr/local
Diffstat (limited to 'crawl-ref/source/makefile')
-rw-r--r--crawl-ref/source/makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index 4f1ac459f1..945a4e1f6b 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -198,9 +198,14 @@ MCHMOD_SAVEDIR := 775
INSTALL_UGRP := games:games
chroot_prefix :=
-prefix := /usr/games/crawl
+prefix :=
+
+ifeq ($(patsubst %/local,%,$(patsubst %/,%,$(prefix))),/usr)
+FHS := yes
+endif
+
ifeq (,$(bin_prefix))
-ifneq ($(patsubst %/local,%,$(patsubst %/,%,$(prefix))),/usr)
+ifeq (,$(FHS))
bin_prefix := bin
else
bin_prefix := games
@@ -210,9 +215,15 @@ endif
# If you're installing Crawl for multiple users, you *must* set this to a
# valid path before building Crawl. This is not necessary if you are building
# Crawl for a single user.
+# If you're installing to /usr or /usr/local, we have sane defaults.
# SAVEDIR := saves/
# DATADIR := data/
+ifneq (,$(FHS))
+DATADIR := share/crawl
+SAVEDIR := /var/games/crawl
+endif
+
INCLUDES_L += -Icontrib/install/include
LIBS += -Lcontrib/install/lib