summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--README7
-rw-r--r--mg_setup.c6
3 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index c3e27f5..849840d 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,8 @@ LIBDIR ?= ../../lib
TMPDIR ?= /tmp
BINDIR ?= /usr/local/bin
+MUSICDIR ?= /mnt/music
+
### Allow user defined options to overwrite defaults:
-include $(VDRDIR)/Make.config
@@ -78,6 +80,7 @@ INCLUDES += -I$(VDRDIR) -I$(VDRDIR)/include -I$(DVBDIR)/include \
$(shell taglib-config --cflags)
DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+DEFINES += -DMUSICDIR='"$(MUSICDIR)"'
### The object files (add further files here):
diff --git a/README b/README
index 2a36d6e..906f96e 100644
--- a/README
+++ b/README
@@ -114,9 +114,10 @@ about a missing -lwrap.
First let's define what the top level directory (short TLD) is. Muggle
expects all music files to be in the same directory (and its
subdirectories). Symbolic links will be followed. You specify the TLD
-with the argument -t. The default is /mnt/music. It is recommended to
-store only music files in the TLD. You can organize files in orders
-per genre, album or whatever.
+with the argument -t. The default is /mnt/music; you can change the
+default at build time using the MUSICDIR Makefile variable. It is
+recommended to store only music files in the TLD. You can organize
+files in orders per genre, album or whatever.
It is essential that you always use the same TLD when using the muggle
plugin or the external program mugglei, otherwise muggle will not find
diff --git a/mg_setup.c b/mg_setup.c
index 07e0f3c..5b8d4d7 100644
--- a/mg_setup.c
+++ b/mg_setup.c
@@ -45,7 +45,7 @@ mgSetup::mgSetup ()
DbUser = 0;
DbPass = 0;
asprintf(&DbDatadir,"%s/.muggle",getenv("HOME"));
- ToplevelDir = strdup("/mnt/music/");
+ ToplevelDir = strdup(MUSICDIR "/");
CreateMode = false;
DeleteStaleReferences = false;
@@ -228,8 +228,8 @@ mgSetup::HelpText()
static char buf[2000];
strcpy(buf,
" -n NNNN, --name=NNNN specify database name (default is GiantDisc)\n"
- " -t TTTT, --toplevel=TTTT specify toplevel directory for music (default is /mnt/music)\n"
- " -d DIRN, --datadir=DIRN specify directory for embedded sql data (default is $HOME/.muggle)\n"
+ " -t TTTT, --toplevel=TTTT specify toplevel directory for music (default is " MUSICDIR ")\n"
+ " -d DIRN, --datadir=DIRN specify directory for embedded sql data (default is \"$HOME/.muggle\")\n"
" -v, --verbose specify debug level. The higher the more. Default is 1\n");
if (IsMugglei())
strcat(buf,