head	1.2;
access;
symbols
	release_4_2:1.2
	aix_ok:1.1;
locks; strict;
comment	@# @;


1.2
date	94.03.13.04.59.12;	author aoki;	state Exp;
branches;
next	1.1;

1.1
date	93.09.28.01.49.01;	author aoki;	state Exp;
branches;
next	;


desc
@creates .exp (object symbol export) files
@


1.2
log
@stick in exit 1; in usage!
@
text
@#!/bin/sh
#
# mkldexport
#	create an AIX exports file from an object file
#
# Usage:
#	mkldexport objectfile [location]
# where
#	objectfile is the current location of the object file.
#	location is the eventual (installed) location of the 
#		object file (if different from the current
#		working directory).
#
# $Header: /faerie/aoki/postgres/src/tools/mkldexport/RCS/mkldexport.sh,v 1.1 1993/09/28 01:49:01 aoki Exp aoki $
#
CMDNAME=`basename $0`
if [ -z "$1" ]; then
	echo "Usage: $CMDNAME object [location]"
	exit 1
fi
OBJNAME=`basename $1`
if [ "`basename $OBJNAME`" != "`basename $OBJNAME .o`" ]; then
	OBJNAME=`basename $OBJNAME .o`.so
fi
if [ -z "$2" ]; then
	echo '#!'
else
	echo '#!' $2/$OBJNAME
fi
/usr/ucb/nm -g $1 | \
	egrep ' [TD] ' | \
	sed -e 's/.* //' | \
	egrep -v '\$' | \
	sed -e 's/^[.]//' | \
	sort | \
	uniq
@


1.1
log
@Initial revision
@
text
@d3 2
a4 1
# $Header$
d6 10
d19 1
@
