"Fossies" - the Fresh Open Source Software Archive

Member "libtool-2.4.6/tests/configure-funcs.at" (20 Jan 2015, 2550 Bytes) of package /linux/misc/libtool-2.4.6.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # configure-functions.at -- shared shell functions. -*- Autotest -*-
    2 #
    3 #   Copyright (C) 2015 Free Software Foundation, Inc.
    4 #
    5 #   This file is part of GNU Libtool.
    6 #
    7 # GNU Libtool is free software; you can redistribute it and/or
    8 # modify it under the terms of the GNU General Public License as
    9 # published by the Free Software Foundation; either version 2 of
   10 # the License, or (at your option) any later version.
   11 #
   12 # GNU Libtool is distributed in the hope that it will be useful,
   13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
   14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15 # GNU General Public License for more details.
   16 #
   17 # You should have received a copy of the GNU General Public License
   18 # along with GNU Libtool; see the file COPYING.  If not, a copy
   19 # can be downloaded from  http://www.gnu.org/licenses/gpl.html,
   20 # or obtained by writing to the Free Software Foundation, Inc.,
   21 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
   22 ####
   23 
   24 AT_BANNER([Functions shared with configure and libtool.])
   25 
   26 m4_define([_AT_FUNC_SETUP], [dnl
   27 AT_SETUP([$1 works])dnl
   28 _lt_bin=$abs_top_builddir/libtool
   29 re_begincf='^# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE'
   30 re_endcf='^# ### END FUNCTIONS SHARED WITH CONFIGURE'
   31 
   32 $ECHO '#!/bin/sh'       > "$1"
   33 $ECHO '#: ${SED=sed}'   >> "$1"
   34 $ECHO '#: ${ECHO=echo}' >> "$1"
   35 
   36 sed "1,/$re_begincf/d;/$re_endcf/,\$d" < "$_lt_bin" >> "$1"
   37 ])
   38 
   39 _AT_FUNC_SETUP([func_munge_path_list])
   40 
   41 cat <<\EOF >> func_munge_path_list
   42 for orig in "/usr/lib" " /lib /usr/lib "; do
   43   $ECHO "'$orig':"
   44   for path in "/p1:" "/p3:/p2:" ":/a1" ":/a2:/a3" "/p4::/a4" "/p6:/p5::/a5:/a6"; do
   45     old=$orig
   46     func_munge_path_list orig "$path" || exit 1
   47     $ECHO "munge ($path) = $orig"
   48   done
   49 done
   50 EOF
   51 chmod +x func_munge_path_list
   52 
   53 AT_CHECK([ECHO="$ECHO" SED="$SED" ./func_munge_path_list], [0],
   54 ['/usr/lib':
   55 munge (/p1:) = /p1 /usr/lib
   56 munge (/p3:/p2:) = /p3 /p2 /p1 /usr/lib
   57 munge (:/a1) = /p3 /p2 /p1 /usr/lib /a1
   58 munge (:/a2:/a3) = /p3 /p2 /p1 /usr/lib /a1 /a2 /a3
   59 munge (/p4::/a4) = /p4 /p3 /p2 /p1 /usr/lib /a1 /a2 /a3 /a4
   60 munge (/p6:/p5::/a5:/a6) = /p6 /p5 /p4 /p3 /p2 /p1 /usr/lib /a1 /a2 /a3 /a4 /a5 /a6
   61 ' /lib /usr/lib ':
   62 munge (/p1:) = /p1  /lib /usr/lib @&t@
   63 munge (/p3:/p2:) = /p3 /p2 /p1  /lib /usr/lib @&t@
   64 munge (:/a1) = /p3 /p2 /p1  /lib /usr/lib  /a1
   65 munge (:/a2:/a3) = /p3 /p2 /p1  /lib /usr/lib  /a1 /a2 /a3
   66 munge (/p4::/a4) = /p4 /p3 /p2 /p1  /lib /usr/lib  /a1 /a2 /a3 /a4
   67 munge (/p6:/p5::/a5:/a6) = /p6 /p5 /p4 /p3 /p2 /p1  /lib /usr/lib  /a1 /a2 /a3 /a4 /a5 /a6
   68 ], [])
   69 
   70 AT_CLEANUP