summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b4e808b)
This is better than passing '-' as filename to the compiler/linker.
This replaces commit
65743f932b511db009655847e77288c95c0aa525.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9334
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10315
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Build.BuildContext.ADD_INIT_FUNCTION = ADD_INIT_FUNCTION
Build.BuildContext.ADD_INIT_FUNCTION = ADD_INIT_FUNCTION
+def generate_empty_file(task):
+ target_fname = installed_location=task.outputs[0].bldpath(task.env)
+ target_file = open(installed_location, 'w')
+ target_file.close()
+ return 0
#################################################################
def SAMBA_LIBRARY(bld, libname, source,
#################################################################
def SAMBA_LIBRARY(bld, libname, source,
source = bld.SUBDIR(subdir, source)
# remember empty libraries, so we can strip the dependencies
source = bld.SUBDIR(subdir, source)
# remember empty libraries, so we can strip the dependencies
- if ((source == '') or (source == [])) and deps == '' and public_deps == '':
- SET_TARGET_TYPE(bld, libname, 'EMPTY')
- return
+ if ((source == '') or (source == [])):
+ if deps == '' and public_deps == '':
+ SET_TARGET_TYPE(bld, libname, 'EMPTY')
+ return
+ empty_c = libname + '.empty.c'
+ bld.SAMBA_GENERATOR('%s_empty_c' % libname,
+ rule=generate_empty_file,
+ target=empty_c)
+ source=empty_c
if BUILTIN_LIBRARY(bld, libname):
obj_target = libname
if BUILTIN_LIBRARY(bld, libname):
obj_target = libname
return
# remember empty subsystems, so we can strip the dependencies
return
# remember empty subsystems, so we can strip the dependencies
- if ((source == '') or (source == [])) and deps == '' and public_deps == '':
- SET_TARGET_TYPE(bld, modname, 'EMPTY')
- return
+ if ((source == '') or (source == [])):
+ if deps == '' and public_deps == '':
+ SET_TARGET_TYPE(bld, modname, 'EMPTY')
+ return
+ empty_c = modname + '.empty.c'
+ bld.SAMBA_GENERATOR('%s_empty_c' % modname,
+ rule=generate_empty_file,
+ target=empty_c)
+ source=empty_c
if not SET_TARGET_TYPE(bld, modname, 'SUBSYSTEM'):
return
if not SET_TARGET_TYPE(bld, modname, 'SUBSYSTEM'):
return