Thesaurus.C
SpellBase.C
''')
-
+
if env.has_key('USE_ASPELL') and env['USE_ASPELL']:
lyx_post_source.append('aspell.C')
elif env.has_key('USE_PSPELL') and env['USE_PSPELL']:
main_source = ['main.C']
else:
main_source = []
-
+
lyxbase_pre = env.StaticLibrary(
target = '$LOCALLIBPATH/lyxbase_pre',
source = globSource(dir = env.subst('$TOP_SRC_DIR/src'), pattern = env['LYX_EXT'],
Alias('lyx', env.Command(os.path.join('$BUILDDIR', target_name), lyx,
[Copy('$TARGET', '$SOURCE')]))
Alias('lyx', lyx)
-
+
if build_msvs_projects:
def build_project(target, dir, src_pattern = env['LYX_EXT'], include=[],
'$TOP_SRC_DIR/lib/lyx2lyx/lyx2lyx_version.py.in')
Alias('install', dirs)
# man
- env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'lyx.1'),
+ env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'lyx' + env['PROGRAM_SUFFIX'] + '.1'),
env.subst('$TOP_SRC_DIR/lyx.man'))
- env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'tex2lyx.1'),
+ env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'tex2lyx' + env['PROGRAM_SUFFIX'] + '.1'),
env.subst('$TOP_SRC_DIR/src/tex2lyx/tex2lyx.man'))
- env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'lyxclient.1'),
+ env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'lyxclient' + env['PROGRAM_SUFFIX'] + '.1'),
env.subst('$TOP_SRC_DIR/src/client/lyxclient.man'))
- Alias('install', [os.path.join(env['MAN_DEST_DIR'], x) for
- x in ['lyx.1', 'tex2lyx.1', 'lyxclient.1']])
+ Alias('install', [os.path.join(env['MAN_DEST_DIR'], x + env['PROGRAM_SUFFIX'] + '.1') for
+ x in ['lyx', 'tex2lyx', 'lyxclient']])
# locale files?
# ru.gmo ==> ru/LC_MESSAGES/lyxSUFFIX.mo
for gmo in gmo_files:
# Required runtime environment
#----------------------------------------------------------
-# FIXME: I remember lyx requires higher version of python?
-EnsurePythonVersion(1, 5)
+# scons asks for 1.5.2, lyx requires 2.2
+EnsurePythonVersion(2, 2)
# Please use at least 0.96.91 (not 0.96.1)
EnsureSConsVersion(0, 96)
and ARGUMENTS['frontend'] != opt_cache['frontend'] \
and opt_cache.has_key('qt_dir'):
opt_cache.pop('qt_dir')
+ # some options will require full rebuild
+ # these are in general things that will change src/config.h
+ for arg in ['version_suffix', 'nls']:
+ if ARGUMENTS.has_key(arg) and ((not opt_cache.has_key(arg)) or \
+ ARGUMENTS[arg] != opt_cache[arg]):
+ if fast_start:
+ print " ** fast_start is disabled because of the change of option", arg
+ print
+ fast_start = False
# and we do not cache some options
for arg in ['fast_start']:
if opt_cache.has_key(arg):
env['PREFIX'] = env.get('prefix', default_prefix)
# program suffix
if env.has_key('version_suffix'):
- env['PROGRAM_SUFFIX'] = env['version_suffix']
+ if env['version_suffix'] in ['y', 'yes', 't', 'true', '1', 'all']:
+ env['PROGRAM_SUFFIX'] = PACKAGE_VERSION
+ else:
+ env['PROGRAM_SUFFIX'] = env['version_suffix']
else:
env['PROGRAM_SUFFIX'] = ''
env['ADD_SUFFIX_TO_EXECUTABLES'] = add_suffix_to_executables
]
for header in headers:
- utils.addToConfig("/* Define to 1 if you have the <%s> header file. */" % header[0], newline=1)
if (header[2] == 'c' and conf.CheckCHeader(header[0])) or \
(header[2] == 'cxx' and conf.CheckCXXHeader(header[0])):
- utils.addToConfig('#define %s 1' % header[1])
+ utils.addToConfig('#define %s 1' % header[1],
+ desc="/* Define to 1 if you have the <%s> header file. */" % header[0])
else:
- utils.addToConfig('/* #undef %s */' % header[1])
+ utils.addToConfig('/* #undef %s */' % header[1],
+ desc="/* Define to 1 if you have the <%s> header file. */" % header[0])
# HAVE_OPEN
# HAVE_CLOSE
]
for func in functions:
- utils.addToConfig("/* Define to 1 if you have the `%s' function. */" % func[0], newline=1)
if conf.CheckFunc(func[0], header=func[2]):
- utils.addToConfig('#define %s 1' % func[1])
+ utils.addToConfig('#define %s 1' % func[1],
+ desc = "/* Define to 1 if you have the `%s' function. */" % func[0])
else:
- utils.addToConfig('/* #undef %s */' % func[1])
+ utils.addToConfig('/* #undef %s */' % func[1],
+ desc = "/* Define to 1 if you have the `%s' function. */" % func[0])
# HAVE_ASPRINTF
]
for func in env_functions:
- utils.addToConfig("/* Define to 1 if you have the `%s' function. */" % func[0], newline=1)
if conf.CheckFunc(func[0]):
- utils.addToConfig('#define %s 1' % func[1])
+ utils.addToConfig('#define %s 1' % func[1],
+ desc = "/* Define to 1 if you have the `%s' function. */" % func[0])
env[func[1]] = 1
else:
- utils.addToConfig('/* #undef %s */' % func[1])
+ utils.addToConfig('/* #undef %s */' % func[1],
+ desc = "/* Define to 1 if you have the `%s' function. */" % func[0])
env[func[1]] = 0
# HAVE_INTMAX_T
# HAVE_DECL_ISTREAMBUF_ITERATOR
- utils.addToConfig("/* Define to 1 if you have the `intmax_t' type. */", newline=1)
if conf.CheckType('intmax_t', includes='#include <stdint.h>') or \
conf.CheckType('intmax_t', includes='#include <inttypes.h>'):
- utils.addToConfig('#define HAVE_INTMAX_T 1')
+ utils.addToConfig('#define HAVE_INTMAX_T 1',
+ desc = "/* Define to 1 if you have the `intmax_t' type. */")
else:
- utils.addToConfig('/* #undef HAVE_INTMAX_T */')
+ utils.addToConfig('/* #undef HAVE_INTMAX_T */',
+ desc = "/* Define to 1 if you have the `intmax_t' type. */")
# HAVE_INTMAX_T
# HAVE_LONG_DOUBLE
'#include <streambuf>\n#include <istream>')
]
for t in types:
- utils.addToConfig("/* Define to 1 if you have the `%s' type. */" % t[0], newline=1)
if conf.CheckType(t[0], includes=t[2]):
- utils.addToConfig('#define %s 1' % t[1])
+ utils.addToConfig('#define %s 1' % t[1],
+ desc = "/* Define to 1 if you have the `%s' type. */" % t[0])
else:
- utils.addToConfig('/* #undef %s */' % t[1])
+ utils.addToConfig('/* #undef %s */' % t[1],
+ desc = "/* Define to 1 if you have the `%s' type. */" % t[0])
# windows/msvc sys/types.h does not have pid_t
# FIXME: #include <windows.h> is the right way?
# PACKAGE
# PACKAGE_VERSION
+ # PACKAGE_BUGREPORT
+ # PACKAGE_NAME
+ # PACKAGE_STRING
# DEVEL_VERSION
- utils.addToConfig('#define PACKAGE "%s%s"' % (PACKAGE, env['PROGRAM_SUFFIX']))
- utils.addToConfig('#define PACKAGE_VERSION "%s"' % PACKAGE_VERSION)
+ utils.addToConfig('#define PACKAGE "%s%s"' % (PACKAGE, env['PROGRAM_SUFFIX']),
+ desc = "/* Name of package */")
+
+ utils.addToConfig('#define PACKAGE_BUGREPORT "%s"' % PACKAGE_BUGREPORT,
+ desc = '/* Define to the address where bug reports for this package should be sent. */')
+
+ utils.addToConfig('#define PACKAGE_NAME "%s"' % PACKAGE_NAME,
+ desc = '/* Define to the full name of this package. */')
+
+ utils.addToConfig('#define PACKAGE_STRING "%s"' % PACKAGE_STRING,
+ desc = "/* Define to the full name and version of this package. */")
+
+ utils.addToConfig('#define PACKAGE_TARNAME "%s"' % PACKAGE_TARNAME,
+ desc = "/* Define to the one symbol short name of this package. */")
+
+ utils.addToConfig('#define PACKAGE_VERSION "%s"' % PACKAGE_VERSION,
+ desc = "/* Define to the version of this package. */")
+
if DEVEL_VERSION:
utils.addToConfig('#define DEVEL_VERSION 1')
#
# src/support/package.C.in needs the following to replace
# LYX_ABS_INSTALLED_DATADIR (e.g. /usr/local/lyx/share/lyx)
-env['LYX_DIR'] = env['SHARE_DIR']
+env['LYX_DIR'] = Dir(env['SHARE_DIR']).abspath
# LYX_ABS_INSTALLED_LOCALEDIR
-env['LOCALEDIR'] = env['LOCALE_DIR']
-env['TOP_SRCDIR'] = env['TOP_SRC_DIR']
+env['LOCALEDIR'] = Dir(env['LOCALE_DIR']).abspath
+# during variable substitution, absolute path is needed.
+env['TOP_SRCDIR'] = Dir(env['TOP_SRC_DIR']).abspath
# needed by src/version.C.in => src/version.C
env['PACKAGE_VERSION'] = PACKAGE_VERSION
# fill in the version info