Changeset 988 for vendor/current/pidl/wscript
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/pidl/wscript
r740 r988 1 1 #!/usr/bin/env python 2 2 3 import os, sys,Logs3 import os, Logs 4 4 from samba_utils import MODE_755 5 5 6 # This function checks if a perl module is installed on the system. 7 def check_system_perl_module(conf, module, version=None): 8 bundle_name = module.replace('::', '_') 9 module_check = module 10 11 # Create module string with version 12 if version: 13 module_check = module + ' ' + str(version) 14 15 # Check if we have to bundle it. 16 if conf.LIB_MUST_BE_BUNDLED(bundle_name.lower()): 17 return False 18 19 # Check for system perl module 20 if not conf.check_perl_module(module_check): 21 return False 22 23 conf.define('USING_SYSTEM_%s' % bundle_name.upper(), 1) 24 25 return True 26 6 27 def set_options(opt): 7 opt.tool_options('perl')28 return 8 29 9 30 def configure(conf): 10 conf.check_tool('perl') 31 # Check if perl(Parse::Yapp::Driver) is available. 32 check_system_perl_module(conf, "Parse::Yapp::Driver", 1.05) 33 11 34 # we need a recent version of MakeMaker to get the right man page names 12 35 if conf.CHECK_PERL_MANPAGE(): … … 20 43 21 44 def build(bld): 22 bld.INSTALL_FILES('${BINDIR}', 'pidl', chmod=MODE_755 )45 bld.INSTALL_FILES('${BINDIR}', 'pidl', chmod=MODE_755, perl_fixup=True) 23 46 24 47 bld.RECURSE('lib') … … 26 49 if not bld.CONFIG_SET('HAVE_PERL_MAKEMAKER'): 27 50 return 28 29 pidl_src = ['pidl']30 pidl_src.extend(bld.path.ant_glob('lib/**/*.pm').split())31 51 32 52 pidl_manpages = { … … 45 65 bld.env.pidl_srcdir = os.path.join(bld.srcnode.abspath(), 'pidl') 46 66 47 blib_bld = os.path.join(bld.srcnode.abspath(bld.env), 'pidl/blib')48 49 67 bld.SET_BUILD_GROUP('final') 50 68 if 'POD2MAN' in bld.env and bld.env['POD2MAN'] != '': 51 69 for src, manpage in pidl_manpages.iteritems(): 52 bld(rule='${P ERL} ${POD2MAN} -c "Samba Documentation" ${SRC} ${TGT}',70 bld(rule='${POD2MAN} -c "Samba Documentation" ${SRC} ${TGT}', 53 71 shell=True, 54 72 source=src,
Note:
See TracChangeset
for help on using the changeset viewer.