tests: migrate legacy tests/depdemo tests to Autotest.
* tests/depdemo.at: New autotest groups, based on...
* tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
tests/depdemo-shared.test, tests/depdemo-static-exec.test,
tests/depdemo-static-inst.test, tests/depdemo-static-make.test,
tests/depdemo-static-unst.test, tests/depdemo-static.test,
tests/depdemo-unst.test: ...these legacy test cases, now
removed.
* tests/depdemo/Makefile.am, tests/depdemo/README,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/depdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 21:03:59 +08:00
|
|
|
# depdemo.at -- Library interdependencies -*- Autotest -*-
|
|
|
|
#
|
2022-02-09 02:11:10 +08:00
|
|
|
# Copyright (C) 2003-2004, 2011-2019, 2021-2022 Free Software
|
|
|
|
# Foundation, Inc.
|
tests: migrate legacy tests/depdemo tests to Autotest.
* tests/depdemo.at: New autotest groups, based on...
* tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
tests/depdemo-shared.test, tests/depdemo-static-exec.test,
tests/depdemo-static-inst.test, tests/depdemo-static-make.test,
tests/depdemo-static-unst.test, tests/depdemo-static.test,
tests/depdemo-unst.test: ...these legacy test cases, now
removed.
* tests/depdemo/Makefile.am, tests/depdemo/README,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/depdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 21:03:59 +08:00
|
|
|
# Written by Gary V. Vaughan, 2003
|
|
|
|
#
|
|
|
|
# This file is part of GNU Libtool.
|
|
|
|
#
|
|
|
|
# GNU Libtool is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License as
|
|
|
|
# published by the Free Software Foundation; either version 2 of
|
|
|
|
# the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# GNU Libtool is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with GNU Libtool; see the file COPYING. If not, a copy
|
|
|
|
# can be downloaded from http://www.gnu.org/licenses/gpl.html,
|
|
|
|
# or obtained by writing to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
####
|
|
|
|
|
|
|
|
|
|
|
|
AT_BANNER([Library interdependencies.])
|
|
|
|
|
|
|
|
## ------------------------------------------- ##
|
|
|
|
## Some functions shared by later tests cases. ##
|
|
|
|
## ------------------------------------------- ##
|
|
|
|
|
|
|
|
func_restore_files ()
|
|
|
|
{
|
|
|
|
test "`echo _fnord/temp/libs/*`" = "_fnord/temp/libs/*" \
|
|
|
|
|| mv -f _fnord/temp/libs/* "l3/$objdir"
|
|
|
|
mv -f "_fnord/temp/libl3.la" "l3"
|
|
|
|
test -f "_fnord/temp/lt-depdemo$EXEEXT" \
|
|
|
|
&& mv -f "_fnord/temp/lt-depdemo$EXEEXT" "$objdir"
|
|
|
|
test -f "_fnord/temp/depdemo$EXEEXT" \
|
|
|
|
&& mv -f "_fnord/temp/depdemo$EXEEXT" "$objdir"
|
|
|
|
rm -rf "_fnord"
|
|
|
|
}
|
|
|
|
|
|
|
|
func_save_files ()
|
|
|
|
{
|
|
|
|
test -n "$objdir" || exit 1
|
|
|
|
$lt_INSTALL -d "_fnord/temp/libs"
|
|
|
|
test -f "$objdir/lt-depdemo$EXEEXT" \
|
|
|
|
&& cp -f "$objdir/lt-depdemo$EXEEXT" "_fnord/temp"
|
|
|
|
test -f "$objdir/depdemo$EXEEXT" \
|
|
|
|
&& cp -f "$objdir/depdemo$EXEEXT" "_fnord/temp"
|
|
|
|
cp -f l3/libl3.la "_fnord/temp"
|
|
|
|
cp -f l3/"$objdir"/* "_fnord/temp/libs"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# _LT_SETUP
|
|
|
|
# ---------
|
|
|
|
m4_define([_LT_SETUP],
|
|
|
|
[AT_DATA([configure.ac],
|
|
|
|
[[AC_INIT([depdemo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
|
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
libtoolize: migrate to new AC_CONFIG_MACRO_DIRS api.
* libtoolize.in (func_install_pkgmacro_files): Uee
AC_CONFIG_MACRO_DIRS.
(func_check_macros): Advise using AC_CONFIG_MACRO_DIRS.
(require_ac_macro_dir): Give priority to AC_CONFIG_MACRO_DIRS.
(require_macro_dir): Likewise.
* bootstrap: Give priority to AC_CONFIG_MACRO_DIRS.
* configure.ac: Define dummy AC_CONFIG_MACRO_DIRS for older
Autotools, that is allow bootstrap with current release versions.
Use AC_CONFIG_MACRO_DIRS instead of AC_CONFIG_MACRO_DIR.
* tests/testsuite.at: Source build-aux/extract-trace for access
to func_extract_trace.
(LT_AT_ACLOCAL): Use it to get the AC_CONFIG_MACRO_DIRS argument
to pass manually to aclocal for compatibility with old Automake.
Add a fallback AC_CONFIG_MACRO_DIRS definition to acinclude.m4
in the test directory.
(LT_AT_AUTORECONF): Likewise.
* tests/cdemo.at, tests/configure-iface.at, tests/darwin.at,
tests/demo.at, tests/depdemo.at, tests/early-libtool.at,
tests/libtoolize.at, tests/mdemo.at, tests/no-executables.at,
tests/nonrecursive.at, tests/old-ltdl-iface.at,
tests/recursive.at, tests/subproject.at, tests/tagdemo.at,
tests/template.at: Likewise.
* doc/libtool.texi: Update.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-18 21:37:03 +08:00
|
|
|
AC_CONFIG_MACRO_DIRS([m4])
|
tests: migrate legacy tests/depdemo tests to Autotest.
* tests/depdemo.at: New autotest groups, based on...
* tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
tests/depdemo-shared.test, tests/depdemo-static-exec.test,
tests/depdemo-static-inst.test, tests/depdemo-static-make.test,
tests/depdemo-static-unst.test, tests/depdemo-static.test,
tests/depdemo-unst.test: ...these legacy test cases, now
removed.
* tests/depdemo/Makefile.am, tests/depdemo/README,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/depdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 21:03:59 +08:00
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
AC_PROG_CC
|
|
|
|
|
|
|
|
LT_INIT([win32-dll])
|
|
|
|
AC_SUBST([LIBTOOL_DEPS])
|
|
|
|
STATIC=
|
|
|
|
test yes = "$enable_static" && STATIC=-static
|
|
|
|
AC_SUBST([STATIC])
|
|
|
|
|
|
|
|
LT_LIB_M
|
|
|
|
AC_CONFIG_FILES([Makefile l1/Makefile l2/Makefile l3/Makefile l4/Makefile])
|
|
|
|
AC_CONFIG_HEADERS([config.h:config.in.h])
|
|
|
|
AC_OUTPUT
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA([Makefile.am],
|
|
|
|
[[AUTOMAKE_OPTIONS = no-dependencies foreign
|
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
|
|
|
SUBDIRS = l1 l2 l3 l4
|
|
|
|
|
|
|
|
bin_PROGRAMS = depdemo depdemo_static
|
|
|
|
|
|
|
|
depdemo_SOURCES = main.c
|
|
|
|
depdemo_LDADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la \
|
|
|
|
$(top_builddir)/l4/libl4.la
|
|
|
|
depdemo_DEPENDENCIES = $(top_builddir)/l1/libl1.la \
|
|
|
|
$(top_builddir)/l2/libl2.la $(top_builddir)/l4/libl4.la
|
|
|
|
|
|
|
|
depdemo_static_SOURCES = $(depdemo_SOURCES)
|
|
|
|
depdemo_static_LDADD = $(depdemo_LDADD)
|
|
|
|
depdemo_static_DEPENDENCIES = $(depdemo_DEPENDENCIES)
|
|
|
|
depdemo_static_LDFLAGS = $(STATIC)
|
|
|
|
|
|
|
|
libtool: $(LIBTOOL_DEPS)
|
|
|
|
$(SHELL) ./config.status --recheck
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA([main.c],
|
|
|
|
[[#include <config.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "l1/l1.h"
|
|
|
|
#include "l2/l2.h"
|
|
|
|
#include "l4/l4.h"
|
|
|
|
|
|
|
|
#define STREQ !strcmp
|
|
|
|
|
|
|
|
int main (int argc, char **argv)
|
|
|
|
{
|
|
|
|
printf("dependencies:\n");
|
|
|
|
func_l1(0);
|
|
|
|
func_l2(0);
|
|
|
|
func_l4(0);
|
|
|
|
if (argc == 2 && STREQ (argv[1], "-alt")
|
|
|
|
&& var_l1 + var_l2 + var_l4 == 8)
|
|
|
|
return 0;
|
|
|
|
printf("var_l1(%d) + var_l2(%d) + var_l4(%d) == %d\n",
|
|
|
|
var_l1,var_l2,var_l4, var_l1 + var_l2 + var_l4);
|
|
|
|
if (var_l1 + var_l2 + var_l4 != 19)
|
|
|
|
{
|
|
|
|
printf("var_l1(%d) + var_l2(%d) + var_l4(%d) != 19\n",
|
|
|
|
var_l1,var_l2,var_l4);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
]])
|
|
|
|
|
|
|
|
# Create 4 directorys of mostly identical files.
|
|
|
|
for i in 1 2 3 4; do
|
|
|
|
mkdir l$i
|
|
|
|
|
|
|
|
# l$i/Makefile.am:
|
|
|
|
{
|
|
|
|
$ECHO 'AUTOMAKE_OPTIONS = no-dependencies foreign'
|
|
|
|
$ECHO 'AM_CPPFLAGS = -I$(top_srcdir) -DBUILDING_LIBL'$i
|
|
|
|
$ECHO 'lib_LTLIBRARIES = libl'$i'.la'
|
|
|
|
$ECHO 'libl'$i'_la_SOURCES = l'$i'.c l'$i'.h'
|
|
|
|
$ECHO 'libl'$i'_la_LDFLAGS = -no-undefined'
|
|
|
|
$ECHO 'libl'$i'_la_LIBADD ='
|
|
|
|
if test 4 != $i; then
|
|
|
|
j=1; while test "$j" -lt "$i"; do
|
|
|
|
$ECHO 'libl'$i'_la_LIBADD += $(top_builddir)/l'$j'/libl'$j'.la'
|
|
|
|
j=`expr 1 + $j`
|
|
|
|
done
|
|
|
|
else
|
|
|
|
j=3
|
|
|
|
$ECHO 'libl'$i'_la_LIBADD += $(top_builddir)/l'$j'/libl'$j'.la $(LIBM)'
|
|
|
|
fi
|
|
|
|
} > l$i/Makefile.am
|
|
|
|
|
|
|
|
# l$i/l$i.h
|
|
|
|
[{
|
|
|
|
$ECHO '#ifndef L'$i'_H'
|
|
|
|
$ECHO '#define L'$i'_H'
|
|
|
|
$ECHO
|
|
|
|
$ECHO '#if (defined _WIN32 || defined _WIN32_WCE) && !defined __GNUC__'
|
|
|
|
$ECHO '# ifdef BUILDING_LIBL'$i
|
|
|
|
$ECHO '# ifdef DLL_EXPORT'
|
|
|
|
$ECHO '# define LIBL'$i'_SCOPE extern __declspec (dllexport)'
|
|
|
|
$ECHO '# endif'
|
|
|
|
$ECHO '# else'
|
|
|
|
$ECHO '# define LIBL'$i'_SCOPE extern __declspec (dllimport)'
|
|
|
|
$ECHO '# endif'
|
|
|
|
$ECHO '#endif'
|
|
|
|
$ECHO '#ifndef LIBL'$i'_SCOPE'
|
|
|
|
$ECHO '# define LIBL'$i'_SCOPE extern'
|
|
|
|
$ECHO '#endif'
|
|
|
|
$ECHO
|
|
|
|
$ECHO '#ifdef __cplusplus'
|
|
|
|
$ECHO 'extern "C" {'
|
|
|
|
$ECHO '#endif'
|
|
|
|
$ECHO
|
|
|
|
$ECHO ' LIBL'$i'_SCOPE int var_l'$i';'
|
|
|
|
$ECHO ' int func_l'$i' (int);'
|
|
|
|
$ECHO
|
|
|
|
$ECHO '#ifdef __cplusplus'
|
|
|
|
$ECHO '}'
|
|
|
|
$ECHO '#endif'
|
|
|
|
$ECHO '#endif'
|
|
|
|
}] > l$i/l$i.h
|
|
|
|
|
|
|
|
# l$i/l$i.c:
|
|
|
|
{
|
|
|
|
if test 4 -ne $i; then
|
|
|
|
$ECHO '#include <config.h>'
|
|
|
|
$ECHO '#include <stdio.h>'
|
|
|
|
$ECHO
|
|
|
|
$ECHO '#include "l'$i'/l'$i'.h"'
|
|
|
|
j=1; while test "$j" -lt "$i"; do
|
|
|
|
$ECHO '#include "l'$j'/l'$j'.h"'
|
|
|
|
j=`expr 1 + $j`
|
|
|
|
done
|
|
|
|
$ECHO
|
|
|
|
$ECHO 'int var_l'$i' = 0;'
|
|
|
|
$ECHO 'int func_l'$i' (int indent) {'
|
|
|
|
$ECHO ' int i;'
|
|
|
|
$ECHO ' for (i = 0; i < indent; i++)'
|
|
|
|
$ECHO " putchar (' ');"
|
|
|
|
$ECHO ' printf ("l'$i' (%i)\n", var_l'$i');'
|
|
|
|
if test 1 -eq $i; then
|
|
|
|
$ECHO ' var_l1++;'
|
|
|
|
else
|
|
|
|
j=1; while test "$j" -lt "$i"; do
|
|
|
|
$ECHO ' func_l'$j'(indent+1);'
|
|
|
|
$ECHO ' var_l'$i' += var_l'$j';'
|
|
|
|
j=`expr 1 + $j`
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
$ECHO ' return 0;'
|
|
|
|
$ECHO '}'
|
|
|
|
else
|
|
|
|
j=3
|
|
|
|
$ECHO '#include <config.h>'
|
|
|
|
$ECHO '#include <stdio.h>'
|
|
|
|
$ECHO '#include <math.h>'
|
|
|
|
$ECHO '#include "l'$i'/l'$i'.h"'
|
|
|
|
$ECHO '#include "l'$j'/l'$j'.h"'
|
|
|
|
$ECHO
|
|
|
|
$ECHO 'int var_l'$i' = 0;'
|
|
|
|
$ECHO 'int func_l'$i' (int indent) {'
|
|
|
|
$ECHO ' int i;'
|
|
|
|
$ECHO ' for (i = 0; i < indent; i++)'
|
|
|
|
$ECHO " putchar (' ');"
|
|
|
|
$ECHO ' printf ("l'$i' (%i)\n", var_l'$i');'
|
|
|
|
$ECHO ' func_l'$j'(indent+1);'
|
|
|
|
$ECHO ' for (i = 0; i < indent; i++)'
|
|
|
|
$ECHO " putchar (' ');"
|
|
|
|
$ECHO ' printf("libm [cos (0.0) = %g]\n", (double) cos ((double) 0.0));'
|
|
|
|
$ECHO ' var_l'$i' += var_l'$j';'
|
|
|
|
$ECHO ' return 0;'
|
|
|
|
$ECHO '}'
|
|
|
|
fi
|
|
|
|
} > l$i/l$i.c
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2012-10-06 03:31:33 +08:00
|
|
|
LT_AT_HOST_DATA([expout],
|
tests: migrate legacy tests/depdemo tests to Autotest.
* tests/depdemo.at: New autotest groups, based on...
* tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
tests/depdemo-shared.test, tests/depdemo-static-exec.test,
tests/depdemo-static-inst.test, tests/depdemo-static-make.test,
tests/depdemo-static-unst.test, tests/depdemo-static.test,
tests/depdemo-unst.test: ...these legacy test cases, now
removed.
* tests/depdemo/Makefile.am, tests/depdemo/README,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/depdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 21:03:59 +08:00
|
|
|
[[dependencies:
|
|
|
|
l1 (0)
|
|
|
|
l2 (0)
|
|
|
|
l1 (1)
|
|
|
|
l4 (0)
|
|
|
|
l3 (0)
|
|
|
|
l1 (2)
|
|
|
|
l2 (2)
|
|
|
|
l1 (3)
|
|
|
|
libm cos (0.0) = 1
|
|
|
|
var_l1(4) + var_l2(6) + var_l4(9) == 19
|
|
|
|
]])
|
|
|
|
|
2014-10-30 21:13:21 +08:00
|
|
|
prefix=`pwd`/_inst
|
tests: migrate legacy tests/depdemo tests to Autotest.
* tests/depdemo.at: New autotest groups, based on...
* tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
tests/depdemo-shared.test, tests/depdemo-static-exec.test,
tests/depdemo-static-inst.test, tests/depdemo-static-make.test,
tests/depdemo-static-unst.test, tests/depdemo-static.test,
tests/depdemo-unst.test: ...these legacy test cases, now
removed.
* tests/depdemo/Makefile.am, tests/depdemo/README,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/depdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 21:03:59 +08:00
|
|
|
]) # _LT_SETUP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# _LT_CHECK_EXECUTE([TARGETS])
|
|
|
|
# ----------------------------
|
|
|
|
# Run the listed make rules, and check that the built binaries work.
|
|
|
|
m4_define([_LT_CHECK_EXECUTE],
|
|
|
|
[LT_AT_CHECK_EXECUTE([$1],
|
|
|
|
[./depdemo_static], [./depdemo])
|
|
|
|
])
|
|
|
|
|
|
|
|
# _LT_CHECK_INSTALL
|
|
|
|
# -----------------
|
|
|
|
# Run the make install rule, and check that installed binaries work too.
|
|
|
|
m4_define([_LT_CHECK_INSTALL],
|
|
|
|
[# Windows hosts search for dlls in the command path.
|
2014-10-30 21:13:21 +08:00
|
|
|
PATH=$prefix/lib:$PATH
|
tests: migrate legacy tests/depdemo tests to Autotest.
* tests/depdemo.at: New autotest groups, based on...
* tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
tests/depdemo-shared.test, tests/depdemo-static-exec.test,
tests/depdemo-static-inst.test, tests/depdemo-static-make.test,
tests/depdemo-static-unst.test, tests/depdemo-static.test,
tests/depdemo-unst.test: ...these legacy test cases, now
removed.
* tests/depdemo/Makefile.am, tests/depdemo/README,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/depdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 21:03:59 +08:00
|
|
|
LT_AT_CHECK_EXECUTE([install],
|
2014-10-30 21:13:21 +08:00
|
|
|
[$prefix/bin/depdemo_static], [$prefix/bin/depdemo])
|
tests: migrate legacy tests/depdemo tests to Autotest.
* tests/depdemo.at: New autotest groups, based on...
* tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
tests/depdemo-shared.test, tests/depdemo-static-exec.test,
tests/depdemo-static-inst.test, tests/depdemo-static-make.test,
tests/depdemo-static-unst.test, tests/depdemo-static.test,
tests/depdemo-unst.test: ...these legacy test cases, now
removed.
* tests/depdemo/Makefile.am, tests/depdemo/README,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/depdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 21:03:59 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
## --------------- ##
|
|
|
|
## Depdemo static. ##
|
|
|
|
## --------------- ##
|
|
|
|
|
|
|
|
AT_SETUP([static library interdependencies])
|
|
|
|
|
|
|
|
_LT_SETUP
|
|
|
|
|
|
|
|
LT_AT_CHECK_CONFIG([--disable-shared],
|
|
|
|
[^build_old_libs=yes], [^build_libtool_libs=no])
|
|
|
|
_LT_CHECK_EXECUTE
|
|
|
|
_LT_CHECK_INSTALL
|
|
|
|
LT_AT_CHECK_UNINSTALL
|
|
|
|
|
|
|
|
AT_CLEANUP
|
|
|
|
|
|
|
|
|
|
|
|
## --------------- ##
|
|
|
|
## Depdemo shared. ##
|
|
|
|
## --------------- ##
|
|
|
|
|
|
|
|
AT_SETUP([shared library interdependencies])
|
|
|
|
|
|
|
|
_LT_SETUP
|
|
|
|
|
|
|
|
LT_AT_CHECK_CONFIG([--disable-static],
|
|
|
|
[^build_old_libs=no], [^build_libtool_libs=yes])
|
|
|
|
_LT_CHECK_EXECUTE
|
|
|
|
_LT_CHECK_INSTALL
|
|
|
|
LT_AT_CHECK_UNINSTALL
|
|
|
|
|
|
|
|
AT_CLEANUP
|
|
|
|
|
|
|
|
|
|
|
|
## ------------- ##
|
|
|
|
## Depdemo conf. ##
|
|
|
|
## ------------- ##
|
|
|
|
|
|
|
|
AT_SETUP([shared and static interdependencies])
|
|
|
|
|
|
|
|
_LT_SETUP
|
|
|
|
|
|
|
|
LT_AT_CHECK_CONFIG([],
|
|
|
|
[^build_old_libs=yes], [^build_libtool_libs=yes])
|
|
|
|
_LT_CHECK_EXECUTE
|
|
|
|
_LT_CHECK_INSTALL
|
|
|
|
LT_AT_CHECK_UNINSTALL
|
|
|
|
|
|
|
|
AT_CLEANUP
|
|
|
|
|
|
|
|
|
|
|
|
## --------------- ##
|
|
|
|
## Depdemo nofast. ##
|
|
|
|
## --------------- ##
|
|
|
|
|
|
|
|
AT_SETUP([disable fast install])
|
|
|
|
|
|
|
|
_LT_SETUP
|
|
|
|
|
|
|
|
LT_AT_CHECK_CONFIG([--enable-fast-install=no])
|
|
|
|
AT_CHECK([$EGREP '^hardcode_action=relink' libtool && (exit 77)], 1)
|
|
|
|
|
|
|
|
_LT_CHECK_EXECUTE
|
|
|
|
_LT_CHECK_INSTALL
|
|
|
|
LT_AT_CHECK_UNINSTALL
|
|
|
|
|
|
|
|
AT_CLEANUP
|
|
|
|
|
|
|
|
|
|
|
|
## --------------- ##
|
|
|
|
## Depdemo relink. ##
|
|
|
|
## --------------- ##
|
|
|
|
|
|
|
|
AT_SETUP([binary relinking at install time])
|
|
|
|
AT_KEYWORDS([interactive])dnl This test causes a popup on Windows
|
|
|
|
|
|
|
|
_LT_SETUP
|
|
|
|
|
|
|
|
LT_AT_CHECK_CONFIG
|
|
|
|
_LT_CHECK_EXECUTE
|
|
|
|
_LT_CHECK_INSTALL
|
|
|
|
|
|
|
|
# Check to make sure we have a dynamic library.
|
|
|
|
eval `$EGREP '^library_names=' l3/libl3.la`
|
|
|
|
AT_CHECK([test -n "$library_names" || (exit 77)])
|
|
|
|
|
|
|
|
func_save_files
|
|
|
|
|
syntax-check: fix violations and implement sc_old_style_quoting.
Modern GNU ASCII quoting in output and comments is done
'like this'.
* cfg.mk (sc_old_style_quoting): Try to catch most instances
of `old style quoting' so that it is not accidentally re-
introduced to the code.
* HACKING, Makefile.am, NEWS, PORTING, README, TODO, bootstrap,
bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/git-hooks/commit-msg, build-aux/ltmain.in,
doc/libtool.texi, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
gl/build-aux/inline-source, gl/build-aux/options-parser,
libltdl/libltdl/slist.h, libltdl/loaders/loadlibrary.c,
libltdl/ltdl.c, libltdl/slist.c, libtoolize.in, m4/argz.m4,
m4/libtool.m4, m4/ltdl.m4, m4/ltoptions.m4, m4/ltsugar.m4,
tests/cmdline_wrap.at, tests/configure-iface.at, tests/demo.at,
tests/depdemo.at, tests/deplib-in-subdir.at,
tests/deplibs-mingw.at, tests/destdir.at, tests/execute-mode.at,
tests/f77demo.at, tests/fail.at, tests/inherited_flags.at,
tests/libtool.at, tests/libtoolize.at, tests/lt_dladvise.at,
tests/lt_dlexit.at, tests/mdemo.at, tests/need_lib_prefix.at,
tests/old-ltdl-iface.at, tests/old-m4-iface.at, tests/static.at,
tests/stresstest.at, tests/testsuite.at, tests/versioning.at:
Convert to upright quotes.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-22 00:41:07 +08:00
|
|
|
# AIX 5.3 '/bin/sh' will invoke the trap for 0 at the end of a
|
tests: migrate legacy tests/depdemo tests to Autotest.
* tests/depdemo.at: New autotest groups, based on...
* tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
tests/depdemo-shared.test, tests/depdemo-static-exec.test,
tests/depdemo-static-inst.test, tests/depdemo-static-make.test,
tests/depdemo-static-unst.test, tests/depdemo-static.test,
tests/depdemo-unst.test: ...these legacy test cases, now
removed.
* tests/depdemo/Makefile.am, tests/depdemo/README,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/depdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 21:03:59 +08:00
|
|
|
# function, so we set the trap outside of a function to be portable.
|
|
|
|
trap func_restore_files 0 1 2 13 15
|
|
|
|
|
|
|
|
eval "`$LIBTOOL --config | $EGREP '^shlibpath_overrides_runpath='`"
|
|
|
|
eval "`$LIBTOOL --config | $EGREP '^hardcode_(action|direct|into_libs)='`"
|
|
|
|
|
|
|
|
# Can't finish these tests reliably when cross-compiling.
|
|
|
|
AT_CHECK([test "X$host" = "X$build" || (exit 77)])
|
|
|
|
|
|
|
|
# Allow the binary to link on-demand if need be.
|
|
|
|
./depdemo$EXEEXT >/dev/null || :
|
|
|
|
|
|
|
|
# Remove l3/libl3.la from build tree.
|
|
|
|
rm -f l3/libl3.la "l3/$objdir"/libl3.*
|
|
|
|
|
|
|
|
# Either:
|
|
|
|
# - uninstalled ./depdem will run using the just installed libraries
|
|
|
|
# when the uninstalled libs are missing;
|
|
|
|
# - on AIX 4.1, when the installed copy of libl3 is loaded, it brings
|
|
|
|
# with it the installed copies of libl1 and libl2, with disjoint
|
|
|
|
# counters var_l1 and var_l2. This is arguably unacceptable behaviour
|
|
|
|
# but definitely not enough of a reason for the test to fail;
|
|
|
|
# - or relinking at install time is necessary, and the uninstalled
|
|
|
|
# depdemo has only the uninstalled library paths hardcoded.
|
|
|
|
AT_CHECK([./depdemo$EXEEXT >/dev/null ||
|
|
|
|
./depdemo$EXEEXT -alt ||
|
|
|
|
test relink,yes = "$hardcode_action,$hardcode_direct"])
|
|
|
|
|
|
|
|
# Link an incomplete l3/libl3.la.
|
|
|
|
(cd l3 &&
|
|
|
|
LT_AT_MAKE([libl3.la], [libl3_la_OBJECTS=../l2/l2.lo])
|
|
|
|
)
|
|
|
|
AT_CHECK([test -f l3/libl3.la])
|
|
|
|
|
|
|
|
# Try running uninstalled ./depdemo with only broken libl3.la in build tree.
|
|
|
|
# If the following has normal exit status, shlibpath_overrides_runpath is
|
syntax-check: fix violations and implement sc_old_style_quoting.
Modern GNU ASCII quoting in output and comments is done
'like this'.
* cfg.mk (sc_old_style_quoting): Try to catch most instances
of `old style quoting' so that it is not accidentally re-
introduced to the code.
* HACKING, Makefile.am, NEWS, PORTING, README, TODO, bootstrap,
bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/git-hooks/commit-msg, build-aux/ltmain.in,
doc/libtool.texi, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
gl/build-aux/inline-source, gl/build-aux/options-parser,
libltdl/libltdl/slist.h, libltdl/loaders/loadlibrary.c,
libltdl/ltdl.c, libltdl/slist.c, libtoolize.in, m4/argz.m4,
m4/libtool.m4, m4/ltdl.m4, m4/ltoptions.m4, m4/ltsugar.m4,
tests/cmdline_wrap.at, tests/configure-iface.at, tests/demo.at,
tests/depdemo.at, tests/deplib-in-subdir.at,
tests/deplibs-mingw.at, tests/destdir.at, tests/execute-mode.at,
tests/f77demo.at, tests/fail.at, tests/inherited_flags.at,
tests/libtool.at, tests/libtoolize.at, tests/lt_dladvise.at,
tests/lt_dlexit.at, tests/mdemo.at, tests/need_lib_prefix.at,
tests/old-ltdl-iface.at, tests/old-m4-iface.at, tests/static.at,
tests/stresstest.at, tests/testsuite.at, tests/versioning.at:
Convert to upright quotes.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-22 00:41:07 +08:00
|
|
|
# wrong, and should be set to 'no' on this host.
|
|
|
|
# The unusual '|| (exit 1)' is to normalize all non-zero exit statuses.
|
tests: migrate legacy tests/depdemo tests to Autotest.
* tests/depdemo.at: New autotest groups, based on...
* tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
tests/depdemo-shared.test, tests/depdemo-static-exec.test,
tests/depdemo-static-inst.test, tests/depdemo-static-make.test,
tests/depdemo-static-unst.test, tests/depdemo-static.test,
tests/depdemo-unst.test: ...these legacy test cases, now
removed.
* tests/depdemo/Makefile.am, tests/depdemo/README,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/depdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 21:03:59 +08:00
|
|
|
AT_CHECK([./depdemo$EXEEXT || (exit 1)], 1, [ignore], [ignore])
|
|
|
|
|
|
|
|
test relink = "$hardcode_action" ||
|
|
|
|
test yes = "$shlibpath_overrides_runpath" ||
|
|
|
|
{
|
|
|
|
AT_CHECK([rm -f $objdir/lt-depdemo$EXEEXT])
|
|
|
|
AT_CHECK([cp $objdir/depdemo$EXEEXT $objdir/lt-depdemo$EXEEXT])
|
|
|
|
|
|
|
|
# Running depdemo with installed libl3.la.
|
|
|
|
# If the following check fails, then shlibpath_overrides_runpath is
|
syntax-check: fix violations and implement sc_old_style_quoting.
Modern GNU ASCII quoting in output and comments is done
'like this'.
* cfg.mk (sc_old_style_quoting): Try to catch most instances
of `old style quoting' so that it is not accidentally re-
introduced to the code.
* HACKING, Makefile.am, NEWS, PORTING, README, TODO, bootstrap,
bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/git-hooks/commit-msg, build-aux/ltmain.in,
doc/libtool.texi, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
gl/build-aux/inline-source, gl/build-aux/options-parser,
libltdl/libltdl/slist.h, libltdl/loaders/loadlibrary.c,
libltdl/ltdl.c, libltdl/slist.c, libtoolize.in, m4/argz.m4,
m4/libtool.m4, m4/ltdl.m4, m4/ltoptions.m4, m4/ltsugar.m4,
tests/cmdline_wrap.at, tests/configure-iface.at, tests/demo.at,
tests/depdemo.at, tests/deplib-in-subdir.at,
tests/deplibs-mingw.at, tests/destdir.at, tests/execute-mode.at,
tests/f77demo.at, tests/fail.at, tests/inherited_flags.at,
tests/libtool.at, tests/libtoolize.at, tests/lt_dladvise.at,
tests/lt_dlexit.at, tests/mdemo.at, tests/need_lib_prefix.at,
tests/old-ltdl-iface.at, tests/old-m4-iface.at, tests/static.at,
tests/stresstest.at, tests/testsuite.at, tests/versioning.at:
Convert to upright quotes.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-22 00:41:07 +08:00
|
|
|
# wrong, and should be set to 'yes' on this host.
|
tests: migrate legacy tests/depdemo tests to Autotest.
* tests/depdemo.at: New autotest groups, based on...
* tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
tests/depdemo-shared.test, tests/depdemo-static-exec.test,
tests/depdemo-static-inst.test, tests/depdemo-static-make.test,
tests/depdemo-static-unst.test, tests/depdemo-static.test,
tests/depdemo-unst.test: ...these legacy test cases, now
removed.
* tests/depdemo/Makefile.am, tests/depdemo/README,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/depdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 21:03:59 +08:00
|
|
|
LT_AT_CHECK([./depdemo], 0, [expout])
|
|
|
|
}
|
|
|
|
|
|
|
|
# Undo the effect of the previous 'trap' command. Some shellology:
|
|
|
|
# We cannot use "trap - 0 1 2 3 13 15", because Solaris sh would attempt to
|
|
|
|
# execute the command "-". "trap '' ..." is fine only for signal 0 (= normal
|
|
|
|
# exit); for the others we need to call 'exit' explicitly. The value of $? is
|
|
|
|
# 128 + signal number and is set before the trap-registered command is run.
|
|
|
|
trap '' 0
|
|
|
|
trap 'func_exit $?' 1 2 3 13 15
|
|
|
|
|
|
|
|
AT_CLEANUP
|