use docdir from configure in setting __fish_help_dir

Closes #1065
This commit is contained in:
David Adam 2013-10-29 00:01:21 +08:00
parent edc4614e63
commit 9a36435016
2 changed files with 4 additions and 3 deletions

View File

@ -61,7 +61,7 @@ optbindirs = @optbindirs@
# Various flags
#
MACROS = -DLOCALEDIR=\"$(localedir)\" -DPREFIX=L\"$(prefix)\" -DDATADIR=L\"$(datadir)\" -DSYSCONFDIR=L\"$(sysconfdir)\" -DBINDIR=L\"$(bindir)\"
MACROS = -DLOCALEDIR=\"$(localedir)\" -DPREFIX=L\"$(prefix)\" -DDATADIR=L\"$(datadir)\" -DSYSCONFDIR=L\"$(sysconfdir)\" -DBINDIR=L\"$(bindir)\" -DDOCDIR=L\"$(docdir)\"
CXXFLAGS = @CXXFLAGS@ $(MACROS) $(EXTRA_CXXFLAGS)
LDFLAGS = @LIBS@ @LDFLAGS@
LDFLAGS_FISH = ${LDFLAGS} @LIBS_FISH@ @LDFLAGS_FISH@

View File

@ -189,7 +189,8 @@ static struct config_paths_t determine_config_directory_paths(const char *argv0)
paths.bin = base_path + L"/bin";
struct stat buf;
if (0 == wstat(paths.data, &buf) && 0 == wstat(paths.sysconf, &buf))
if (0 == wstat(paths.data, &buf) && 0 == wstat(paths.sysconf, &buf) &&
0 == wstat(paths.doc, &buf))
{
done = true;
}
@ -202,7 +203,7 @@ static struct config_paths_t determine_config_directory_paths(const char *argv0)
/* Fall back to what got compiled in. */
paths.data = L"" DATADIR "/fish";
paths.sysconf = L"" SYSCONFDIR "/fish";
paths.doc = L"" DATADIR "/doc/fish";
paths.doc = L"" DOCDIR;
paths.bin = L"" BINDIR;
done = true;