@$(SHELL) build/config_vars.sh < build/config_vars.mk > build/config_vars.out
install-build: build/config_vars.out
- @echo Installing build system files
- @$(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir)
- @for f in $(top_srcdir)/build/*.mk build/*.mk; do \
- $(INSTALL_DATA) $$f $(DESTDIR)$(installbuilddir); \
- done
- @for f in $(top_builddir)/config.nice \
- $(top_srcdir)/build/mkdir.sh \
- $(top_srcdir)/build/instdso.sh; do \
- $(INSTALL_PROGRAM) $$f $(DESTDIR)$(installbuilddir); \
- done
+ @echo Installing build system files
+ @$(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir)
+ @$(INSTALL_DATA) $(top_srcdir)/build/*.mk build/*.mk \
+ $(DESTDIR)$(installbuilddir)
+ @$(INSTALL_PROGRAM) $(top_builddir)/config.nice \
+ $(top_srcdir)/build/mkdir.sh \
+ $(top_srcdir)/build/instdso.sh \
+ $(DESTDIR)$(installbuilddir)
@$(INSTALL_DATA) build/config_vars.out $(DESTDIR)$(installbuilddir)/config_vars.mk
@rm build/config_vars.out
install-include:
@echo Installing header files
@$(MKINSTALLDIRS) $(DESTDIR)$(includedir)
- @for hdr in $(INSTALL_HEADERS); do \
- $(INSTALL_DATA) $$hdr $(DESTDIR)$(includedir); \
- done
+ @$(INSTALL_DATA) $(INSTALL_HEADERS) $(DESTDIR)$(includedir)
install-man:
@echo Installing man pages and online manual
-e) ext="$2"
shift; shift; continue
;;
- *) if [ "x$src" = "x" ]; then
- src=$1
- else
- dst=$1
- fi
- shift; continue
+ *) break
;;
esac
done
-if [ "x$src" = "x" ]; then
- echo "install.sh: no input file specified"
- exit 1
+if test $# -eq 0 ; then
+ echo "install.sh: no input file(s) specified"
+ exit 1
fi
-if [ "x$dst" = "x" ]; then
- echo "install.sh: no destination specified"
- exit 1
+if test $# -eq 1 ; then
+ echo "install.sh: no destination specified"
+ exit 1
fi
+for arg ; do
+ dstarg="$arg"
+done
-#
-# If destination is a directory, append the input filename; if
-# your system does not like double slashes in filenames, you may
-# need to add some logic
-#
-if [ -d $dst ]; then
- dst="$dst/`basename $src`"
-fi
+while test $# -gt 1 ; do
+ dst="$dstarg"
+ src="$1"
+ shift
+ #
+ # If destination is a directory, append the input filename; if
+ # your system does not like double slashes in filenames, you may
+ # need to add some logic
+ #
+ if [ -d $dst ]; then
+ dst="$dst/`basename $src`"
+ fi
+
+ # Add a possible extension (such as ".exe") to src and dst
+ src="$src$ext"
+ dst="$dst$ext"
-# Add a possible extension (such as ".exe") to src and dst
-src="$src$ext"
-dst="$dst$ext"
+ # Make a temp file name in the proper directory.
+ dstdir=`dirname $dst`
+ dsttmp=$dstdir/#inst.$$#
-# Make a temp file name in the proper directory.
-dstdir=`dirname $dst`
-dsttmp=$dstdir/#inst.$$#
+ # Move or copy the file name to the temp name
+ $instcmd $src $dsttmp
-# Move or copy the file name to the temp name
-$instcmd $src $dsttmp
+ # And set any options; do chmod last to preserve setuid bits
+ if [ "x$chowncmd" != "x" ]; then $chowncmd $dsttmp; fi
+ if [ "x$chgrpcmd" != "x" ]; then $chgrpcmd $dsttmp; fi
+ if [ "x$stripcmd" != "x" ]; then $stripcmd $dsttmp; fi
+ if [ "x$chmodcmd" != "x" ]; then $chmodcmd $dsttmp; fi
-# And set any options; do chmod last to preserve setuid bits
-if [ "x$chowncmd" != "x" ]; then $chowncmd $dsttmp; fi
-if [ "x$chgrpcmd" != "x" ]; then $chgrpcmd $dsttmp; fi
-if [ "x$stripcmd" != "x" ]; then $stripcmd $dsttmp; fi
-if [ "x$chmodcmd" != "x" ]; then $chmodcmd $dsttmp; fi
+ # Now rename the file to the real destination.
+ $rmcmd $dst
+ $mvcmd $dsttmp $dst
-# Now rename the file to the real destination.
-$rmcmd $dst
-$mvcmd $dsttmp $dst
+done
exit 0
# 2) we never want the .la files copied, so we might as well copy
# the .so files ourselves
-if test "$#" != "3"; then
- echo "wrong number of arguments to instdso.sh"
- echo "Usage: instdso.sh SH_LIBTOOL-value dso-name path-to-modules"
+if test "$#" -lt "3"; then
+ echo "too few arguments to instdso.sh"
+ echo "Usage: instdso.sh SH_LIBTOOL-value dso-name [dso-name [...]] path-to-modules"
exit 1
fi
SH_LIBTOOL=`echo $1 | sed -e 's/^SH_LIBTOOL=//'`
-DSOARCHIVE=$2
-DSOARCHIVE_BASENAME=`basename $2`
-TARGETDIR=$3
-DSOBASE=`echo $DSOARCHIVE_BASENAME | sed -e 's/\.la$//'`
-TARGET_NAME="$DSOBASE.so"
+shift
+# get last arg
+for arg ; do
+ DSOARCHIVES="$DSOARCHIVES $TARGETDIR"
+ TARGETDIR=$arg
+done
SYS=`uname -s`
# on AIX, shared libraries remain in storage even when
# all processes using them have exited; standard practice
# prior to installing a shared library is to rm -f first
- CMD="rm -f $TARGETDIR/$TARGET_NAME"
+ CMD="rm -f"
+ for DSOARCHIVE in $DSOARCHIVES ; do
+ DSOBASE=`basename $DSOARCHIVE|sed -e 's/\.la$//'`
+ CMD="$CMD $TARGETDIR/$DSOBASE.so"
+ done
echo $CMD
$CMD || exit $?
fi
;;
esac
-CMD="$SH_LIBTOOL --mode=install $INSTALL_CMD $DSOARCHIVE $TARGETDIR/"
+CMD="$SH_LIBTOOL --mode=install $INSTALL_CMD $DSOARCHIVES $TARGETDIR/"
echo $CMD
$CMD || exit $?
exit 0
fi
+for DSOARCHIVE in $DSOARCHIVES ; do
+DSOARCHIVE_BASENAME=`basename $DSOARCHIVE`
+DSOBASE=`echo $DSOARCHIVE_BASENAME | sed -e 's/\.la$//'`
+TARGET_NAME="$DSOBASE.so"
+
if test -s "$TARGETDIR/$DSOARCHIVE_BASENAME"
then
DLNAME=`sed -n "/^dlname=/{s/.*='\([^']*\)'/\1/;p;}" $TARGETDIR/$DSOARCHIVE_BASENAME`
then
echo "Warning! dlname not found in $TARGETDIR/$DSOARCHIVE_BASENAME."
echo "Assuming installing a .so rather than a libtool archive."
- exit 0
+ continue
fi
if test -n "$LIBRARY_NAMES"
rm -f $TARGETDIR/lib$DSOBASE.a
rm -f $TARGETDIR/lib$TARGET_NAME
+done
+
exit 0
install-modules-yes: $(SHARED_TARGETS)
@$(MKINSTALLDIRS) $(DESTDIR)$(libexecdir)
- @list='$(shared)'; for i in $$list; do \
- $(top_srcdir)/build/instdso.sh SH_LIBTOOL='$(SH_LIBTOOL)' $$i $(DESTDIR)$(libexecdir); \
- done
+ @$(top_srcdir)/build/instdso.sh SH_LIBTOOL='$(SH_LIBTOOL)' $(shared) $(DESTDIR)$(libexecdir)
install-modules-no: