1
1

Changed build system. Should be more distcheck, VPATH, static and other compilation mode friendly.

This commit was SVN r17245.
Этот коммит содержится в:
Aurelien Bouteiller 2008-01-25 23:57:01 +00:00
родитель 984ccf64a3
Коммит 48cabdc40b

Просмотреть файл

@ -10,7 +10,7 @@
AC_DEFUN([MCA_pml_v_CONFIG],[
# We are going to make recursive call in shell, nothing is impossible
# Still, this is not really smart or clean
# Still, we need to be extra careful
(
# Change srcdir (for DIRECT builds)
srcdir=`cd $srcdir && pwd`
@ -18,44 +18,59 @@ AC_DEFUN([MCA_pml_v_CONFIG],[
# Create directory structure (for VPATH builds)
AS_MKDIR_P("$project/mca/$framework/$component/vprotocol")
cd "$project/mca/$framework/$component"
rm -f vprotocol/mca && ln -s . vprotocol/mca
rm -f vprotocol/vprotocol && ln -s . vprotocol/vprotocol
rm -f vprotocol/vprotocol && ln -s . vprotocol/vprotocol
rm -f $srcdir/vprotocol/mca && ln -s . $srcdir/vprotocol/mca
rm -f $srcdir/vprotocol/vprotocol && ln -s . $srcdir/vprotocol/vprotocol
MCA_CONFIGURE_FRAMEWORK(vprotocol, vprotocol, 1)
rm -f vprotocol/mca
rm -f vprotocol/vprotocol
rm -f $srcdir/vprotocol/mca
rm -f $srcdir/vprotocol/vprotocol
cat >mca_vprotocol_config_output <<EOF
#
# /!\ This is Automatically generated file. Do not edit.
#
#
# /!\ This is Automatically generated file. Do not edit.
#
# Apply the modifications to current shell context
MCA_vprotocol_ALL_COMPONENTS="$MCA_vprotocol_ALL_COMPONENTS"
MCA_vprotocol_STATIC_COMPONENTS="$MCA_vprotocol_STATIC_COMPONENTS"
MCA_vprotocol_DSO_COMPONENTS="$MCA_vprotocol_DSO_COMPONENTS"
MCA_vprotocol_STATIC_LTLIBS="$MCA_vprotocol_STATIC_LTLIBS"
AC_SUBST(MCA_vprotocol_ALL_COMPONENTS)
AC_SUBST(MCA_vprotocol_STATIC_COMPONENTS)
AC_SUBST(MCA_vprotocol_DSO_COMPONENTS)
AC_SUBST(MCA_vprotocol_STATIC_LTLIBS)
OMPI_MCA_MAKE_DIR_LIST(MCA_vprotocol_ALL_SUBDIRS, vprotocol, [$MCA_vprotocol_ALL_COMPONENTS])
OMPI_MCA_MAKE_DIR_LIST(MCA_vprotocol_STATIC_SUBDIRS, vprotocol, [$MCA_vprotocol_STATIC_COMPONENTS])
OMPI_MCA_MAKE_DIR_LIST(MCA_vprotocol_DSO_SUBDIRS, vprotocol, [$MCA_vprotocol_DSO_COMPONENTS])
m4_foreach(mca_component, [mca_vprotocol_no_config_component_list],
[m4_ifval(mca_component, [
[BUILD_vprotocol_]mca_component[_DSO]="$[BUILD_vprotocol_]mca_component[_DSO]"
AM_CONDITIONAL([OMPI_BUILD_vprotocol_]mca_component[_DSO], test "$[BUILD_vprotocol_]mca_component[_DSO]" = "1")])])
m4_foreach(mca_component, [mca_vprotocol_m4_config_component_list],
[m4_ifval(mca_component, [
[BUILD_vprotocol_]mca_component[_DSO]= $[BUILD_vprotocol_]mca_component[_DSO]
AM_CONDITIONAL([OMPI_BUILD_vprotocol_]mca_component[_DSO], test "$[BUILD_vprotocol_]mca_component[_DSO]" = "1")])])
# Apply the modifications to current shell context
MCA_vprotocol_ALL_COMPONENTS="$MCA_vprotocol_ALL_COMPONENTS"
MCA_vprotocol_STATIC_COMPONENTS="$MCA_vprotocol_STATIC_COMPONENTS"
MCA_vprotocol_DSO_COMPONENTS="$MCA_vprotocol_DSO_COMPONENTS"
MCA_vprotocol_STATIC_LTLIBS="$MCA_vprotocol_STATIC_LTLIBS"
# Remove leading mca/vprotocol from subdirs
MCA_vprotocol_ALL_SUBDIRS="`echo $MCA_vprotocol_ALL_SUBDIRS | sed 's/mca\/vprotocol\///'`"
MCA_vprotocol_STATIC_SUBDIRS="`echo $MCA_vprotocol_STATIC_SUBDIRS | sed 's/mca\/vprotocol\///'`"
MCA_vprotocol_DSO_SUBDIRS="`echo $MCA_vprotocol_DSO_SUBDIRS | sed 's/mca\/vprotocol\///'`"
EOF
)
# Reload the output from vprotocol framework's config
. $project/mca/$framework/$component/mca_vprotocol_config_output
AC_SUBST(MCA_vprotocol_ALL_COMPONENTS)
AC_SUBST(MCA_vprotocol_STATIC_COMPONENTS)
AC_SUBST(MCA_vprotocol_DSO_COMPONENTS)
AC_SUBST(MCA_vprotocol_STATIC_LTLIBS)
AC_SUBST(MCA_vprotocol_ALL_SUBDIRS)
AC_SUBST(MCA_vprotocol_STATIC_SUBDIRS)
AC_SUBST(MCA_vprotocol_DSO_SUBDIRS)
m4_foreach(mca_component, [mca_vprotocol_no_config_component_list],
[m4_ifval(mca_component, [
[BUILD_vprotocol_]mca_component[_DSO]="$[BUILD_vprotocol_]mca_component[_DSO]"
AM_CONDITIONAL([OMPI_BUILD_vprotocol_]mca_component[_DSO], test "$[BUILD_vprotocol_]mca_component[_DSO]" = "1")])])
m4_foreach(mca_component, [mca_vprotocol_m4_config_component_list],
[m4_ifval(mca_component, [
[BUILD_vprotocol_]mca_component[_DSO]= $[BUILD_vprotocol_]mca_component[_DSO]
AM_CONDITIONAL([OMPI_BUILD_vprotocol_]mca_component[_DSO], test "$[BUILD_vprotocol_]mca_component[_DSO]" = "1")])])
])