summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-02-28 21:17:22 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-02-28 21:52:34 +0100
commita1d7f029a06832bae59991398c8bc6ab2c2d6443 (patch)
treebd80717f09bf46429416e821b65c8e25aafe5618 /solenv
parente5d775d1bf603fed463e0e080e40f31dde07a3fa (diff)
solenv: sfx's ScriptLibraryContainer depends on #if HAVE_FEATURE_SCRIPTING
Change-Id: Ib5238d44d7bce6651ddbdc4f843f5aaab4eb97c2
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/native-code.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index c787a2373319..2350e47561a4 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -224,7 +224,7 @@ writer_factory_list = [
writer_constructor_list = [
# basic/util/sb.component
- "com_sun_star_comp_sfx2_ScriptLibraryContainer_get_implementation",
+ ("com_sun_star_comp_sfx2_ScriptLibraryContainer_get_implementation", "#if HAVE_FEATURE_SCRIPTING"),
# filter/source/textfilterdetect/textfd.component
"com_sun_star_comp_filters_PlainTextFilterDetect_get_implementation",
# sw/util/sw.component
@@ -257,6 +257,12 @@ constructor_map = {
'writer' : writer_constructor_list,
}
+def get_constructor_guard(constructor):
+ if type(full_constructor_map[constructor]) is bool:
+ return None
+ else:
+ return full_constructor_map[constructor]
+
# instead of outputting native-code.cxx, reduce the services.rdb according to
# the constraints, so that we can easily emulate what services do we need to
# add for a fully functional file loading / saving / ...
@@ -302,7 +308,10 @@ full_constructor_map = {}
if options.groups:
for constructor_group in options.groups:
for constructor in constructor_map[constructor_group]:
- full_constructor_map[constructor] = True
+ if type(constructor) is tuple:
+ full_constructor_map[constructor[0]] = constructor[1]
+ else:
+ full_constructor_map[constructor] = True
# dict of all the factories that we need according to -g's
full_factory_map = {}
@@ -341,7 +350,12 @@ for entry in sorted(full_factory_map.keys()):
print ('')
for constructor in sorted(full_constructor_map.keys()):
+ constructor_guard = get_constructor_guard(constructor)
+ if constructor_guard:
+ print (constructor_guard)
print ('void * '+constructor+'( void *, void * );')
+ if constructor_guard:
+ print ('#endif')
print ("""
const lib_to_factory_mapping *
@@ -391,7 +405,12 @@ lo_get_constructor_map(void)
static lib_to_constructor_mapping map[] = {""")
for constructor in sorted(full_constructor_map.keys()):
+ constructor_guard = get_constructor_guard(constructor)
+ if constructor_guard:
+ print (constructor_guard)
print (' { "' +constructor+ '", ' +constructor+ ' },')
+ if constructor_guard:
+ print ('#endif')
print ("""
{ 0, 0 }