1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

Move writing autoconf vars into files into m4 macros.

(This used to be commit 3ce8a4bb5568bb798c40034e3fa6a613ad2bf43b)
This commit is contained in:
Jelmer Vernooij 2008-05-18 17:48:50 +02:00
parent 4911af47f8
commit 9207a22a0e
2 changed files with 42 additions and 26 deletions

View File

@ -12,6 +12,10 @@ dnl SMB_ENABLE(name,default_build)
dnl
dnl SMB_INCLUDE_MK(file)
dnl
dnl SMB_WRITE_MAKEVARS(file)
dnl
dnl SMB_WRITE_PERLVARS(file)
dnl
dnl #######################################################
dnl ### And now the implementation ###
dnl #######################################################
@ -150,3 +154,39 @@ $1_ENABLE = $2
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{$1} = \"$2\";"
])
dnl SMB_WRITE_MAKEVARS(path)
AC_DEFUN([SMB_WRITE_MAKEVARS],
[
echo "configure: creating $1"
cat >$1<<CEOF
# $1 - Autogenerated by configure, DO NOT EDIT!
AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [
AC_Var = $AC_Var])
$MAKE_SETTINGS
CEOF
])
dnl SMB_WRITE_PERLVARS(path)
AC_DEFUN([SMB_WRITE_PERLVARS],
[
echo "configure: creating $1"
cat >$1<<CEOF
# config.pm - Autogenerate by configure. DO NOT EDIT!
package config;
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(%enabled %config);
use strict;
use vars qw(%enabled %config);
%config = (AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [
AC_Var => '$AC_Var',])
);
$SMB_INFO_ENABLES
1;
CEOF
])

View File

@ -160,25 +160,7 @@ fi
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 $CPPFLAGS"
echo "configure: creating build/smb_build/config.pm"
cat >build/smb_build/config.pm<<CEOF
# config.pm - Autogenerate by configure. DO NOT EDIT!
package config;
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(%enabled %config);
use strict;
use vars qw(%enabled %config);
%config = (AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [
AC_Var => '$AC_Var',])
);
$SMB_INFO_ENABLES
1;
CEOF
SMB_WRITE_PERLVARS(build/smb_build/config.pm)
echo "configure: creating config.mk"
cat >config.mk<<CEOF
@ -222,13 +204,7 @@ if test $CMP_RET != 0; then
cp include/config_tmp.h include/config.h
fi
echo "configure: creating mkconfig.mk"
cat >mkconfig.mk<<CEOF
# mkconfig.mk - Autogenerated by configure, DO NOT EDIT!
AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [
AC_Var = $AC_Var])
$MAKE_SETTINGS
CEOF
SMB_WRITE_MAKEVARS(mkconfig.mk)
if test $USESHARED = true
then