source: trunk/test/gen_libmy_static.sh @ 3110

Last change on this file since 3110 was 3110, checked in by Peter, 8 years ago

Fix test of YAT_LT_LINK_IFELSE. The macro/linking worked also against
static library, which is unexpected. When I modified to an library
with more symbols (libyat) I get the error: "relocation..." as
expected. refs #737.

configure.ac: AC_SUBST lt_vc_objdir from libtool
test/defs.sh.in: define dito
test/gen_libmy_static.sh: copy libyat.a rather than creating a small libmy-static.a from scratch.
yat_lt_link_la_ifelse_test.sh: link against theplu::yat::utility::version(void) as libmy-static now just is a alias for libyat.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1# $Id: gen_libmy_static.sh 3110 2013-11-09 23:42:16Z peter $
2
3# Create a static library: test/lib/libmy-static.a
4
5# Copyright (C) 2013 Peter Johansson
6#
7# This file is part of the yat library, http://dev.thep.lu.se/yat
8#
9# The yat library is free software; you can redistribute it
10# and/or modify it under the terms of the GNU General Public License as
11# published by the Free Software Foundation; either version 3 of the
12# License, or (at your option) any later version.
13#
14# The yat library is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17# General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with yat. If not, see <http://www.gnu.org/licenses/>.
21
22. test/defs.sh || exit 99
23
24rm -rf $test_dir/*
25$mkdir_p $test_dir
26cd $test_dir
27
28# redefine so we can call check_requirements without exit
29exit_skip ()
30{
31    req_failed=yes
32}
33
34required="static"
35check_requirements > stdout 2> stderr
36
37# if requirements are misssing we just create an empty dummy file (to
38# avoid triggering the make target over and over again)
39if test x$req_failed = xyes; then
40    $mkdir_p $abs_top_builddir/test/lib
41    : > $abs_top_builddir/test/lib/libmy-static.a
42    exit 0
43fi
44
45# include to get variable $old_library
46. $abs_top_builddir/yat/libyat.la
47test x"${old_library}" != x"" || exit 1
48
49cp $abs_top_builddir/yat/${lt_cv_objdir}/${old_library} \
50$abs_top_builddir/test/lib/libmy-static.a
51exit 0
Note: See TracBrowser for help on using the repository browser.