diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-09-24 16:23:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:38:52 -0500 |
commit | 3d4ea18d4dd9031adc16348c16595d6c216b2d84 (patch) | |
tree | b43aba2aff1820c4ed365132cc2feca544ed402a /source4/SConstruct | |
parent | 63b43dd12fb579aaaccedd07aaa630cb1cd7aa88 (diff) | |
download | samba-3d4ea18d4dd9031adc16348c16595d6c216b2d84.tar.gz samba-3d4ea18d4dd9031adc16348c16595d6c216b2d84.tar.bz2 samba-3d4ea18d4dd9031adc16348c16595d6c216b2d84.zip |
r10478: More work on proto headers; we now generate a couple of smaller ones
that are then included by include/proto.h
(This used to be commit 703ffbaaaca11f3d8781cfe9e7542fcaa626d991)
Diffstat (limited to 'source4/SConstruct')
-rw-r--r-- | source4/SConstruct | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/source4/SConstruct b/source4/SConstruct index 7b355222dc..2ff867f0ad 100644 --- a/source4/SConstruct +++ b/source4/SConstruct @@ -11,6 +11,7 @@ # - finish fallback code # - finish proto code # - support for init functions +# - separate config file for lib/replace/ import cPickle, string, os @@ -111,7 +112,7 @@ if hostenv['configure']: conf = hostenv.Configure() - for h in ['sys/select.h','fcntl.h','sys/fcntl.h','sys/time.h'] + \ + for h in ['sys/select.h','fcntl.h','sys/fcntl.h'] + \ ['utime.h','grp.h','sys/id.h','limits.h','memory.h'] + \ ['compat.h','math.h','sys/param.h','ctype.h','sys/wait.h'] + \ ['sys/resource.h','sys/ioctl.h','sys/ipc.h','sys/mode.h'] + \ @@ -171,6 +172,22 @@ int main() defines['HAVE_IMMEDIATE_STRUCTURES'] = 1 hostenv.AlwaysBuild('include/config.h') + + if conf.TryCompile(""" +#include <sys/types.h> +#include <sys/time.h> +#include <time.h> + +int +main () +{ +if ((struct tm *) 0) +return 0; + return 0; +} +""", '.c'): + defines['TIME_WITH_SYS_TIME'] = 1 + conf.Finish() [dynenv.Append(CPPDEFINES = {p: '\\"%s\\"' % paths[p]}) for p in paths] @@ -178,8 +195,7 @@ int main() dynconfig = dynenv.Object('dynconfig.c') Export('dynconfig') -proto_files = [] -Export('proto_files') +hostenv.proto_headers = [] SConscript( dirs=['lib','torture','rpc_server','cldap_server','libcli', @@ -187,7 +203,18 @@ SConscript( 'smbd','dsdb','heimdal_build','ntptr','kdc','smb_server','ntvfs', 'winbind','scripting','auth', 'librpc','script/tests']) -hostenv.CProtoHeader(target='include/proto.h',source=proto_files) +# proto.h + +def create_global_proto(env, target, source): + fd = open(str(target[0]), 'w') + [fd.write('#include "%s"\n' % x) for x in source] + fd.close() + +def create_global_proto_print(*args, **kwargs): + print 'Building global proto.h' + +hostenv.Command('include/proto.h', hostenv.proto_headers, + Action(create_global_proto, create_global_proto_print)) # Save configuration |