diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-03-13 18:54:33 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:57:13 -0500 |
commit | b67cf4ce262c834015ffda7bbbc1c62711f097aa (patch) | |
tree | a6e28bd29fac764aa21fd4f0c92091a6efd296dc /source4/build/smb_build | |
parent | e47f76e96dde0ab53a51a6cd66372eafa2b1385d (diff) | |
download | samba-b67cf4ce262c834015ffda7bbbc1c62711f097aa.tar.gz samba-b67cf4ce262c834015ffda7bbbc1c62711f097aa.tar.bz2 samba-b67cf4ce262c834015ffda7bbbc1c62711f097aa.zip |
r14335: Build shared modules in bin/modules/$SUBSYSTEM when in developer mode.
(This used to be commit 4799f7bd1fbf0ed3cd4c52bd6eef129666ac74b5)
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r-- | source4/build/smb_build/TODO | 13 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 11 | ||||
-rw-r--r-- | source4/build/smb_build/output.pm | 11 |
3 files changed, 25 insertions, 10 deletions
diff --git a/source4/build/smb_build/TODO b/source4/build/smb_build/TODO index b9607cd593..7d6999e973 100644 --- a/source4/build/smb_build/TODO +++ b/source4/build/smb_build/TODO @@ -1,6 +1,4 @@ - subdir handler for install headers into a specific directory -- hack for loading modules locally - - create - saner names for some of the .pc files - .pc files also when there is a public header? - get rid of include/structs.h and include/proto.h @@ -11,5 +9,14 @@ for each subsystem: - include line in Makefile - rule in Makefile -- determine dependencies from #include lines ? - install (parts of ?) autogenerated headers + +set of test scripts that check the code: +- configure_check_unused.pl +- find_unused_macros.pl +- find_unused_makefilevars.pl +- find_unused_options.sh +- findstatic.pl +- minimal_includes.pl +- check dependencies based on #include lines ? +- check whether private headers are not used outside their own subsystem diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 7002bc8844..1ff2e0cfa6 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -206,15 +206,15 @@ sub SharedLibrary($$) my $init_obj = ""; if ($self->{duplicate_build}) { - $installdir = "bin/install"; + $installdir = $ctx->{INSTALLDIR}; } else { - $installdir = "bin"; + $installdir = $ctx->{BUILDDIR}; } if ($ctx->{TYPE} eq "LIBRARY") { - push (@{$self->{shared_libs}}, "bin/$ctx->{LIBRARY_REALNAME}"); + push (@{$self->{shared_libs}}, "$ctx->{BUILDDIR}/$ctx->{LIBRARY_REALNAME}"); } elsif ($ctx->{TYPE} eq "MODULE") { - push (@{$self->{shared_modules}}, "bin/$ctx->{LIBRARY_REALNAME}"); + push (@{$self->{shared_modules}}, "$ctx->{BUILDDIR}/$ctx->{LIBRARY_REALNAME}"); push (@{$self->{plugins}}, "$installdir/$ctx->{LIBRARY_REALNAME}"); my $fixedname = $ctx->{NAME}; @@ -267,8 +267,9 @@ __EOD__ $self->output(<< "__EOD__" # -bin/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST) $init_obj +$ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST) $init_obj \@echo Linking \$\@ + \@mkdir -p $ctx->{BUILDDIR} \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) \\ \$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) $soarg \\ $init_obj \$($ctx->{TYPE}_$ctx->{NAME}_LINK_LIST) diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 2a0d592895..15ce5a78b0 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -58,12 +58,17 @@ sub generate_shared_library($) $lib_name = "lib$link_name"; } + $lib->{BUILDDIR} = "bin"; + $lib->{INSTALLDIR} = "bin/install"; $lib->{LIBRARY_REALNAME} = $lib->{LIBRARY_NAME} = "$lib_name.\$(SHLIBEXT)"; + if (defined($lib->{VERSION})) { $lib->{LIBRARY_SONAME} = $lib->{LIBRARY_NAME}.".$lib->{SO_VERSION}"; $lib->{LIBRARY_REALNAME} = $lib->{LIBRARY_NAME}.".$lib->{VERSION}"; + } elsif ($lib->{TYPE} eq "MODULE") { + $lib->{BUILDDIR} = "bin/modules/$lib->{SUBSYSTEM}"; } - $lib->{TARGET} = "bin/$lib->{LIBRARY_REALNAME}"; + $lib->{TARGET} = "$lib->{BUILDDIR}/$lib->{LIBRARY_REALNAME}"; $lib->{OUTPUT} = $lib->{TARGET}; } @@ -93,7 +98,9 @@ sub generate_binary($) @{$bin->{LINK_LIST}} = ("\$($bin->{TYPE}_$bin->{NAME}\_OBJ_LIST)"); @{$bin->{LINK_FLAGS}} = (); - $bin->{TARGET} = $bin->{OUTPUT} = "bin/$bin->{NAME}"; + $bin->{INSTALLDIR} = "bin/install"; + $bin->{BUILDDIR} = "bin/"; + $bin->{TARGET} = $bin->{OUTPUT} = "$bin->{BUILDDIR}/$bin->{NAME}"; $bin->{BINARY} = $bin->{NAME}; } |