1 # vi:filetype=python:expandtab:tabstop=2:shiftwidth=2
5 # This file is part of LyX, the document processor.
6 # Licence details can be found in the file COPYING.
9 # Full author contact details are available in file CREDITS.
12 sys.path.append('config')
13 from scons_utils import globSource
17 targets = env['BUILD_TARGETS']
18 build_lyx = (targets == [] or 'lyx' in targets or 'install' in targets or 'all' in targets)
19 build_boost = env['INCLUDED_BOOST'] or 'boost' in targets
20 build_intl = env['INCLUDED_GETTEXT'] or 'intl' in targets
21 build_support = build_lyx or True in [x in targets for x in ['support', 'client', 'tex2lyx']]
22 build_mathed = build_lyx or 'mathed' in targets
23 build_insets = build_lyx or 'insets' in targets
24 build_frontends = build_lyx or 'frontends' in targets
25 build_graphics = build_lyx or 'graphics' in targets
26 build_controllers = build_lyx or 'controllers' in targets
27 build_client = 'client' in targets or 'install' in targets or 'all' in targets
28 build_tex2lyx = 'tex2lyx' in targets or 'install' in targets or 'all' in targets
29 build_lyxbase = build_lyx or 'lyxbase' in targets
30 build_po = 'po' in targets or 'install' in targets or 'all' in targets
31 build_qt3 = (build_lyx and env['frontend'] == 'qt3') or 'qt3' in targets
32 build_qt4 = (build_lyx and env['frontend'] == 'qt4') or 'qt4' in targets
33 build_msvs_projects = env['USE_VC'] and 'msvs_projects' in targets
36 # now, if rebuild_targets is specified, do not rebuild some targets
37 rebuild_targets = env['REBUILD_TARGETS']
39 def ifBuildLib(name, libname, old_value):
40 # explicitly asked to rebuild
41 if name in rebuild_targets:
43 # else if not rebuild, and if the library already exists
44 elif os.path.isfile(File(env.subst('$LOCALLIBPATH/${LIBPREFIX}%s$LIBSUFFIX'%libname)).abspath):
46 # do not change the original value
49 build_boost = ifBuildLib('boost', 'included_boost_filesystem', build_boost)
50 build_intl = ifBuildLib('intl', 'included_intl', build_intl)
51 build_support = ifBuildLib('support', 'support', build_support)
52 build_mathed = ifBuildLib('mathed', 'mathed', build_mathed)
53 build_insets = ifBuildLib('insets', 'insets', build_insets)
54 build_frontends = ifBuildLib('frontends', 'frontends', build_frontends)
55 build_graphics = ifBuildLib('graphics', 'graphics', build_graphics)
56 build_controllers = ifBuildLib('controllers', 'controllers', build_controllers)
57 build_lyxbase = ifBuildLib('lyxbase', 'lyxbase_pre', build_lyxbase)
58 build_qt3 = ifBuildLib('qt3', 'qt3', build_qt3)
59 build_qt4 = ifBuildLib('qt4', 'qt4', build_qt4)
61 # sync frontend and env['frontend'] (maybe build qt4 with frontend=qt3)
64 env['frontend'] = 'qt3'
67 env['frontend'] = 'qt4'
69 frontend = env['frontend']
77 env.BuildDir('$BUILDDIR/boost', '$TOP_SRC_DIR/boost/libs', duplicate = 0)
80 boostenv.AppendUnique(CCFLAGS = '-DBOOST_USER_CONFIG="<config.h>"')
82 print 'Processing files in boost/libs/filesystem/src...'
84 filesystem = boostenv.StaticLibrary(
85 target = '$LOCALLIBPATH/included_boost_filesystem',
86 source = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/filesystem/src'),
87 pattern = '*.cpp', build_dir = '$BUILDDIR/boost/filesystem/src')
90 print 'Processing files in boost/libs/regex/src...'
92 regex = boostenv.StaticLibrary(
93 target = '$LOCALLIBPATH/included_boost_regex',
94 source = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/regex/src'),
95 pattern = '*.cpp', build_dir = '$BUILDDIR/boost/regex/src')
98 print 'Processing files in boost/libs/signals/src...'
100 signals = boostenv.StaticLibrary(
101 target = '$LOCALLIBPATH/included_boost_signals',
102 source = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/signals/src'),
103 pattern = '*.cpp', build_dir = '$BUILDDIR/boost/signals/src')
106 print 'Processing files in boost/libs/iostreams/src...'
108 iostreams = boostenv.StaticLibrary(
109 target = '$LOCALLIBPATH/included_boost_iostreams',
110 source = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/iostreams/src'),
111 pattern = '*.cpp', build_dir = '$BUILDDIR/boost/iostreams/src')
113 Alias('boost', filesystem)
114 Alias('boost', regex)
115 Alias('boost', signals)
116 Alias('boost', iostreams)
123 print "Processing files in intl..."
125 env.BuildDir('$BUILDDIR/intl', '$TOP_SRC_DIR/intl', duplicate = 0)
128 # we need the original C compiler for these files
129 intlenv['CC'] = intlenv['C_COMPILER']
130 intlenv['CCFLAGS'] = intlenv['C_CCFLAGS']
131 intlenv['CPPPATH'] += ['intl']
133 intlenv.Append(CCFLAGS = [
134 r'-DLOCALEDIR=\"' + env['LOCALE_DIR'].replace('\\', '\\\\') + r'\"',
135 r'-DLOCALE_ALIAS_PATH=\"' + env['LOCALE_DIR'].replace('\\', '\\\\') + r'\"',
136 r'-DLIBDIR=\"' + env['TOP_SRC_DIR'].replace('\\', '\\\\') + r'/lib\"',
138 '-DENABLE_RELOCATABLE=1',
140 r'-DINSTALLDIR=\"' + env['PREFIX'].replace('\\', '\\\\') + r'/lib\"',
142 '-Dset_relocation_prefix=libintl_set_relocation_prefix',
143 '-Drelocate=libintl_relocate',
144 '-DDEPENDS_ON_LIBICONV=1',
149 # libgnuintl.h.in => libintl.h
150 env.substFile('$TOP_SRC_DIR/intl/libintl.h', '$TOP_SRC_DIR/intl/libgnuintl.h.in')
151 env.Command('$TOP_SRC_DIR/intl/libgnuintl.h', '$TOP_SRC_DIR/intl/libintl.h',
152 [Copy('$TARGET', '$SOURCE')])
154 intl = intlenv.StaticLibrary(
155 target = '$LOCALLIBPATH/included_intl',
157 source = globSource(dir = env.subst('$TOP_SRC_DIR/intl'), pattern = '*.c',
158 exclude = ['vasnprintf.c', 'printf-parse.c', 'printf-args.c', 'os2compat.c'],
159 build_dir = '$BUILDDIR/intl')
165 # Now, src code under src/
167 env.BuildDir('$BUILDDIR/common', '$TOP_SRC_DIR/src', duplicate = 0)
174 print "Processing files in src/support..."
176 env.substFile('$BUILDDIR/common/support/package.C', '$TOP_SRC_DIR/src/support/package.C.in')
178 support = env.StaticLibrary(
179 target = '$LOCALLIBPATH/support',
180 source = globSource(dir = env.subst('$TOP_SRC_DIR/src/support'), pattern = env['LYX_EXT'],
181 exclude = ['os_win32.C', 'os_unix.C', 'os_cygwin.C', 'atexit.c'],
182 include = ['package.C'], build_dir = '$BUILDDIR/common/support')
184 Alias('support', support)
191 print "Processing files in src/mathed..."
193 mathed = env.StaticLibrary(
194 target = '$LOCALLIBPATH/mathed',
195 source = globSource(dir = env.subst('$TOP_SRC_DIR/src/mathed'), pattern = env['LYX_EXT'],
196 exclude = ['math_xyarrowinset.C', 'math_mboxinset.C', 'formulamacro.C'],
197 build_dir = '$BUILDDIR/common/mathed')
199 Alias('mathed', mathed)
206 print "Processing files in src/insets..."
208 insets = env.StaticLibrary(
209 target = '$LOCALLIBPATH/insets',
210 source = globSource(dir = env.subst('$TOP_SRC_DIR/src/insets'), pattern = env['LYX_EXT'],
211 exclude = ['insettheorem.C'], build_dir = '$BUILDDIR/common/insets')
213 Alias('insets', insets)
220 print "Processing files in src/frontends..."
222 frontends = env.StaticLibrary(
223 target = '$LOCALLIBPATH/frontends',
224 source = globSource(dir = env.subst('$TOP_SRC_DIR/src/frontends'), pattern = env['LYX_EXT'],
225 build_dir = '$BUILDDIR/common/frontends')
227 Alias('frontends', frontends)
234 print "Processing files in src/graphics..."
236 graphics = env.StaticLibrary(
237 target = '$LOCALLIBPATH/graphics',
238 source = globSource(dir = env.subst('$TOP_SRC_DIR/src/graphics'), pattern = env['LYX_EXT'],
239 build_dir = '$BUILDDIR/common/graphics')
241 Alias('graphics', graphics)
244 if build_controllers:
246 # src/frontends/controllers
248 print "Processing files in src/frontends/controllers..."
250 controllers = env.StaticLibrary(
251 target = '$LOCALLIBPATH/controllers',
252 source = globSource(dir = env.subst('$TOP_SRC_DIR/src/frontends/controllers'), pattern = env['LYX_EXT'],
253 build_dir = '$BUILDDIR/common/frontends/controllers')
255 Alias('controllers', controllers)
261 if build_qt3 or build_qt4:
262 env.BuildDir('$BUILDDIR/$frontend', '$TOP_SRC_DIR/src/frontend/$frontend', duplicate = 0)
265 print "Processing files in src/frontends/qt3..."
268 # disable auto scan to speed up non build time
269 qt3env['QT_AUTOSCAN'] = 0
270 qt3env['QT_MOCHPREFIX'] = ''
275 qt3env.AppendUnique(CPPPATH = [
277 '$BUILDDIR/common/images',
278 '$BUILDDIR/common/frontends',
279 '$BUILDDIR/common/frontends/qt3',
280 '$BUILDDIR/common/frontends/controllers',
284 qt3_moc_files = ["$BUILDDIR/common/frontends/qt3/%s" % x for x in Split('''
327 QSpellcheckerDialog.C
329 QTabularCreateDialog.C
344 # manually moc and uic files for better performance
345 qt3_moced_files = [qt3env.Moc(x.replace('.C', '_moc.cpp'), x.replace('.C', '.h')) for x in qt3_moc_files]
347 qt3_uiced_files = [qt3env.Uic('$BUILDDIR/common/frontends/qt3/ui/'+x) for x in \
348 globSource(dir = env.subst('$TOP_SRC_DIR/src/frontends/qt3/ui'), pattern = '*.ui')]
350 qt3_uiced_cc_files = []
351 for x in qt3_uiced_files:
352 qt3_uiced_cc_files.extend(x[1:])
354 qt3 = qt3env.StaticLibrary(
355 target = '$LOCALLIBPATH/qt3',
356 source = globSource(dir = env.subst('$TOP_SRC_DIR/src/frontends/qt3/'), pattern = env['LYX_EXT'],
357 build_dir = '$BUILDDIR/common/frontends/qt3') + qt3_moced_files + qt3_uiced_cc_files
363 print "Processing files in src/frontends/qt4..."
366 qt4env['QT_AUTOSCAN'] = 0
368 # local qt4 toolset from
369 # http://www.iua.upf.es/~dgarcia/Codders/sconstools.html
371 # NOTE: I have to patch qt4.py since it does not automatically
372 # process .C file!!! (add to cxx_suffixes )
374 qt4env.Tool('qt4', [env['SCONS_DIR']])
375 qt4env.EnableQt4Modules(env['QT_LIB'], debug = False)
377 qt4env.AppendUnique(CPPPATH = [
379 '$BUILDDIR/common/images',
380 '$BUILDDIR/common/frontends',
381 '$BUILDDIR/common/frontends/qt4',
382 '$BUILDDIR/common/frontends/controllers'
386 # FIXME: replace by something from pkg_config
387 qt4env.Append(CCFLAGS = [
389 '-DQT_CLEAN_NAMESPACE',
397 qt4_moc_files = ["$BUILDDIR/common/frontends/qt4/%s" % x for x in Split('''
443 QSpellcheckerDialog.C
445 QTabularCreateDialog.C
464 resources = [qt4env.Uic4(x.split('.')[0]) for x in \
465 globSource(dir = env.subst('$TOP_SRC_DIR/src/frontends/qt4/ui'), pattern = '*.ui',
466 build_dir = '$BUILDDIR/common/frontends/qt4/ui')]
469 # moc qt4_moc_files, the moced files are included in the original files
471 qt4_moced_files = [qt4env.Moc4(x.replace('.C', '_moc.cpp'), x.replace('.C', '.h')) for x in qt4_moc_files]
473 qt4 = qt4env.StaticLibrary(
474 target = '$LOCALLIBPATH/qt4',
475 LIBS = qt4env['QT_LIB'],
476 source = globSource(dir = env.subst('$TOP_SRC_DIR/src/frontends/qt4'), pattern = env['LYX_EXT'],
477 exclude = ['QBrowseBox.C'], build_dir = '$BUILDDIR/common/frontends/qt4')
486 env.BuildDir('$BUILDDIR/common', '$TOP_SRC_DIR/src', duplicate = 0)
488 print "Processing files in src/client..."
490 if env['HAVE_FCNTL']:
491 client = env.Program(
492 target = '$BUILDDIR/common/client/lyxclient',
493 LIBS = ['support'] + env['INTL_LIBS'] + env['SYSTEM_LIBS'] +
494 env['SOCKET_LIBS'] + env['BOOST_LIBRARIES'],
495 source = globSource(dir = env.subst('$TOP_SRC_DIR/src/client'), pattern = env['LYX_EXT'],
496 build_dir = '$BUILDDIR/common/client')
498 Alias('client', env.Command(os.path.join('$BUILDDIR', os.path.split(str(client[0]))[1]),
499 client, [Copy('$TARGET', '$SOURCE')]))
502 Alias('client', client)
509 print "Processing files in src/tex2lyx..."
511 tex2lyx_env = env.Copy()
512 # the order is important here.
513 tex2lyx_env.Prepend(CPPPATH = ['$BUILDDIR/common/tex2lyx'])
514 tex2lyx_env.AppendUnique(LIBPATH = ['#$LOCALLIBPATH'])
516 for file in ['FloatList.C', 'Floating.C', 'counters.C', 'lyxlayout.h', 'lyxlayout.C',
517 'lyxtextclass.h', 'lyxtextclass.C', 'lyxlex.C', 'lyxlex_pimpl.C']:
518 env.Command('$BUILDDIR/common/tex2lyx/'+file, '$TOP_SRC_DIR/src/'+file,
519 [Copy('$TARGET', '$SOURCE')])
521 tex2lyx = tex2lyx_env.Program(
522 target = '$BUILDDIR/common/tex2lyx/tex2lyx',
523 LIBS = ['support'] + env['BOOST_LIBRARIES'] + env['SYSTEM_LIBS'],
524 source = globSource(dir = env.subst('$TOP_SRC_DIR/src/tex2lyx'), pattern = env['LYX_EXT'],
525 include = ['FloatList.C', 'Floating.C', 'counters.C', 'lyxlayout.C',
526 'lyxtextclass.C', 'lyxlex.C', 'lyxlex_pimpl.C'],
527 build_dir = '$BUILDDIR/common/tex2lyx')
529 Alias('tex2lyx', env.Command(os.path.join('$BUILDDIR', os.path.split(str(tex2lyx[0]))[1]),
530 tex2lyx, [Copy('$TARGET', '$SOURCE')]))
531 Alias('tex2lyx', tex2lyx)
538 print "Processing files in src..."
540 env.substFile('$BUILDDIR/common/version.C', '$TOP_SRC_DIR/src/version.C.in')
542 lyx_post_source = Split('''
551 if env.has_key('USE_ASPELL') and env['USE_ASPELL']:
552 lyx_post_source.append('aspell.C')
553 elif env.has_key('USE_PSPELL') and env['USE_PSPELL']:
554 lyx_post_source.append('pspell.C')
555 elif env.has_key('USE_ISPELL') and env['USE_ISPELL']:
556 lyx_post_source.append('ispell.C')
558 # temporary fix for MSVC, will remove later.
559 if not env['USE_VC']:
560 main_source = ['main.C']
564 lyxbase_pre = env.StaticLibrary(
565 target = '$LOCALLIBPATH/lyxbase_pre',
566 source = globSource(dir = env.subst('$TOP_SRC_DIR/src'), pattern = env['LYX_EXT'],
567 exclude = lyx_post_source + ['main.C', 'aspell.C', 'pspell.C', 'ispell.C', 'Variables.C', 'Sectioning.C'],
568 include = ['version.C'] + main_source, build_dir = '$BUILDDIR/common')
570 lyxbase_post = env.StaticLibrary(
571 target = '$LOCALLIBPATH/lyxbase_post',
572 source = ["$BUILDDIR/common/%s" % x for x in lyx_post_source]
574 Alias('lyxbase', lyxbase_pre)
575 Alias('lyxbase', lyxbase_post)
580 # Build lyx with given frontend
582 # temporary fix for MSVC, will remove later.
584 lyx_source = ['$BUILDDIR/common/main.C']
588 target = '$BUILDDIR/$frontend/lyx',
601 env['BOOST_LIBRARIES'] +
607 # [/path/to/lyx.ext] => lyx-qt3.ext
608 target_name = os.path.split(str(lyx[0]))[1].replace('lyx', 'lyx-%s' % frontend)
609 Alias('lyx', env.Command(os.path.join('$BUILDDIR', target_name), lyx,
610 [Copy('$TARGET', '$SOURCE')]))
614 if build_msvs_projects:
615 def build_project(target, dir, src_pattern = env['LYX_EXT'], include=[],
616 resource=None, rebuild=True):
617 if resource is not None:
618 res = globSource(dir = env.subst('$TOP_SRC_DIR/'+resource), pattern = '*.ui',
619 build_dir = env.subst('$TOP_SRC_DIR/'+resource))
623 cmds = 'faststart=yes rebuild='+target
625 cmds = 'faststart=yes'
626 if type(dir) == type([]):
630 src.extend(globSource(dir = env.subst('$TOP_SRC_DIR/' + d),
631 pattern = src_pattern, include = include,
632 build_dir = boostenv.subst('$TOP_SRC_DIR/' + d) ))
633 inc.extend(globSource(dir = env.subst('$TOP_SRC_DIR/' + d),
635 build_dir = env.subst('$TOP_SRC_DIR/' + d) ))
637 src = globSource(dir = env.subst('$TOP_SRC_DIR/' + dir),
638 pattern = src_pattern, include = include,
639 build_dir = boostenv.subst('$TOP_SRC_DIR/' + dir) )
640 inc = globSource(dir = env.subst('$TOP_SRC_DIR/' + dir),
642 build_dir = env.subst('$TOP_SRC_DIR/' + dir) )
644 proj = boostenv.MSVSProject(
645 target = '$MSVSPATH/' + target + env['MSVSPROJECTSUFFIX'],
647 incs = [boostenv.subst('$TOP_SRC_DIR/src/config.h')],
650 buildtarget = target,
654 Alias('msvs_projects', proj)
655 build_project('boost', ['boost/libs/filesystem/src',
656 'boost/libs/regex/src', 'boost/libs/signals/src',
657 'boost/libs/iostreams/src'], src_pattern = '*.cpp')
658 build_project('intl', 'intl', src_pattern = '*.c')
659 build_project('support', 'src/support', include=['package.C.in'])
660 build_project('mathed', 'src/mathed')
661 build_project('insets', 'src/insets')
662 build_project('frontends', 'src/frontends')
663 build_project('graphics', 'src/graphics')
664 build_project('controllers', 'src/frontends/controllers')
665 build_project('qt3', 'src/frontends/qt3', resource = 'src/frontends/qt3/ui')
666 build_project('qt4', 'src/frontends/qt4', resource = 'src/frontends/qt4/ui')
667 build_project('client', 'src/client', rebuild=False)
668 build_project('tex2lyx', 'src/tex2lyx', rebuild=False)
669 build_project('lyxbase', 'src')
670 if frontend == 'qt3':
671 build_project('lyx', ['src', 'src/support', 'src/mathed', 'src/insets',
672 'src/frontends', 'src/graphics', 'src/frontends/controllers',
673 'src/frontends/qt3'], resource = 'src/frontends/qt3/ui')
675 build_project('lyx', ['src', 'src/support', 'src/mathed', 'src/insets',
676 'src/frontends', 'src/graphics', 'src/frontends/controllers',
677 'src/frontends/qt4'], resource = 'src/frontends/qt4/ui')
684 print 'Processing files in po...'
690 transfiles = glob.glob(os.path.join(env.subst('$TOP_SRC_DIR'), 'po', '*.po'))
691 # possibly *only* handle these languages
693 if env.has_key('languages'):
694 languages = env.make_list(env['lanauges'])
696 if not env['MSGFMT']:
697 print 'msgfmt does not exist. Can not process po files'
700 env['BUILDERS']['Transfiles'] = Builder(action='$MSGFMT $SOURCE -o $TARGET',suffix='.gmo',src_suffix='.po')
705 fname = os.path.split(f)[1]
707 country = fname.split('.')[0]
709 if not languages or country in languages:
710 gmo_files.extend(env.Transfiles(f))
713 if 'install' in targets:
714 # create the directory if needed
715 if not os.path.isdir(env['DEST_DIR']):
717 os.makedirs(env['DEST_DIR'])
720 if not os.path.isdir(env['DEST_DIR']):
721 print 'Can not create directory', env['DEST_DIR']
726 # do not install these files
727 exclude_list = ['Makefile.am', 'Makefile.in', 'Makefile',
728 'lyx2lyx_version.py', 'lyx2lyx_version.py.in']
730 def install(dest, src):
731 ''' recusive installation of src to dest '''
732 # separate file and directory
733 files = filter(lambda x: os.path.isfile(x) and not os.path.split(x)[1] in exclude_list, src)
734 dirs = filter(os.path.isdir, src)
736 env.Install(dest, files)
740 ins_dir.extend(install(os.path.join(dest, os.path.basename(dir)),
741 glob.glob(os.path.join(dir, '*'))) )
744 # executables (some of them may be none)
746 if env['ADD_SUFFIX_TO_EXECUTABLES']:
747 program_suffix = env['PROGRAM_SUFFIX']
752 target_name = os.path.split(str(lyx[0]))[1].replace('lyx', 'lyx%s' % program_suffix)
753 target = os.path.join(env['BIN_DEST_DIR'], target_name)
754 env.InstallAs(target, lyx)
755 Alias('install', target)
756 # install lyx as lyx-qt3
757 target_name = os.path.split(str(lyx[0]))[1].replace('lyx', 'lyx-%s%s' % (frontend, program_suffix))
758 target = os.path.join(env['BIN_DEST_DIR'], target_name)
759 env.InstallAs(target, lyx)
760 Alias('install', target)
763 target_name = os.path.split(str(tex2lyx[0]))[1].replace('tex2lyx', 'tex2lyx%s' % program_suffix)
764 target = os.path.join(env['BIN_DEST_DIR'], target_name)
765 env.InstallAs(target, tex2lyx)
766 Alias('install', target)
768 # install lyxclient, may not exist
770 target_name = os.path.split(str(client[0]))[1].replace('client', 'client%s' % program_suffix)
771 target = os.path.join(env['BIN_DEST_DIR'], target_name)
772 env.InstallAs(target, client)
773 Alias('install', target)
776 dirs = install(env['SHARE_DEST_DIR'],
777 [env.subst('$TOP_SRC_DIR/lib/') + file for file in ['configure.py', 'encodings',
778 'chkconfig.ltx', 'CREDITS', 'external_templates', 'symbols', 'languages',
779 'lyxrc.example', 'syntax.default', 'bind', 'images', 'layouts', 'scripts',
780 'templates', 'examples', 'kbd', 'lyx2lyx', 'tex', 'clipart', 'doc', 'ui']]
782 env.substFile('$SHARE_DEST_DIR/lyx2lyx/lyx2lyx_version.py',
783 '$TOP_SRC_DIR/lib/lyx2lyx/lyx2lyx_version.py.in')
784 Alias('install', dirs)
786 env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'lyx.1'),
787 env.subst('$TOP_SRC_DIR/lyx.man'))
788 env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'tex2lyx.1'),
789 env.subst('$TOP_SRC_DIR/src/tex2lyx/tex2lyx.man'))
790 env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'lyxclient.1'),
791 env.subst('$TOP_SRC_DIR/src/client/lyxclient.man'))
792 Alias('install', [os.path.join(env['MAN_DEST_DIR'], x) for
793 x in ['lyx.1', 'tex2lyx.1', 'lyxclient.1']])
795 # ru.gmo ==> ru/LC_MESSAGES/lyxSUFFIX.mo
796 for gmo in gmo_files:
797 lan = os.path.split(str(gmo))[1].split('.')[0]
798 dest_file = os.path.join(env['LOCALE_DEST_DIR'], lan, 'LC_MESSAGES', 'lyx' + env['PROGRAM_SUFFIX'] + '.mo')
799 env.InstallAs(dest_file, gmo)
800 Alias('install', dest_file)
804 Alias('all', ['lyx', 'client', 'tex2lyx', 'po'])