mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
build: enable ENFORCE_GROUP_ORDERING()
also fixed ASN1 target names
This commit is contained in:
parent
d01f75c72d
commit
7c3234c485
90
buildtools/wafsamba/samba_asn1.py
Normal file
90
buildtools/wafsamba/samba_asn1.py
Normal file
@ -0,0 +1,90 @@
|
||||
# samba ASN1 rules
|
||||
|
||||
from TaskGen import taskgen, before
|
||||
import Build, os, string, Utils
|
||||
from samba_utils import *
|
||||
|
||||
|
||||
# not sure if we need this exec_rule stuff ..., i'll leave it in for now
|
||||
@feature('asn1')
|
||||
@before('exec_rule')
|
||||
def add_comp(self):
|
||||
y = self.bld.name_to_obj("asn1_compile", self.env)
|
||||
y.post()
|
||||
|
||||
|
||||
def SAMBA_ASN1(bld, name, source,
|
||||
options='',
|
||||
directory='',
|
||||
option_file=None):
|
||||
'''Build a ASN1 file using the asn1 compiler.
|
||||
This will produce 2 output files'''
|
||||
bname = os.path.basename(source)[0:-5];
|
||||
dname = os.path.dirname(source)
|
||||
name = "ASN1_%s" % bname.upper()
|
||||
asn1name = "%s_asn1" % bname
|
||||
|
||||
if not SET_TARGET_TYPE(bld, name, 'ASN1'):
|
||||
return
|
||||
|
||||
# for ASN1 compilation, I always put it in build_source, as it doesn't make
|
||||
# sense elsewhere
|
||||
bld.SET_BUILD_GROUP('build_source')
|
||||
|
||||
# old build system for spnego.asn1:
|
||||
# /home/tnagy/samba_old/source4/./bin/asn1_compile --sequence=MechTypeList --one-code-file /home/tnagy/samba_old/source4/heimdal/lib/gssapi/spnego/spnego.asn1 spnego_asn1
|
||||
|
||||
# new system: hmm, maybe options need to come earlier in the command line? We put them later
|
||||
# /home/tnagy/samba/source4/bin/asn1_compile --one-code-file /home/tnagy/samba/source4/heimdal/lib/gssapi/spnego/spnego.asn1 spnego_asn1 --sequence=MechTypeList
|
||||
|
||||
out_files = []
|
||||
out_files.append("../heimdal/%s/asn1_%s_asn1.x" % (directory, bname))
|
||||
out_files.append("../heimdal/%s/%s_asn1.hx" % (directory, bname))
|
||||
|
||||
# the ${TGT[0].parent.abspath(env)} expression gives us the parent directory of
|
||||
# the first target in the build directory
|
||||
# SRC[0].abspath(env) gives the absolute path to the source directory for the first
|
||||
# source file. Note that in the case of a option_file, we have more than
|
||||
# one source file
|
||||
cd_rule = 'cd ${TGT[0].parent.abspath(env)}'
|
||||
asn1_rule = cd_rule + ' && ${ASN1COMPILER} ${OPTION_FILE} ${ASN1OPTIONS} --one-code-file ${SRC[0].abspath(env)} ${ASN1NAME}'
|
||||
|
||||
if option_file is not None:
|
||||
source = [ source, option_file ]
|
||||
|
||||
t = bld(rule=asn1_rule,
|
||||
features = 'asn1',
|
||||
ext_out = '.x',
|
||||
before = 'cc',
|
||||
shell = True,
|
||||
source = source,
|
||||
target = out_files,
|
||||
name=name)
|
||||
|
||||
t.env.ASN1NAME = asn1name
|
||||
t.env.ASN1OPTIONS = options
|
||||
t.env.ASN1COMPILER = os.path.join(os.environ.get('PWD'), 'bin/asn1_compile')
|
||||
if option_file is not None:
|
||||
t.env.OPTION_FILE = "--option-file=%s" % os.path.normpath(os.path.join(bld.curdir, option_file))
|
||||
|
||||
|
||||
# now generate a .c file from the .x file
|
||||
t = bld(rule='''( echo '#include "config.h"' && cat ${SRC} ) > ${TGT}''',
|
||||
source = out_files[0],
|
||||
target = out_files[0][0:-2] + '.c',
|
||||
shell = True,
|
||||
ext_out = '.c',
|
||||
ext_in = '.x',
|
||||
depends_on = name,
|
||||
name = name + "_C")
|
||||
|
||||
# and generate a .h file from the .hx file
|
||||
t = bld(rule='cp ${SRC} ${TGT}',
|
||||
source = out_files[1],
|
||||
ext_out = '.c',
|
||||
ext_in = '.x',
|
||||
target = out_files[1][0:-3] + '.h',
|
||||
depends_on = name,
|
||||
name = name + "_H")
|
||||
|
||||
Build.BuildContext.SAMBA_ASN1 = SAMBA_ASN1
|
@ -28,7 +28,6 @@ def SAMBA_AUTOPROTO(bld, header, source):
|
||||
ext_out='.c',
|
||||
rule = '../script/mkproto.pl --srcdir=.. --builddir=. --public=/dev/null --private=${TGT} ${SRC}'
|
||||
)
|
||||
print "Added AUTOPROTO target %s" % header
|
||||
Build.BuildContext.SAMBA_AUTOPROTO = SAMBA_AUTOPROTO
|
||||
|
||||
|
||||
|
70
source4/lib/registry/wscript_build
Normal file
70
source4/lib/registry/wscript_build
Normal file
@ -0,0 +1,70 @@
|
||||
bld.SAMBA_PIDL_TDR('PIDL_REG',
|
||||
source='regf.idl')
|
||||
|
||||
bld.SAMBA_SUBSYSTEM('TDR_REGF',
|
||||
source='tdr_regf.c',
|
||||
public_deps='TDR'
|
||||
)
|
||||
|
||||
|
||||
bld.SAMBA_LIBRARY('registry',
|
||||
source='interface.c util.c samba.c patchfile_dotreg.c patchfile_preg.c patchfile.c regf.c hive.c local.c ldb.c dir.c rpc.c',
|
||||
# PC_FILES='registry.pc',
|
||||
public_deps='LIBSAMBA-UTIL CHARSET TDR_REGF ldb RPC_NDR_WINREG LDB_WRAP',
|
||||
public_headers='registry.h',
|
||||
vnum='0.0.1'
|
||||
)
|
||||
|
||||
|
||||
bld.SAMBA_SUBSYSTEM('registry_common',
|
||||
source='tools/common.c',
|
||||
autoproto='tools/common.h',
|
||||
public_deps='registry'
|
||||
)
|
||||
|
||||
|
||||
bld.SAMBA_BINARY('regdiff',
|
||||
source='tools/regdiff.c',
|
||||
manpages='man/regdiff.1',
|
||||
installdir='BINDIR',
|
||||
deps='LIBSAMBA-HOSTCONFIG registry LIBPOPT POPT_SAMBA POPT_CREDENTIALS'
|
||||
)
|
||||
|
||||
|
||||
bld.SAMBA_BINARY('regpatch',
|
||||
source='tools/regpatch.c',
|
||||
manpages='man/regpatch.1',
|
||||
installdir='BINDIR',
|
||||
deps='LIBSAMBA-HOSTCONFIG registry LIBPOPT POPT_SAMBA POPT_CREDENTIALS registry_common'
|
||||
)
|
||||
|
||||
|
||||
bld.SAMBA_BINARY('regshell',
|
||||
source='tools/regshell.c',
|
||||
manpages='man/regshell.1',
|
||||
installdir='BINDIR',
|
||||
deps='LIBSAMBA-HOSTCONFIG LIBPOPT registry POPT_SAMBA POPT_CREDENTIALS SMBREADLINE registry_common'
|
||||
)
|
||||
|
||||
|
||||
bld.SAMBA_BINARY('regtree',
|
||||
source='tools/regtree.c',
|
||||
manpages='man/regtree.1',
|
||||
installdir='BINDIR',
|
||||
deps='LIBSAMBA-HOSTCONFIG LIBPOPT registry POPT_SAMBA POPT_CREDENTIALS registry_common'
|
||||
)
|
||||
|
||||
|
||||
bld.SAMBA_SUBSYSTEM('torture_registry',
|
||||
source='tests/generic.c hive.c tests/diff.c tests/registry.c',
|
||||
autoproto='tests/proto.h',
|
||||
deps='torture registry'
|
||||
)
|
||||
|
||||
|
||||
bld.SAMBA_PYTHON('py_registry',
|
||||
source='pyregistry.c',
|
||||
public_deps='registry PYTALLOC pycredentials pyparam_util',
|
||||
realname='samba/registry.so'
|
||||
)
|
||||
|
@ -150,3 +150,4 @@ bld.BUILD_SUBDIR('../libcli/named_pipe_auth')
|
||||
bld.BUILD_SUBDIR('heimdal_build')
|
||||
|
||||
bld.CHECK_DEPENDENCIES()
|
||||
bld.ENFORCE_GROUP_ORDERING()
|
||||
|
Loading…
x
Reference in New Issue
Block a user