[PATCH] samba-devel

Stefan Metzmacher metze at metzemix.de
Thu Nov 13 10:59:22 GMT 2003


Alexander Bokovoy wrote:

>Hi Stefan!
>
>On Tue, Nov 11, 2003 at 08:09:32PM +0100, Stefan Metzmacher wrote:
>  
>
>>here's my samba-devel patch
>>    
>>
>Thank you!
>
>  
>
>>1) It adds a sambabuild util which gives modules some usefull info:
>>
>>metze at routox:/home/Projects/samba/3_0-ioctl/source> sambabuild --help
>>Usage: [OPTION...]
>>  --cflags                              Print flags to pass to c compiler
>>  --cppflags                            Print flags to pass to the c pre
>>                                        compiler
>>    
>>
>Preprocessor would be more correct word :)
>  
>
:-)

>  
>
>>  --picflags                            Print flags for PIC
>>  --ldflags                             Print flags to pass to linker
>>  --ldshflags                           Print flags to pass to linker for
>>                                        shared libraries
>>  -S, --subsystem-path=SUBSYSTEM        Print installation directory for
>>                                        subsystem
>>  -M, --makefile-var=MAKEFILE-VAR       Print Makefile var
>>  -H, --header-file=SYSTEM              Print Headerfile location for system
>>  -v, --version-string=VERSION-STRING   Print Makefile var
>>  -b, --build-options                   Print build options
>>
>>Help options
>>  -?, --help                            Show this help message
>>  --usage                               Display brief usage message
>>
>>Common samba options:
>>  -V, --version                         Print version
>>
>>
>>Some examples:
>>    
>>
>[strip]
>Looks good on examples, I'm continue to look into the code during this
>week and then add this to HEAD with needed changes (if any). If Jerry
>wouldn't object after some time of testing in HEAD, it would go into
>SAMBA_3_0 branch.
>
>Samba4 would benefit from this as well but we need to port existing
>modules' subsystem there.
>  
>
for samba4 I want to have just the needed headers installed... so this 
needs a lot of work

> 
>  
>
>>2) it adds a configure option
>>--with-devel-subdir=DIR Where to put the devel headers (default=samba)
>>    
>>
>Probably $prefix/include/samba?
>  
>
it's $includedir/$devel_subdir

> 
>  
>
>>3.1) it adds a make devel
>>prepare the headers for /usr/include/samba
>>
>>#include "vfs.h"
>> =>
>>#include <samba/include/vfs.h>
>>
>>if you use --with-devel-subdir=samba3-3.0.0
>>prepare the headers for /usr/include/samba3-3.0.0
>>
>>#include "vfs.h"
>> =>
>>#include <samba3-3.0.0/include/vfs.h>
>>    
>>
>I think it is not good. Much better to incorporate
>-I/usr/include/samba3-3.0.0 into set of compiler flags and install headers
>into subdirectory with unchangeable name, like
>/usr/include/samba3-3.0.0/samba -- applications still use 
>#include <samba/include/vfs.h> even if actual headers are installed
>somewhere in a weird place in a system.
>  
>
the modules should ask sambabuild for the location!!!
and the default is '$includedir/samba' so that shouldn't be a problem!

>  
>
>>3.2)
>>and it creates /usr/include/samba/samba_module.h
>>which includes <samba/include/includes.h>
>>and /usr/include/samba/winbind_client.h
>>which includes <samba/nsswitch/winbind_client.h>
>>    
>>
>Ok.
>
>  
>
>>@@ -1386,6 +1398,97 @@ proto: headers 
>> 
>> .PHONY: headers proto
>> 
>>+DEVEL_INCLUDE_HEADERS = include/MacExtensions.h include/ads.h include/asn_1.h \
>>+	include/byteorder.h include/charset.h include/client.h include/clitar.h \
>>+	include/debug.h include/dlinklist.h include/doserr.h include/dynconfig.h \
>>+	include/hash.h include/hmacmd5.h include/interfaces.h include/intl.h \
>>+	include/libsmbclient.h include/local.h include/mangle.h include/mapping.h \
>>+	include/md5.h include/messages.h include/msdfs.h include/nameserv.h \
>>+	include/nt_printing.h include/ntdomain.h include/printing.h include/pstring.h \
>>+	include/rap.h include/rpc_brs.h include/rpc_client.h include/rpc_creds.h \
>>+	include/rpc_dce.h include/rpc_dfs.h include/rpc_lsa.h include/rpc_netlogon.h \
>>+	include/rpc_parse.h include/rpc_reg.h include/rpc_samr.h include/rpc_secdes.h include/rpc_shutdown.h \
>>+	include/rpc_spoolss.h include/rpc_srvsvc.h include/rpc_wkssvc.h include/safe_string.h \
>>+	include/secrets.h include/session.h include/smb_acls.h include/talloc.h \
>>+	include/trans2.h include/util_getent.h include/xfile.h include/adt_tree.h \
>>+	include/nt_status.h include/rpc_ds.h include/libsmb_internal.h include/ntlmssp.h \
>>+	include/srvstr.h include/popt_common.h include/rpc_echo.h include/authdata.h \
>>+	include/smb_macros.h include/smbldap.h include/build_env.h include/vfs.h \
>>+	include/smb.h include/idmap.h include/sysquotas.h include/proto.h include/auth.h \
>>+	include/spnego.h include/privileges.h include/passdb.h include/includes.h \
>>+	include/nterr.h include/module.h include/version.h include/ntioctl.h \
>>+	include/fake_file.h include/ntquotas.h include/vfs_macros.h include/rpc_misc.h \
>>+	include/smbprofile.h 
>>    
>>
>This (and similar entries later in the patch) creates possible problems
>for maintenance as header file addition now requires to change these
>variables. Any idea how to make it more error-free?
>  
>
I thought of the pathsbstr and wildcard stuff from examples/VFS/Makefile.in
but I fear that's not portable...
or we can write a shell script later that lookup all headers included 
from including include/includes.h
but one thing at time!

>Another question: why not to make sambabuild utility a shell script?
>
>  
>
why should it be?

-- 

metze

-------------------------------------------
Stefan (metze) Metzmacher <metze at metzemix.de>





More information about the samba-technical mailing list