From: Georg Baum Date: Fri, 6 Apr 2007 09:39:05 +0000 (+0000) Subject: remove duplicate top_srcdir() X-Git-Tag: 1.6.10~10325 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e10d42a4f5c169832013c237696c7891cd39743c;p=features.git remove duplicate top_srcdir() git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17741 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/support/package.C.in b/src/support/package.C.in index efe19c6272..bdeb4a141e 100644 --- a/src/support/package.C.in +++ b/src/support/package.C.in @@ -169,15 +169,8 @@ Package::Package(string const & command_line_arg0, namespace { -// These next three functions contain the stuff that is substituted at +// These next functions contain the stuff that is substituted at // configuration-time. -string const top_srcdir() -{ - static string const dir("@TOP_SRCDIR@"); - return dir; -} - - string const hardcoded_localedir() { return string("@LOCALEDIR@"); @@ -201,7 +194,7 @@ string const & with_version_suffix() } // namespace anon -string const & Package::top_srcdir() const +string const & Package::top_srcdir() { static string const dir("@TOP_SRCDIR@"); return dir; @@ -270,7 +263,7 @@ get_build_dirs(string const & abs_binary, if (!fileSearch(build_support_dir, "Makefile").empty()) { // Try and find "chkconfig.ltx". string const system_support_dir = - addPath(top_srcdir(), "lib"); + addPath(Package::top_srcdir(), "lib"); if (!fileSearch(system_support_dir, "chkconfig.ltx").empty()) { lyxerr[Debug::INIT] << check_text << " yes" diff --git a/src/support/package.h b/src/support/package.h index c84a0f8bcb..3e801dfd45 100644 --- a/src/support/package.h +++ b/src/support/package.h @@ -73,7 +73,7 @@ public: /** The top of the LyX source code tree. */ - std::string const & top_srcdir() const; + static std::string const & top_srcdir(); /** The path to the system-level support files * we're actually going to use.