|
From: <wsh...@us...> - 2003-08-22 02:32:56
|
Update of /cvsroot/emc/rcslib/etc
In directory sc8-pr-cvs1:/tmp/cvs-serv11714/etc
Modified Files:
Tag: wps_multiplat_dev_branch
multiplatbuild.sh
Log Message:
.
Index: multiplatbuild.sh
===================================================================
RCS file: /cvsroot/emc/rcslib/etc/Attic/multiplatbuild.sh,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** multiplatbuild.sh 8 Aug 2003 14:52:51 -0000 1.1.2.1
--- multiplatbuild.sh 21 Aug 2003 20:24:13 -0000 1.1.2.2
***************
*** 52,60 ****
! CC_NAME=`${CC} -v 2>&1 | tail -n 1 | sed 'y# #_#' | sed 'y#-#_#' | sed 'y#:#_#' | sed 'y#(#_#' | sed 'y#)#_#' `
UNAME_S=`uname -s | sed 'y# #_#' | sed 'y#-#_#' | sed 'y#:#_#' | sed 'y#(#_#' | sed 'y#)#_#' `
UNAME_R=`uname -r | sed 'y# #_#' | sed 'y#-#_#' | sed 'y#:#_#' | sed 'y#(#_#' | sed 'y#)#_#'`
UNAME_M=`uname -m | sed 'y# #_#' | sed 'y#-#_#' | sed 'y#:#_#' | sed 'y#(#_#' | sed 'y#)#_#'`
if test "x${UNAME_S}" = "xLinux" ; then
if test "x`${rcsdir}/etc/havertlinux.sh | head -n 1`" = "xYES" ; then
--- 52,108 ----
! CC_NAME=`echo ${CC}_\`${CC} -v 2>&1 | tail -n 1 \` | sed 'y# #_#' | sed 'y#-#_#' | sed 'y#:#_#' | sed 'y#(#_#' | sed 'y#)#_#' | sed 's#gcc_gcc#gcc#g' | sed 's#${CC}_${CC}#${CC}#g'`
UNAME_S=`uname -s | sed 'y# #_#' | sed 'y#-#_#' | sed 'y#:#_#' | sed 'y#(#_#' | sed 'y#)#_#' `
UNAME_R=`uname -r | sed 'y# #_#' | sed 'y#-#_#' | sed 'y#:#_#' | sed 'y#(#_#' | sed 'y#)#_#'`
UNAME_M=`uname -m | sed 'y# #_#' | sed 'y#-#_#' | sed 'y#:#_#' | sed 'y#(#_#' | sed 'y#)#_#'`
+ host_arg_found=no;
+ for arg in $* ; do
+ if test "x${host_arg_found}" = "xyes" ; then
+ host_arg=${arg};
+ break;
+ fi
+ if test "x${arg}" = "x--host" ; then
+ host_arg_found=yes;
+ fi
+ done
+
+ (# set -x ;
+ if test "x${REBUILD_RCSLIB_CONFIGURE}" = "xyes" ; then
+ if test ${rcsdir}/configure -ot ${rcsdir}/aclocal.m4 -o \
+ ${rcsdir}/configure -ot ${rcsdir}/acinclude.m4 ; then
+
+ (set -x ; aclocal || (echo "aclocal failed." >&2 ; exit 1 ) || exit 1) || exit 1;
+ fi
+
+ if test ${rcsdir}/Makefile.in -ot ${rcsdir}/Makefile.am ; then
+ (set -x ; automake || (echo "automake failed." >&2 ; exit 1 ) || exit 1) || exit 1;
+ fi
+
+ if test ${rcsdir}/rcs_config.h.in -ot ${rcsdir}/configure.ac ; then
+ (set -x ; autoheader || (echo "autoheader failed." >&2 ; exit 1 ) || exit 1) || exit 1;
+ touch ${rcsdir}/rcs_config.h.in
+ fi
+
+ if test ${rcsdir}/configure -ot ${rcsdir}/aclocal.m4 -o \
+ ${rcsdir}/configure -ot ${rcsdir}/acinclude.m4 -o \
+ ${rcsdir}/configure -ot ${rcsdir}/Makefile.in -o \
+ ${rcsdir}/configure -ot ${rcsdir}/configure.ac -o \
+ ${rcsdir}/configure -ot ${rcsdir}/rcs_config.h.in ; then
+
+ (set -x ; autoconf || (echo "autoconf failed." ; exit 1 ) || exit 1) || exit 1;
+ fi
+ fi
+ )
+
+ if test "x${CC}" = "xmingw32-gcc" -a "x${host_arg_found}" = "xno" -a "x${UNAME_S}" = "xLinux" ; then
+ host_arg='i386-pc-mingw32';
+ host_arg_to_add="--host ${host_arg}";
+ fi
+
+ if test "x${host_arg}" != "x" ; then
+ UNAME_S=${host_arg}_cross_compiled_under_${UNAME_S};
+ fi
+
if test "x${UNAME_S}" = "xLinux" ; then
if test "x`${rcsdir}/etc/havertlinux.sh | head -n 1`" = "xYES" ; then
***************
*** 67,71 ****
LIBC_NAME=NOT_GLIBC
! if test -f /usr/include/features.h ; then
if grep _GLIBC /usr/include/features.h >/dev/null 2>/dev/null ; then
GLIBC_MAJOR_VERSION=`grep __GLIBC__ /usr/include/features.h | grep '#define' | grep -v PREREQ | head -n 1 | awk '{printf("%s",$3);}'`
--- 115,119 ----
LIBC_NAME=NOT_GLIBC
! if test -f /usr/include/features.h -a "x${host_arg}" = "x" ; then
if grep _GLIBC /usr/include/features.h >/dev/null 2>/dev/null ; then
GLIBC_MAJOR_VERSION=`grep __GLIBC__ /usr/include/features.h | grep '#define' | grep -v PREREQ | head -n 1 | awk '{printf("%s",$3);}'`
***************
*** 79,83 ****
fi
! install_dir=${rcsdir}/multiplatinstalls/${UNAME_S}/${UNAME_R}/${UNAME_M}/${LIBC_NAME}/${CC_NAME}
echo "install_dir=${install_dir}" >&2
if test ! -d ${install_dir} ; then
--- 127,138 ----
fi
! if test "x${host_arg}" = "x" ; then
! install_dir=${rcsdir}/.multiplatinstalls/${UNAME_S}/${UNAME_R}/${UNAME_M}/${LIBC_NAME}/${CC_NAME}/
!
! else
! install_dir=${rcsdir}/.multiplatinstalls/`echo ${host_arg}| sed y#-#/#`/${CC_NAME}/
!
! fi
!
echo "install_dir=${install_dir}" >&2
if test ! -d ${install_dir} ; then
***************
*** 85,89 ****
fi
! build_dir=${rcsdir}/multiplatbuilds/${UNAME_S}/${UNAME_R}/${UNAME_M}/${LIBC_NAME}/${CC_NAME}
echo "build_dir=${build_dir}" >&2
if test ! -d ${build_dir} ; then
--- 140,150 ----
fi
! if test "x${host_arg}" = "x" ; then
! build_dir=${rcsdir}/.multiplatbuilds/${UNAME_S}/${UNAME_R}/${UNAME_M}/${LIBC_NAME}/${CC_NAME}/
! else
! build_dir=${rcsdir}/.multiplatbuilds/`echo ${host_arg} | sed y#-#/#`/${CC_NAME}/
!
! fi
!
echo "build_dir=${build_dir}" >&2
if test ! -d ${build_dir} ; then
***************
*** 93,97 ****
cd ${build_dir} || (echo "cd ${build_dir} failed." >&2 ; exit 127 ) || exit 127
! PLAT=`(cd ${rcsdir}; mkdir_cmd=true; . ${rcsdir}/etc/platname)`
export PLAT
--- 154,163 ----
cd ${build_dir} || (echo "cd ${build_dir} failed." >&2 ; exit 127 ) || exit 127
! if test "x${host_arg}" = "x" ; then
! PLAT=`(set -x ;cd ${rcsdir}; mkdir_cmd=true; export mkdir_cmd; . ${rcsdir}/etc/platname)`
! else
! PLAT=${UNAME_S}
! fi
!
export PLAT
***************
*** 122,191 ****
( cd ${rcsdir}/plat && ln -s ${install_dir} ${PLAT} || exit 127 ) || ( echo "Can not setup symbolic link." >&2 ; exit 127 ) || exit 127
! ( cd ${rcsdir} ; PLAT=; rm ~/.platname* ; mkdir_cmd=true; . ${rcsdir}/etc/platname >/dev/null; 2>/dev/null;
! if test "x${ORIG_PLAT}" != "x" -a "x${ORIG_PLAT}" != "x${PLAT}" ; then
! if test ${LINK_FLAG} ${rcsdir}/plat/${ORIG_PLAT} ; then
! rm ${rcsdir}/plat/${ORIG_PLAT} ;
! elif test -d ${rcsdir}/plat/${ORIG_PLAT} ; then
! ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
! mv ${rcsdir}/plat/${ORIG_PLAT} ${rcsdir}/plat/.moved.$$/
fi
! (cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${ORIG_PLAT}; )
! fi
! if test "x${ETC_RELEASE_PLAT}" != "x" -a "x${ETC_RELEASE_PLAT}" != "x${PLAT}" ; then
! if test ${LINK_FLAG} ${rcsdir}/plat/${ETC_RELEASE_PLAT} ; then
rm ${rcsdir}/plat/${ETC_RELEASE_PLAT} ;
! elif test -d ${rcsdir}/plat/${ETC_RELEASE_PLAT} ; then
! ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
! mv ${rcsdir}/plat/${ETC_RELEASE_PLAT} ${rcsdir}/plat/.moved.$$/
! fi
! (cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${ETC_RELEASE_PLAT}; )
! fi
! if test "x${DEBIAN_PLAT}" != "x" -a "x${DEBIAN_PLAT}" != "x${PLAT}" ; then
! if test ${LINK_FLAG} ${rcsdir}/plat/${DEBIAN_PLAT} ; then
! rm ${rcsdir}/plat/${DEBIAN_PLAT} ;
! elif test -d ${rcsdir}/plat/${DEBIAN_PLAT} ; then
! ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
! mv ${rcsdir}/plat/${DEBIAN_PLAT} ${rcsdir}/plat/.moved.$$/
fi
(cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${DEBIAN_PLAT}; )
! fi
! if test "x${REDHAT_PLAT}" != "x" -a "x${REDHAT_PLAT}" != "x${PLAT}" ; then
! if test ${LINK_FLAG} ${rcsdir}/plat/${REDHAT_PLAT} ; then
! rm ${rcsdir}/plat/${REDHAT_PLAT} ;
! elif test -d ${rcsdir}/plat/${REDHAT_PLAT} ; then
! ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
mv ${rcsdir}/plat/${REDHAT_PLAT} ${rcsdir}/plat/.moved.$$/
fi
! (cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${REDHAT_PLAT}; )
! fi
! if test "x${OLD_PLAT}" != "x" -a "x${OLD_PLAT}" != "x${PLAT}" ; then
! if test ${LINK_FLAG} ${rcsdir}/plat/${OLD_PLAT} ; then
! rm ${rcsdir}/plat/${OLD_PLAT} ;
! elif test -d ${rcsdir}/plat/${OLD_PLAT} ; then
! ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
! mv ${rcsdir}/plat/${OLD_PLAT} ${rcsdir}/plat/.moved.$$/
fi
! (cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${OLD_PLAT}; )
! fi
! if test "x${PLATBASE}" != "x" -a "x${PLATBASE}" != "x${PLAT}" ; then
! if test ${LINK_FLAG} ${rcsdir}/plat/${PLATBASE} ; then
! rm ${rcsdir}/plat/${PLATBASE} ;
! elif test -d ${rcsdir}/plat/${PLATBASE} ; then
! ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
! mv ${rcsdir}/plat/${PLATBASE} ${rcsdir}/plat/.moved.$$/
fi
! (cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${PLATBASE}; )
! fi
! )>/dev/null 2>/dev/null;
!
if test $# -lt 1 ; then
! if test ! -f Makefile ; then
! ${rcsdir}/configure --prefix=${install_dir} || (echo "configure failed." >&2 ; exit 127 ) || exit 127
fi
make || (echo "make failed." >&2 ; exit 127 ) || exit 127
--- 188,270 ----
( cd ${rcsdir}/plat && ln -s ${install_dir} ${PLAT} || exit 127 ) || ( echo "Can not setup symbolic link." >&2 ; exit 127 ) || exit 127
! if test "x${host_arg}" = "x" ; then
!
! ( cd ${rcsdir} ; PLAT=; rm ~/.platname* ; mkdir_cmd=true; . ${rcsdir}/etc/platname >/dev/null; 2>/dev/null;
! if test "x${ORIG_PLAT}" != "x" -a "x${ORIG_PLAT}" != "x${PLAT}" ; then
! if test ${LINK_FLAG} ${rcsdir}/plat/${ORIG_PLAT} ; then
! rm ${rcsdir}/plat/${ORIG_PLAT} ;
! elif test -d ${rcsdir}/plat/${ORIG_PLAT} ; then
! ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
! mv ${rcsdir}/plat/${ORIG_PLAT} ${rcsdir}/plat/.moved.$$/
! fi
! (cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${ORIG_PLAT}; )
fi
! if test "x${ETC_RELEASE_PLAT}" != "x" -a "x${ETC_RELEASE_PLAT}" != "x${PLAT}" ; then
! if test ${LINK_FLAG} ${rcsdir}/plat/${ETC_RELEASE_PLAT} ; then
rm ${rcsdir}/plat/${ETC_RELEASE_PLAT} ;
! elif test -d ${rcsdir}/plat/${ETC_RELEASE_PLAT} ; then
! ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
! mv ${rcsdir}/plat/${ETC_RELEASE_PLAT} ${rcsdir}/plat/.moved.$$/
! fi
! (cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${ETC_RELEASE_PLAT}; )
fi
+ if test "x${DEBIAN_PLAT}" != "x" -a "x${DEBIAN_PLAT}" != "x${PLAT}" ; then
+ if test ${LINK_FLAG} ${rcsdir}/plat/${DEBIAN_PLAT} ; then
+ rm ${rcsdir}/plat/${DEBIAN_PLAT} ;
+ elif test -d ${rcsdir}/plat/${DEBIAN_PLAT} ; then
+ ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
+ mv ${rcsdir}/plat/${DEBIAN_PLAT} ${rcsdir}/plat/.moved.$$/
+ fi
(cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${DEBIAN_PLAT}; )
! fi
! if test "x${REDHAT_PLAT}" != "x" -a "x${REDHAT_PLAT}" != "x${PLAT}" ; then
! if test ${LINK_FLAG} ${rcsdir}/plat/${REDHAT_PLAT} ; then
! rm ${rcsdir}/plat/${REDHAT_PLAT} ;
! elif test -d ${rcsdir}/plat/${REDHAT_PLAT} ; then
! ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
mv ${rcsdir}/plat/${REDHAT_PLAT} ${rcsdir}/plat/.moved.$$/
+ fi
+ (cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${REDHAT_PLAT}; )
fi
! if test "x${OLD_PLAT}" != "x" -a "x${OLD_PLAT}" != "x${PLAT}" ; then
! if test ${LINK_FLAG} ${rcsdir}/plat/${OLD_PLAT} ; then
! rm ${rcsdir}/plat/${OLD_PLAT} ;
! elif test -d ${rcsdir}/plat/${OLD_PLAT} ; then
! ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
! mv ${rcsdir}/plat/${OLD_PLAT} ${rcsdir}/plat/.moved.$$/
! fi
! (cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${OLD_PLAT}; )
fi
! if test "x${PLATBASE}" != "x" -a "x${PLATBASE}" != "x${PLAT}" ; then
! if test ${LINK_FLAG} ${rcsdir}/plat/${PLATBASE} ; then
! rm ${rcsdir}/plat/${PLATBASE} ;
! elif test -d ${rcsdir}/plat/${PLATBASE} ; then
! ( mkdir -p ${rcsdir}/plat/.moved.$$/ ) >/dev/null 2>/dev/null;
! mv ${rcsdir}/plat/${PLATBASE} ${rcsdir}/plat/.moved.$$/
! fi
! (cd ${rcsdir}/plat/ ; ln -s ${install_dir} ${PLATBASE}; )
fi
! )>/dev/null 2>/dev/null;
+ fi
+ if test ${LINK_FLAG} ${rcsdir}/.lastbuild ; then
+ \rm -f ${rcsdir}/.lastbuild >/dev/null 2>/dev/null ;
+ fi
+ if test -e ${rcsdir}/.lastbuild ; then
+ (cd ${rcsdir} ; mv .lastbuild .lastbuild.$$ ) >/dev/null 2>/dev/null;
+ fi
+ if test -d ${build_dir} ; then
+ (cd ${rcsdir} ; ln -s ${build_dir} .lastbuild)
+ fi
if test $# -lt 1 ; then
! if test ! -f Makefile -o Makefile -ot ${rcsdir}/configure ; then
! ( set -x ; ${rcsdir}/configure --prefix=${install_dir} ${host_arg_to_add} ) || (echo "configure failed." >&2 ; exit 127 ) || exit 127
! \rm -f ${build_dir}/*.{a,la,so}
! \rm -f ${build_dir}/.libs/*.{a,la,so}
fi
make || (echo "make failed." >&2 ; exit 127 ) || exit 127
***************
*** 193,206 ****
elif test "x${1}" = "xconfig" ; then
! ${rcsdir}/configure --prefix=${install_dir} $2 $3 $4 $5 || (echo "configure failed." >&2 ; exit 127 ) || exit 127
elif test "x${1}" = "xmake" ; then
! if test ! -f Makefile ; then
! ${rcsdir}/configure --prefix=${install_dir} || (echo "configure failed." >&2 ; exit 127 ) || exit 127
fi
make || (echo "make failed." >&2 ; exit 127 ) || exit 127
else
! if test ! -f Makefile -a "xdistclean" != "x${1}" ; then
${rcsdir}/configure --prefix=${install_dir} || exit 127
fi
--- 272,291 ----
elif test "x${1}" = "xconfig" ; then
! ( set -x ;
! ${rcsdir}/configure --prefix=${install_dir} ${host_arg_to_add} $2 $3 $4 $5 ) || (echo "configure failed." >&2 ; exit 127 ) || exit 127
! \rm -f ${build_dir}/*.{a,la,so}
! \rm -f ${build_dir}/.libs/*.{a,la,so}
elif test "x${1}" = "xmake" ; then
! if test ! -f Makefile -o Makefile -ot ${rcsdir}/configure ; then
! ( set -x ; ${rcsdir}/configure --prefix=${install_dir} ${host_arg_to_add} ) || (echo "configure failed." >&2 ; exit 127 ) || exit 127
! \rm -f ${build_dir}/*.{a,la,so}
! \rm -f ${build_dir}/.libs/*.{a,la,so}
fi
make || (echo "make failed." >&2 ; exit 127 ) || exit 127
else
!
! if test ! -f Makefile -o Makefile -ot ${rcsdir}/configure -a "xdistclean" != "x${1}" ; then
${rcsdir}/configure --prefix=${install_dir} || exit 127
fi
***************
*** 210,213 ****
--- 295,373 ----
fi
+
+ if test ! -d ${rcsdir}/plat/java/lib ; then
+ mkdir -p ${rcsdir}/plat/java/lib 2>/dev/null
+ fi
+
+ (cd ${rcsdir}/plat/java/lib && \
+ for jarfile in *.jar ; do
+ if test "x${jarfile}" != 'x*.jar' -a ${LINK_FLAG} ${jarfile} ; then
+ rm ${jarfile};
+ fi
+ done
+ ) >/dev/null 2>/dev/null
+
+ if test -d ${install_dir}/bin ; then
+
+ ( set -x ; cd ${install_dir}/bin && \
+ for jarfile in *.jar ; do \
+ if test "x${jarfile}" != 'x*.jar' -a "x${jarfile}" != "x" ; then \
+ (cd ${rcsdir}/plat/java/lib && \
+ ln -s ${install_dir}/bin/${jarfile} .; ); \
+ fi; \
+ done; \
+ ) >/dev/null 2>/dev/null
+ fi
+
+ if test -d ${install_dir}/lib ; then
+
+ (cd ${install_dir}/lib && \
+ if test -f librcs.a -a ! -f librcsd.a ; then \
+ if test ${LINK_FLAG} librcsd.a ; then \
+ rm librcsd.a; \
+ fi; \
+ ln -s librcs.a librcsd.a; \
+ fi \
+ ) >/dev/null 2>/dev/null
+
+ fi
+
+ if test ${LINK_FLAG} ${rcsdir}/lib ; then
+ \rm -f ${rcsdir}/lib >/dev/null 2>/dev/null ;
+ fi
+
+ if test -e ${rcsdir}/lib ; then
+ (cd ${rcsdir} ; mv lib .lib.$$ ) >/dev/null 2>/dev/null;
+ fi
+
+ if test -d ${install_dir}/lib ; then
+ (cd ${rcsdir} ; ln -s ${install_dir}/lib .)
+ fi
+
+ if test ${LINK_FLAG} ${rcsdir}/bin ; then
+ \rm -f ${rcsdir}/bin >/dev/null 2>/dev/null ;
+ fi
+
+ if test -e ${rcsdir}/bin ; then
+ (cd ${rcsdir} ; mv bin .bin.$$ ) >/dev/null 2>/dev/null;
+ fi
+
+ if test -d ${install_dir}/bin ; then
+ (cd ${rcsdir} ; ln -s ${install_dir}/bin .)
+ fi
+
+ if test ${LINK_FLAG} ${rcsdir}/include ; then
+ \rm -f ${rcsdir}/include >/dev/null 2>/dev/null ;
+ fi
+
+ if test -e ${rcsdir}/include ; then
+ (cd ${rcsdir} ; mv include .include.$$ ) >/dev/null 2>/dev/null;
+ fi
+
+
+ if test -d ${install_dir}/bin ; then
+ (cd ${rcsdir} ; ln -s ${install_dir}/include .)
+ fi
+
echo "rcsdir=${rcsdir}" >&2
|