#! /bin/sh # # $Id$ # # Copyright 1989-2016 MINES ParisTech # # This file is part of PIPS. # # PIPS 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 3 of the License, or # any later version. # # PIPS 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 PIPS. If not, see . # # Remi Triolet, Francois Irigoin, Corinne Ancourt, Fabien Coelho USAGE="Usage: $0 [-p|a]\n create couples (function library) of uses and definitions for all libraries\n used in PIPS (default option -a), including Linear and NewGen, or for\n all PIPS libraries (option -p)" tmpdir=${PIPS_TEMPDIR:-/tmp} LIBS="$PIPS_ROOT/lib/$PIPS_ARCH/*.a $NEWGEN_ROOT/lib/$PIPS_ARCH/*.a $LINEAR_ROOT/lib/$PIPS_ARCH/*.a" while getopts ap opt do case $opt in p) LIBS="$PIPS_ROOT/lib/$PIPS_ARCH/*.a";; a) ;; *) echo $USAGE >&2 exit 2;; esac done nm -go $LIBS | fgrep " T " | sed 's/:.* / /;s/^\/.*\///' | awk '{ print $2 , $1}' | sort > $tmpdir/libs.d nm -go $LIBS | fgrep " U " | sed 's/:.* / /;s/^\/.*\///' | awk '{ print $2 , $1}' | sort > $tmpdir/libs.u join $tmpdir/libs.u $tmpdir/libs.d > $tmpdir/libs.j # that is all #