t.samba_includes_extended = TO_LIST(t.samba_includes)[:]
t.ccflags = getattr(t, 'samba_cflags', '')
install_target = getattr(t, 'install_target', None)
- if install_target:
+ if Options.is_install and install_target:
t2 = bld.name_to_obj(install_target, bld.env)
t2.sname = install_target
t2.samba_type = t.samba_type
# remove objects that are also available in linked libs
reduce_objects(bld, tgt_list)
+ reduce_objects(bld, tgt_list)
# add in any syslib dependencies
for t in tgt_list:
return False
tgt_list_extended = tgt_list[:]
- for t in tgt_list:
- install_target = getattr(t, 'install_target', None)
- if install_target:
- t2 = bld.name_to_obj(install_target, bld.env)
- tgt_list_extended.append(t2)
+ if Options.is_install:
+ for t in tgt_list:
+ install_target = getattr(t, 'install_target', None)
+ if install_target:
+ t2 = bld.name_to_obj(install_target, bld.env)
+ tgt_list_extended.append(t2)
# put outputs in place
for t in tgt_list_extended:
This ensures that all the install targets have identical dependencies
to the build targets.
'''
+ if not Options.is_install:
+ return
+
for t in tgt_list[:]:
install_target = getattr(t, 'install_target', None)
if install_target:
if realname is None:
# a SAMBA_PYTHON target without a realname is just a
- # subsystem with needs_python=True
- return bld.SAMBA_SUBSYSTEM(name,
- source=source,
- deps=deps,
- public_deps=public_deps,
- cflags=cflags,
- includes=includes,
- init_function_sentinal=init_function_sentinal,
- local_include=local_include,
- needs_python=True,
- enabled=enabled)
+ # library with needs_python=True
+ bld.SAMBA_LIBRARY(name,
+ source=source,
+ deps=deps,
+ public_deps=public_deps,
+ includes=includes,
+ cflags=cflags,
+ local_include=local_include,
+ vars=vars,
+ needs_python=True,
+ enabled=enabled)
+ return
link_name = 'python/%s' % realname
deps = TO_LIST(deps)
deps.append(obj_target)
- if needs_python:
+ if target_type == 'PYTHON':
bundled_name = libname
else:
bundled_name = BUNDLED_NAME(bld, libname, bundled_extension)
features = 'cc cshlib'
- if needs_python:
+ if target_type == 'PYTHON':
features += ' pyext'
+ elif needs_python:
+ features += ' pyembed'
bld.SET_BUILD_GROUP(group)
t = bld(
install_path = '${LIBDIR}'
install_path = SUBST_VARS_RECURSIVE(install_path, bld.env)
- if install and install_target != bundled_name:
+ if Options.is_install and install and install_target != bundled_name:
# create a separate install library, which may have
# different rpath settings
- SET_TARGET_TYPE(bld, install_target, target_type)
t = bld(
features = features,
source = [],
ldflags = install_rpath(bld)
)
- if install:
+ if Options.is_install and install:
if realname:
install_name = realname
install_link = None
if install:
t.install_target = install_target
- if install and install_target != binname:
+ if Options.is_install and install and install_target != binname:
# we create a separate 'install' binary, which
# will have different rpath settings
- SET_TARGET_TYPE(bld, install_target, 'BINARY')
t = bld(
features = features,
source = [],
ldflags = install_rpath(bld)
)
- if install:
+ if Options.is_install and install:
bld.install_as(os.path.join(install_path, binname),
install_target,
chmod=0755)