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