mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-31 15:46:16 +00:00
I'm speeding up...
build_lyxdir is now a function, not a global variable. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7395 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8700a256d3
commit
d75728c527
@ -65,7 +65,6 @@ extern void QuitLyX();
|
||||
extern LyXServer * lyxserver;
|
||||
|
||||
extern string system_lyxdir;
|
||||
extern string build_lyxdir;
|
||||
extern string user_lyxdir;
|
||||
|
||||
DebugStream lyxerr;
|
||||
|
@ -1,6 +1,13 @@
|
||||
2003-07-27 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* path_defines.{h,C.in}, : new files. Store/set the various lyx
|
||||
* path_defines.{h,C.in} (build_lyxdir): is now a function, not a
|
||||
global var.
|
||||
|
||||
* Makefile.am: set build_lyxdir at make time.
|
||||
|
||||
2003-07-27 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* path_defines.{h,C.in}: new files. Store/set the various lyx
|
||||
paths, lyx_dir, top_srcdir, localedir, system_lyxdir, build_lyxdir
|
||||
user_lyxdir.
|
||||
|
||||
|
@ -88,8 +88,10 @@ path_defines.C: build_path_defines
|
||||
build_path_defines: path_defines.C.in
|
||||
@rm -f tmp_path_defines ;\
|
||||
ABS_SRCDIR=`cd $(top_srcdir) && pwd` ;\
|
||||
ABS_BUILDDIR=`cd ../.. && pwd` ;\
|
||||
sed "s,%LYX_DIR%,$(pkgdatadir), ;\
|
||||
s,%LOCALEDIR%,$(datadir)/locale, ;\
|
||||
s,%BUILDDIR%,$${ABS_BUILDDIR}, ;\
|
||||
s,%TOP_SRCDIR%,$${ABS_SRCDIR}," \
|
||||
$(srcdir)/path_defines.C.in > tmp_path_defines ;\
|
||||
if cmp -s tmp_path_defines path_defines.C ; then \
|
||||
|
@ -30,7 +30,8 @@
|
||||
#include "filetools.h"
|
||||
#include "lstrings.h"
|
||||
#include "FileInfo.h"
|
||||
#include "support/path.h" // I know it's OS/2 specific (SMiyata)
|
||||
#include "path.h"
|
||||
#include "path_defines.h"
|
||||
#include "gettext.h"
|
||||
#include "lyxlib.h"
|
||||
#include "os.h"
|
||||
@ -80,7 +81,6 @@ using std::vector;
|
||||
using std::getline;
|
||||
|
||||
extern string system_lyxdir;
|
||||
extern string build_lyxdir;
|
||||
extern string user_lyxdir;
|
||||
|
||||
namespace lyx {
|
||||
@ -297,8 +297,8 @@ string const LibFileSearch(string const & dir, string const & name,
|
||||
if (!fullname.empty())
|
||||
return fullname;
|
||||
|
||||
if (!build_lyxdir.empty())
|
||||
fullname = FileSearch(AddPath(build_lyxdir, dir), name, ext);
|
||||
if (!build_lyxdir().empty())
|
||||
fullname = FileSearch(AddPath(build_lyxdir(), dir), name, ext);
|
||||
if (!fullname.empty())
|
||||
return fullname;
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
using std::endl;
|
||||
|
||||
|
||||
string build_lyxdir;
|
||||
string system_lyxdir;
|
||||
string user_lyxdir;
|
||||
|
||||
@ -35,7 +34,7 @@ string user_lyxdir;
|
||||
namespace {
|
||||
|
||||
/* The absolute path to the system-level lyx support files.
|
||||
* (Compile-time value.)
|
||||
* (Make-time value.)
|
||||
*/
|
||||
string const & lyx_dir()
|
||||
{
|
||||
@ -45,7 +44,7 @@ string const & lyx_dir()
|
||||
|
||||
|
||||
/* The absolute path to the top of the lyx build tree.
|
||||
* (Compile-time value.)
|
||||
* (Make-time value.)
|
||||
*/
|
||||
string const & lyx_top_srcdir()
|
||||
{
|
||||
@ -55,7 +54,7 @@ string const & lyx_top_srcdir()
|
||||
|
||||
|
||||
/* The absolute path to the system-level lyx locale directory.
|
||||
* (Compile-time value.)
|
||||
* (Make-time value.)
|
||||
*/
|
||||
string const & lyx_localedir()
|
||||
{
|
||||
@ -69,6 +68,13 @@ string const & lyx_localedir()
|
||||
namespace lyx {
|
||||
namespace support {
|
||||
|
||||
string const & build_lyxdir()
|
||||
{
|
||||
static string const bl = "%BUILDDIR%";
|
||||
return bl;
|
||||
}
|
||||
|
||||
|
||||
bool setLyxPaths()
|
||||
{
|
||||
//
|
||||
|
@ -17,6 +17,11 @@
|
||||
namespace lyx {
|
||||
namespace support {
|
||||
|
||||
/* The absolute path to the lyx build directory.
|
||||
* (Make-time value.)
|
||||
*/
|
||||
string const & build_lyxdir();
|
||||
|
||||
/** \returns true if the user lyx dir existed already and did not need
|
||||
* to be created afresh.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user