2007-06-04 11:01:11 +08:00
|
|
|
# dmacks.at -- test for dmacks bug -*- Autotest -*-
|
|
|
|
#
|
2024-01-12 14:35:32 +08:00
|
|
|
# Copyright (C) 2007-2008, 2010-2019, 2021-2024 Free Software
|
2022-02-09 02:11:10 +08:00
|
|
|
# Foundation, Inc.
|
2007-06-04 11:01:11 +08:00
|
|
|
# Written by Peter O'Gorman, 2007
|
|
|
|
#
|
|
|
|
# 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
|
libtool: FSF office address replaced by URL
* AUTHORS, HACKING, Makefile.am, bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/no-bogus-m4-defines, cfg.mk, configure.ac, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__argz_.h,
libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h,
libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h,
libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h,
libltdl/libltdl/lt_system.h, libltdl/libltdl/slist.h,
libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c,
libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c,
libltdl/loaders/loadlibrary.c, libltdl/loaders/preopen.c,
libltdl/loaders/shl_load.c, libltdl/lt__alloc.c, libltdl/lt__argz.c,
libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c,
libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, libltdl/ltdl.mk,
libltdl/slist.c, tests/am-subdir.at, tests/archive-in-archive.at,
tests/bindir.at, tests/bug_62343.at, tests/cdemo.at, tests/cmdline_wrap.at,
tests/configure-funcs.at, tests/configure-iface.at, tests/convenience.at,
tests/ctor.at, tests/cwrapper.at, tests/darwin.at, tests/demo.at,
tests/depdemo.at, tests/deplib-in-subdir.at, tests/deplibs-ident.at,
tests/deplibs-mingw.at, tests/destdir.at, tests/dlloader-api.at,
tests/dumpbin-symbols.at, tests/duplicate_conv.at, tests/duplicate_deps.at,
tests/duplicate_members.at, tests/early-libtool.at, tests/exceptions.at,
tests/execute-mode.at, tests/exeext.at, tests/export-def.at,
tests/export.at, tests/f77demo.at, tests/fail.at, tests/fcdemo.at,
tests/flags.at, tests/help.at, tests/indirect_deps.at, tests/infer-tag.at,
tests/inherited_flags.at, tests/install.at, tests/lalib-syntax.at,
tests/libtool.at, tests/libtoolize.at, tests/link-order.at,
tests/link-order2.at, tests/loadlibrary.at, tests/localization.at,
tests/lt_dladvise.at, tests/lt_dlexit.at, tests/lt_dlopen.at,
tests/lt_dlopen_a.at, tests/lt_dlopenext.at, tests/ltdl-api.at,
tests/ltdl-libdir.at, tests/mdemo.at, tests/need_lib_prefix.at,
tests/no-executables.at, tests/nocase.at, tests/nonrecursive.at,
tests/old-m4-iface.at, tests/pic_flag.at, tests/recursive.at,
tests/resident.at, tests/runpath-in-lalib.at, tests/search-path.at,
tests/shlibpath.at, tests/slist.at, tests/standalone.at, tests/static.at,
tests/stresstest.at, tests/subproject.at, tests/sysroot.at, tests/tagdemo.at,
tests/template.at, tests/testsuite.at, tests/versioning.at,
tests/with-pic.at: Replace FSF address in each file's license block with
a URL that points to licenses online hosted by GNU.
2024-09-03 23:02:46 +08:00
|
|
|
# along with GNU Libtool. If not, see <https://www.gnu.org/licenses/>.
|
2007-06-04 11:01:11 +08:00
|
|
|
####
|
|
|
|
|
|
|
|
|
|
|
|
AT_SETUP([static library contains static library])
|
|
|
|
AT_KEYWORDS([libtool])
|
|
|
|
|
2010-09-01 02:59:11 +08:00
|
|
|
# This test passes with MS lib.
|
|
|
|
AT_XFAIL_IF([case $AR in ar-lib\ * | *[[/\\]]ar-lib\ *) false;; *) :;; esac])
|
2010-08-31 17:48:28 +08:00
|
|
|
|
2007-06-04 11:01:11 +08:00
|
|
|
AT_DATA([foo.c],
|
|
|
|
[
|
|
|
|
int foo() { return 1;}
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_DATA([bar.c],
|
|
|
|
[
|
|
|
|
int bar() { return 1;}
|
|
|
|
])
|
|
|
|
|
|
|
|
thisdir=`cd . && pwd`
|
|
|
|
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo.lo foo.c
|
|
|
|
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c
|
|
|
|
$LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \
|
|
|
|
-o libfoo.la foo.lo -version-info 1:0:0 -rpath $thisdir
|
syntax-check: fix violations and implement sc_trailing_blank-non-rfc3676.
* cfg.mk (local-checks-to-fix): Move sc_trailing_blank from
here...
(local-checks-to-skip): ...to here, because otherwise it flags
valid RFC3676 signature blocks.
(sc_trailing_blank-non-rfc3676): An improved sc_trailing_blank
implementation that doesn't flag signature blocks as violations.
* Makefile.am, bootstrap.conf, doc/PLATFORMS,
libltdl/config/ltmain.m4sh, libltdl/m4/libtool.m4,
libltdl/m4/lt~obsolete.m4, tests/archive-in-archive.at,
tests/convenience.at, tests/darwin.at, tests/depdemo/l1/l1.c,
tests/depdemo/l2/l2.c, tests/depdemo/l3/l3.c,
tests/depdemo/l4/l4.c, tests/f77demo/README,
tests/f77demo/cprogram.c, tests/f77demo/foof.f,
tests/f77demo/foof2.f, tests/f77demo/foof3.f,
tests/f77demo/fprogram.f, tests/fcdemo/README,
tests/fcdemo/cprogram.c, tests/fcdemo/foof.f90,
tests/fcdemo/foof2.f90, tests/fcdemo/foof3.f90,
tests/fcdemo/fprogram.f90, tests/mdemo/README,
tests/mdemo/main.c, tests/mdemo/mlib.c, tests/objectlist.test,
tests/static.at, tests/template.at, tests/testsuite.at: Remove
trailing blanks.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-10-25 12:16:02 +08:00
|
|
|
$LIBTOOL --mode=install cp libfoo.la $thisdir
|
2010-08-31 17:48:28 +08:00
|
|
|
eval `$EGREP '^(old_library)=' < libfoo.la`
|
|
|
|
libfoo=$old_library
|
2008-02-08 14:55:07 +08:00
|
|
|
AT_CHECK([$LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \
|
2010-08-31 17:48:28 +08:00
|
|
|
-o libbar.la bar.lo $libfoo -version-info 1:0:0 -rpath $thisdir],
|
2008-02-08 14:55:07 +08:00
|
|
|
[], [ignore], [ignore])
|
|
|
|
AT_CHECK([$LIBTOOL --mode=install cp libbar.la $thisdir], [], [ignore], [ignore])
|
2010-08-31 17:48:28 +08:00
|
|
|
eval `$EGREP '^(old_library)=' < libbar.la`
|
|
|
|
libbar=$old_library
|
tests: use $GREP throughout.
Trust the user, and use $GREP from TESTS_EVVIRONMENT uniformly.
* Makefile.am (TESTS_ENVIRONMENT): Add GREP setting.
* tests/am-subdir.at, tests/archive-in-archive.at, tests/bindir.at,
tests/configure-iface.at, tests/cwrapper.at, tests/darwin.at,
tests/demo.at, tests/destdir.at, tests/dumpbin-symbols.at,
tests/early-libtool.at, tests/execute-mode.at, tests/export-def.at,
tests/export.at, tests/f77demo.at, tests/fcdemo.at, tests/flags.at,
tests/help.at, tests/inherited_flags.at, tests/install.at,
tests/lalib-syntax.at, tests/libtool.at, tests/libtoolize.at,
tests/localization.at, tests/lt_dladvise.at, tests/lt_dlopen.at,
tests/lt_dlopenext.at, tests/ltdl-api.at, tests/ltdl-libdir.at,
tests/mdemo.at, tests/old-m4-iface.at, tests/pic_flag.at,
tests/resident.at, tests/runpath-in-lalib.at, tests/search-path.at,
tests/static.at, tests/sysroot.at, tests/template.at,
tests/testsuite.at, tests/versioning.at: Replace all hardcoded grep
invocations with $GREP.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2013-10-30 12:39:06 +08:00
|
|
|
AT_CHECK([$AR -t $libbar | $GREP $libfoo],[1],[ignore],[ignore])
|
|
|
|
AT_CHECK([$AR -t $libbar | $GREP foo.$OBJEXT],[],[ignore],[ignore])
|
|
|
|
AT_CHECK([$AR -t $libbar | $GREP bar.$OBJEXT],[],[ignore],[ignore])
|
2007-06-04 11:01:11 +08:00
|
|
|
AT_CLEANUP
|