- # install lyx
- target_name = os.path.split(str(lyx[0]))[1].replace('lyx', 'lyx%s' % version_suffix)
- target = os.path.join(bin_dest_dir, target_name)
- env.InstallAs(target, lyx)
- Alias('install', target)
- # install lyx as lyx-qt3
- target_name = os.path.split(str(lyx[0]))[1].replace('lyx', 'lyx-%s%s' % (frontend, version_suffix))
- target = os.path.join(bin_dest_dir, target_name)
- env.InstallAs(target, lyx)
- Alias('install', target)
- #
- # install tex2lyx
- target_name = os.path.split(str(tex2lyx[0]))[1].replace('tex2lyx', 'tex2lyx%s' % version_suffix)
- target = os.path.join(bin_dest_dir, target_name)
- env.InstallAs(target, tex2lyx)
- Alias('install', target)
- #
- # install lyxclient, may not exist
- if client != None:
- target_name = os.path.split(str(client[0]))[1].replace('client', 'client%s' % version_suffix)
+ # install lyx, if in release mode, try to strip the binary
+ if env.has_key('STRIP') and env['STRIP'] is not None and mode != 'debug':
+ # create a builder to strip and install
+ env['BUILDERS']['StripInstallAs'] = Builder(action='$STRIP $SOURCE -o $TARGET')
+
+ # install executables
+ for (name, obj) in (('lyx', lyx), ('tex2lyx', tex2lyx), ('client', client)):
+ if obj is None:
+ continue
+ target_name = os.path.split(str(obj[0]))[1].replace(name, '%s%s' % (name, version_suffix))