diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-04-05 11:25:20 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-06 20:27:26 +1000 |
commit | 64594f296ca84c487e5cd7ec5e76153cb3b3ef4a (patch) | |
tree | e6d37cfc7afddf091a8b99f1a8e3bd2b0329bf2f | |
parent | cd712dff316b5d1d017c0132ef37e948b17e0608 (diff) | |
download | samba-64594f296ca84c487e5cd7ec5e76153cb3b3ef4a.tar.gz samba-64594f296ca84c487e5cd7ec5e76153cb3b3ef4a.tar.bz2 samba-64594f296ca84c487e5cd7ec5e76153cb3b3ef4a.zip |
s4-waf: replace TOUCH_FILE() with normal install rules
this allows it to work with 'waf uninstall'
-rw-r--r-- | buildtools/wafsamba/samba_utils.py | 13 | ||||
-rw-r--r-- | buildtools/wafsamba/wafsamba.py | 2 | ||||
-rw-r--r-- | lib/wscript_build | 9 |
3 files changed, 6 insertions, 18 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index fc23aa4f64..8a8a7e3975 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -409,19 +409,6 @@ def IS_NEWER(bld, file1, file2): Build.BuildContext.IS_NEWER = IS_NEWER -def TOUCH_FILE(file, install_dir=False): - '''touch a file''' - if install_dir: - if file[0] == '/': - file = Options.options.destdir + file - else: - file = Options.options.destdir + '/' + file - mkdir_p(os.path.dirname(file)) - f = open(file, 'w') - f.close() - - - @conf def RECURSE(ctx, directory): '''recurse into a directory, relative to the curdir or top level''' diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 55dfe26b0a..a28f1ebb79 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -411,7 +411,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source, Build.BuildContext.SAMBA_SUBSYSTEM = SAMBA_SUBSYSTEM -def SAMBA_GENERATOR(bld, name, rule, source, target, +def SAMBA_GENERATOR(bld, name, rule, source='', target='', group='generators', enabled=True, public_headers=None, header_path=None, diff --git a/lib/wscript_build b/lib/wscript_build index 44bf8108c8..f6fbe7a880 100644 --- a/lib/wscript_build +++ b/lib/wscript_build @@ -21,7 +21,8 @@ for e in list: bld.INSTALL_WILDCARD('${PYTHONDIR}/samba/external', e + '/**/*', flat=False, exclude='*.pyc', trim_path=os.path.dirname(e)) -if Options.is_install: - # we need a blank __init__.py in samba/external - TOUCH_FILE(bld.EXPAND_VARIABLES('${PYTHONDIR}/samba/external/__init__.py'), - install_dir=True) +bld.SAMBA_GENERATOR('external_init_py', + rule='touch ${TGT}', + target='empty_file') + +bld.INSTALL_FILES('${PYTHONDIR}/samba/external', 'empty_file', destname='__init__.py') |