diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-11 13:10:11 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-11 13:10:11 +0100 |
commit | e4165448d778db1721b1c7670b25ae3e40917d86 (patch) | |
tree | 027b825fa742c1dbb97874c179cdeea6dba92a58 /source4/build | |
parent | cac225ba7daf8d88d858292902480415f0fa00e2 (diff) | |
parent | de03c4a3eadd8180e5bda5b176f1abebff613a15 (diff) | |
download | samba-e4165448d778db1721b1c7670b25ae3e40917d86.tar.gz samba-e4165448d778db1721b1c7670b25ae3e40917d86.tar.bz2 samba-e4165448d778db1721b1c7670b25ae3e40917d86.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-python
(This used to be commit 35f5c8294e9f3b304987597d4bcfc75fdda05982)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/m4/public.m4 | 27 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 118 |
2 files changed, 34 insertions, 111 deletions
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4 index 4192128bbd..467b63055c 100644 --- a/source4/build/m4/public.m4 +++ b/source4/build/m4/public.m4 @@ -21,11 +21,16 @@ dnl ####################################################### dnl SMB_SUBSYSTEM(name,obj_files,required_subsystems,cflags) AC_DEFUN([SMB_SUBSYSTEM], [ +MAKE_SETTINGS="$MAKE_SETTINGS +$1_OBJ_FILES = $2 +$1_CFLAGS = $4 +" + SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS ################################### # Start Subsystem $1 @<:@SUBSYSTEM::$1@:>@ -OBJ_FILES = $2 +OBJ_FILES = \$($1_OBJ_FILES) PRIVATE_DEPENDENCIES = $3 CFLAGS = $4 ENABLE = YES @@ -37,16 +42,22 @@ ENABLE = YES dnl SMB_LIBRARY(name,obj_files,required_subsystems,version,so_version,cflags,ldflags,pcname) AC_DEFUN([SMB_LIBRARY], [ +MAKE_SETTINGS="$MAKE_SETTINGS +$1_OBJ_FILES = $2 +$1_CFLAGS = $6 +$1_LDFLAGS = $7 +" + SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES ################################### # Start Library $1 @<:@LIBRARY::$1@:>@ -OBJ_FILES = $2 +OBJ_FILES = \$($1_OBJ_FILES) PRIVATE_DEPENDENCIES = $3 VERSION = $4 SO_VERSION = $5 CFLAGS = $6 -LDFLAGS = $7 +LDFLAGS = \$($1_LDFLAGS) PC_NAME = $8 ENABLE = YES # End Library $1 @@ -127,15 +138,21 @@ include $1 dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags,pcname) AC_DEFUN([SMB_EXT_LIB], [ +MAKE_SETTINGS="$MAKE_SETTINGS +$1_LIBS = $2 +$1_CFLAGS = $3 +$1_CPPFLAGS = $4 +$1_LDFLAGS = $5 +" SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS ################################### # Start Ext Lib $1 @<:@EXT_LIB::$1@:>@ -LIBS = $2 +LIBS = \$($1_LIBS) CFLAGS = $3 CPPFLAGS = $4 -LDFLAGS = $5 +LDFLAGS = \$($1_LDFLAGS) PC_NAME = $6 # End Ext Lib $1 ################################### diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 5799d89c57..865d231c0c 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -46,11 +46,10 @@ sub new($$$) $self->output("# Autogenerated by build/smb_build/makefile.pm #\n"); $self->output("################################################\n"); $self->output("\n"); + $self->output("include mkconfig.mk\n"); $self->output("default: all\n\n"); - $self->_prepare_path_vars(); - $self->_prepare_suffix_rules(); $self->_prepare_compiler_linker(); if (!$self->{automatic_deps}) { @@ -68,57 +67,6 @@ sub output($$) $self->{output} .= $text; } -sub _prepare_path_vars($) -{ - my ($self) = @_; - - $self->output(<< "__EOD__" -prefix = $self->{config}->{prefix} -exec_prefix = $self->{config}->{exec_prefix} -selftest_prefix = $self->{config}->{selftest_prefix} - -builddir = $self->{config}->{builddir} -srcdir = $self->{config}->{srcdir} -datarootdir = $self->{config}->{datarootdir} - -VPATH = \$(builddir):\$(srcdir):heimdal_build:heimdal/lib/asn1:heimdal/lib/krb5:heimdal/lib/gssapi:heimdal/lib/hdb:heimdal/lib/roken:heimdal/lib/des - -BASEDIR = $self->{config}->{prefix} -BINDIR = $self->{config}->{bindir} -SBINDIR = $self->{config}->{sbindir} -LIBDIR = $self->{config}->{libdir} -TORTUREDIR = $self->{config}->{libdir}/torture -MODULESDIR = $self->{config}->{modulesdir} -INCLUDEDIR = $self->{config}->{includedir} -CONFIGDIR = $self->{config}->{sysconfdir} -DATADIR = $self->{config}->{datadir} -SWATDIR = \$(DATADIR)/swat -JSDIR = \$(DATADIR)/js -SETUPDIR = \$(DATADIR)/setup -VARDIR = $self->{config}->{localstatedir} -LOGFILEBASE = $self->{config}->{logfilebase} -NCALRPCDIR = $self->{config}->{localstatedir}/ncalrpc -LOCKDIR = $self->{config}->{lockdir} -PIDDIR = $self->{config}->{piddir} -MANDIR = $self->{config}->{mandir} -PRIVATEDIR = $self->{config}->{privatedir} -WINBINDD_SOCKET_DIR = $self->{config}->{winbindd_socket_dir} - -__EOD__ -); -} - -sub _prepare_suffix_rules($) -{ - my ($self) = @_; - - $self->output(<< "__EOD__" -FIRST_PREREQ = $self->{config}->{FIRST_PREREQ} - -__EOD__ -); -} - sub _prepare_compiler_linker($) { my ($self) = @_; @@ -139,54 +87,12 @@ sub _prepare_compiler_linker($) } $self->output(<< "__EOD__" -SHELL=$self->{config}->{SHELL} -PERL=$self->{config}->{PERL} -PYTHON=$self->{config}->{PYTHON} -SWIG=$self->{config}->{SWIG} - -CPP=$self->{config}->{CPP} CPPFLAGS=$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\$(srcdir)/lib/replace -I\$(srcdir)/lib/talloc -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H $self->{config}->{CPPFLAGS} -CC=$self->{config}->{CC} -CFLAGS=$self->{config}->{CFLAGS} -CFLAG_NO_UNUSED_MACROS=$self->{config}->{CFLAG_NO_UNUSED_MACROS} -PICFLAG=$self->{config}->{PICFLAG} - INSTALL_LINK_FLAGS=$extra_link_flags -BNLD=$self->{config}->{LD} -BNLD_FLAGS=$self->{config}->{LDFLAGS} -L$libdir - -STLD=$self->{config}->{STLD} -STLD_FLAGS=$self->{config}->{STLD_FLAGS} - -SHLD=$self->{config}->{SHLD} -SHLD_FLAGS=$self->{config}->{SHLD_FLAGS} -L\$(builddir)/bin/shared - -MDLD=$self->{config}->{MDLD} -MDLD_FLAGS=$self->{config}->{MDLD_FLAGS} -L\$(builddir)/bin/shared - -SHLIBEXT=$self->{config}->{SHLIBEXT} - -HOSTCC=$self->{config}->{HOSTCC} -HOSTCC_FLAGS=-D_SAMBA_HOSTCC_ \$(CFLAGS) - -HOSTLD=$self->{config}->{HOSTLD} -HOSTLD_FLAGS=$self->{config}->{LDFLAGS} - -XSLTPROC=$self->{config}->{XSLTPROC} - -LIB_PATH_VAR=$self->{config}->{LIB_PATH_VAR} - -LEX=$self->{config}->{LEX} -YACC=$self->{config}->{YACC} -YAPP=$self->{config}->{YAPP} - -GCOV=$self->{config}->{GCOV} - -DEFAULT_TEST_OPTIONS=$self->{config}->{DEFAULT_TEST_OPTIONS} - +INTERN_LDFLAGS = -L$libdir __EOD__ ); } @@ -280,16 +186,16 @@ sub SharedModule($$) } else { push (@{$self->{shared_modules}}, "$ctx->{TARGET_SHARED_LIBRARY}"); push (@{$self->{plugins}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}"); - $self->{install_plugins} .= "\t\@echo Installing $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; - $self->{install_plugins} .= "\t\@mkdir -p \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/\n"; - $self->{install_plugins} .= "\t\@cp $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; - $self->{uninstall_plugins} .= "\t\@echo Uninstalling \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; - $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; + $self->{install_plugins} .= "\t\@echo Installing $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; + $self->{install_plugins} .= "\t\@mkdir -p \$(DESTDIR)\$(modulesdir)/$sane_subsystem/\n"; + $self->{install_plugins} .= "\t\@cp $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; + $self->{uninstall_plugins} .= "\t\@echo Uninstalling \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; + $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; if (defined($ctx->{ALIASES})) { foreach (@{$ctx->{ALIASES}}) { - $self->{install_plugins} .= "\t\@rm -f \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; - $self->{install_plugins} .= "\t\@ln -fs $ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; - $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; + $self->{install_plugins} .= "\t\@rm -f \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; + $self->{install_plugins} .= "\t\@ln -fs $ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; + $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; } } } @@ -329,7 +235,7 @@ __EOD__ $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $init_obj \@echo Linking \$\@ \@mkdir -p $ctx->{SHAREDDIR} - \@\$(MDLD) \$(MDLD_FLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ + \@\$(MDLD) \$(MDLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ \$($ctx->{TYPE}_$ctx->{NAME}\_FULL_OBJ_LIST) $init_obj \\ \$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) __EOD__ @@ -387,7 +293,7 @@ sub SharedLibrary($$) $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) \@echo Linking \$\@ \@mkdir -p $ctx->{SHAREDDIR} - \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ + \@\$(SHLD) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ \$($ctx->{TYPE}_$ctx->{NAME}\_FULL_OBJ_LIST) \\ \$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) \\ $soarg$lns |