From 8fee182e8c65625677c10137e12775db63e909a2 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Fri, 19 Feb 2010 22:38:57 +0000 Subject: [PATCH] Cygwin: Have mklib exit with error code if link fails Signed-off-by: Jon TURNEY Signed-off-by: Brian Paul --- bin/mklib | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bin/mklib b/bin/mklib index c2760e5d892..e2b854f3509 100755 --- a/bin/mklib +++ b/bin/mklib @@ -938,7 +938,7 @@ case $ARCH in OPTS=${ALTOPTS} fi rm -f ${LIBNAME} - ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} + ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} || exit $? FINAL_LIBS=${LIBNAME} else CYGNAME="cyg${LIBNAME}" # prefix with "cyg" @@ -979,12 +979,7 @@ case $ARCH in rm -f ${LIBNAME}.a # make lib - ${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS} - # make build fail if link failed - es=$? - if [ "$es" -ne "0" ]; then - exit $es - fi + ${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS} || exit $? # make usual symlinks ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a # finish up -- 2.30.2