Make autogen.sh and friends be a little smarter -- don't let autogen.sh
complete successfully if you have a [an obvious] problem in your module This commit was SVN r380.
Этот коммит содержится в:
родитель
f7c3e7f1ff
Коммит
a0089087aa
@ -311,6 +311,10 @@ EOF
|
||||
"$rgt_lam_topdir/config/mca_make_configure.pl" \
|
||||
--lamdir "$rgt_lam_topdir" \
|
||||
--moduledir "`pwd`"
|
||||
if test "$?" != "0"; then
|
||||
echo "*** autogen.sh failed to complete!"
|
||||
exit 1
|
||||
fi
|
||||
happy=1
|
||||
file=configure.ac
|
||||
elif test -f configure.in; then
|
||||
|
@ -24,37 +24,42 @@ AC_SUBST(top_lam_builddir)
|
||||
|
||||
# Get the version of @MCA_TYPE@ @MCA_MODULE_NAME@ that we are installing.
|
||||
|
||||
LAM_GET_VERSION($srcdir/../../../../../config, @PARAM_VERSION_FILE@,
|
||||
if test -n "@PARAM_VERSION_FILE@" -a -f "@PARAM_VERSION_FILE@"; then
|
||||
LAM_GET_VERSION($srcdir/../../../../../config, @PARAM_VERSION_FILE@,
|
||||
@PARAM_VAR_PREFIX@)
|
||||
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MAJOR_VERSION,
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MAJOR_VERSION,
|
||||
$@PARAM_VAR_PREFIX@_MAJOR_VERSION,
|
||||
[Major LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MINOR_VERSION,
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MINOR_VERSION,
|
||||
$@PARAM_VAR_PREFIX@_MINOR_VERSION,
|
||||
[Minor LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_RELEASE_VERSION,
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_RELEASE_VERSION,
|
||||
$@PARAM_VAR_PREFIX@_RELEASE_VERSION,
|
||||
[Release LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_ALPHA_VERSION,
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_ALPHA_VERSION,
|
||||
$@PARAM_VAR_PREFIX@_ALPHA_VERSION,
|
||||
[Alpha LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_BETA_VERSION,
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_BETA_VERSION,
|
||||
$@PARAM_VAR_PREFIX@_BETA_VERSION,
|
||||
[Beta LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_CVS_VERSION,
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_CVS_VERSION,
|
||||
$@PARAM_VAR_PREFIX@_CVS_VERSION,
|
||||
[CVS LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_VERSION,
|
||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_VERSION,
|
||||
"$@PARAM_VAR_PREFIX@_VERSION",
|
||||
[Overall LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version number])
|
||||
version_string="version $@PARAM_VAR_PREFIX@_VERSION"
|
||||
else
|
||||
version_string=""
|
||||
fi
|
||||
|
||||
#
|
||||
# Start it up
|
||||
#
|
||||
|
||||
LAM_CONFIGURE_SETUP
|
||||
lam_show_title "Configuring MCA @MCA_TYPE@ @MCA_MODULE_NAME@ module version $@PARAM_VAR_PREFIX@_VERSION"
|
||||
lam_show_title "Configuring MCA @MCA_TYPE@ @MCA_MODULE_NAME@ module $version_string"
|
||||
lam_show_subtitle "Initialization, setup"
|
||||
|
||||
#
|
||||
|
@ -244,6 +244,42 @@ foreach my $key (sort keys(%config_param_names)) {
|
||||
|
||||
}
|
||||
|
||||
# Do some error checking on the values that we've determined
|
||||
|
||||
if (! -f $config_params{PARAM_INIT_FILE}) {
|
||||
print "*** WARNING: PARAM_INIT_FILE does not exist:\n";
|
||||
print "*** WARNING: $config_params{PARAM_INIT_FILE}\n";
|
||||
print "*** WARNING: resulting configure script will not run properly!\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ($config_params{PARAM_INIT_FILE} eq "" ||
|
||||
! -f $config_params{PARAM_INIT_FILE}) {
|
||||
print "*** WARNING: PARAM_VERSION_FILE does not exit:\n";
|
||||
print "*** WARNING: $config_params{PARAM_VERSION_FILE} does not exist!\n";
|
||||
print "*** WARNING: resulting configure script will not check for the version!!\n";
|
||||
}
|
||||
|
||||
my @files = split(/ /, $config_params{PARAM_CONFIG_FILES});
|
||||
foreach my $file (@files) {
|
||||
if (! -f "$file.in" && ! -f "$file.am") {
|
||||
print "*** WARNING: PARAM_CONFIG_FILES file does not exist:\n";
|
||||
print "*** WARNING: $file.[in|am]\n";
|
||||
print "*** WARNING: resulting configure script may not run correctly!!\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (! -d $config_params{PARAM_CONFIG_AUX_DIR}) {
|
||||
print "*** WARNING: PARAM_CONFIG_AUX_DIR does not exit:\n";
|
||||
print "*** WARNING: $config_params{PARAM_CONFIG_AUX_DIR}\n";
|
||||
print "*** WARNING: Taking the liberty of trying to make it...\n";
|
||||
if (mkdir($config_params{PARAM_CONFIG_AUX_DIR})) {
|
||||
printf("BARF\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
############################################################################
|
||||
# Read in the configure.ac template
|
||||
############################################################################
|
||||
@ -312,3 +348,5 @@ make_template("$lam_topdir/config/mca_acinclude.m4",
|
||||
############################################################################
|
||||
|
||||
print "\n$announce_str finished\n";
|
||||
|
||||
exit(0);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user