2004-12-12 22:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/make_gnu.sh
+ added platform autodetection if HB_ARCHITECTURE not set
and choosing the preferred compiler if HB_COMPILER not set
+ added new platforms (Darwin, SunOS, BSD, HPUX) for info
descriptions - I do not want to decide if this should be
also added for make_gnu.bat, make_gnu.cmd because these
files cannot be used for this platforms.
Now make_bsd.sh and make_drw.sh are redundant - we should
decide if they should be kept in CVS or removed
* harbour/make_tgz.sh
+ added platform autodetection if HB_ARCHITECTURE not set
and choosing the preferred compiler if HB_COMPILER not set
* harbour/contrib/Makefile
* changed the list of compiled contrib libs - now there is a
list of some default libs which can be compiled for all
platforms and only the chosen ones are added for some
platforms - it will be easier to manage because the number
of supported platforms is growing up.
Please check if it will work for other platforms/compilers.
This commit is contained in:
@@ -8,6 +8,29 @@
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2004-12-12 22:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/make_gnu.sh
|
||||
+ added platform autodetection if HB_ARCHITECTURE not set
|
||||
and choosing the preferred compiler if HB_COMPILER not set
|
||||
+ added new platforms (Darwin, SunOS, BSD, HPUX) for info
|
||||
descriptions - I do not want to decide if this should be
|
||||
also added for make_gnu.bat, make_gnu.cmd because these
|
||||
files cannot be used for this platforms.
|
||||
Now make_bsd.sh and make_drw.sh are redundant - we should
|
||||
decide if they should be kept in CVS or removed
|
||||
|
||||
* harbour/make_tgz.sh
|
||||
+ added platform autodetection if HB_ARCHITECTURE not set
|
||||
and choosing the preferred compiler if HB_COMPILER not set
|
||||
|
||||
* harbour/contrib/Makefile
|
||||
* changed the list of compiled contrib libs - now there is a
|
||||
list of some default libs which can be compiled for all
|
||||
platforms and only the chosen ones are added for some
|
||||
platforms - it will be easier to manage because the number
|
||||
of supported platforms is growing up.
|
||||
Please check if it will work for other platforms/compilers.
|
||||
|
||||
2004-12-12 02:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
+ harbour/config/hpux/dir.cf
|
||||
+ harbour/config/hpux/gcc.cf
|
||||
|
||||
@@ -4,45 +4,34 @@
|
||||
|
||||
ROOT = ../
|
||||
|
||||
ifeq ($(HB_ARCHITECTURE),w32)
|
||||
|
||||
ifeq ($(HB_COMPILER),msvc)
|
||||
|
||||
DIRS=\
|
||||
btree \
|
||||
htmllib \
|
||||
libct \
|
||||
libgt \
|
||||
libmisc \
|
||||
rdd_ads \
|
||||
odbc \
|
||||
libnf \
|
||||
samples \
|
||||
|
||||
|
||||
ifeq ($(HB_ARCHITECTURE),w32)
|
||||
|
||||
DIRS +=\
|
||||
rdd_ads \
|
||||
|
||||
ifeq ($(HB_COMPILER),msvc)
|
||||
|
||||
DIRS +=\
|
||||
odbc \
|
||||
|
||||
else
|
||||
ifeq ($(HB_COMPILER),rsxnt)
|
||||
|
||||
DIRS=\
|
||||
btree \
|
||||
htmllib \
|
||||
libct \
|
||||
libgt \
|
||||
libmisc \
|
||||
libnf \
|
||||
rdd_ads \
|
||||
samples \
|
||||
|
||||
else
|
||||
|
||||
DIRS=\
|
||||
btree \
|
||||
htmllib \
|
||||
libct \
|
||||
libgt \
|
||||
libmisc \
|
||||
libnf \
|
||||
rdd_ads \
|
||||
DIRS +=\
|
||||
ole \
|
||||
odbc \
|
||||
samples \
|
||||
|
||||
endif
|
||||
endif
|
||||
@@ -50,70 +39,21 @@ endif
|
||||
else
|
||||
ifeq ($(HB_COMPILER),icc)
|
||||
|
||||
DIRS=\
|
||||
DIRS +=\
|
||||
hgf/os2pm \
|
||||
htmllib \
|
||||
libct \
|
||||
libgt \
|
||||
libmisc \
|
||||
libnf \
|
||||
samples \
|
||||
|
||||
else
|
||||
ifeq ($(HB_ARCHITECTURE),os2)
|
||||
|
||||
DIRS=\
|
||||
btree \
|
||||
DIRS +=\
|
||||
hgf/os2pm \
|
||||
htmllib \
|
||||
libct \
|
||||
libgt \
|
||||
libmisc \
|
||||
libnf \
|
||||
samples \
|
||||
|
||||
else
|
||||
ifeq ($(HB_ARCHITECTURE),bsd)
|
||||
ifeq ($(HB_ARCHITECTURE),linux)
|
||||
|
||||
DIRS=\
|
||||
htmllib \
|
||||
libct \
|
||||
libgt \
|
||||
libmisc \
|
||||
samples \
|
||||
|
||||
else
|
||||
ifeq ($(HB_ARCHITECTURE),darwin)
|
||||
|
||||
DIRS=\
|
||||
htmllib \
|
||||
libct \
|
||||
libgt \
|
||||
libmisc \
|
||||
samples \
|
||||
|
||||
else
|
||||
ifeq ($(HB_ARCHITECTURE),dos)
|
||||
|
||||
DIRS=\
|
||||
htmllib \
|
||||
libct \
|
||||
libgt \
|
||||
libmisc \
|
||||
samples \
|
||||
|
||||
else
|
||||
|
||||
DIRS=\
|
||||
htmllib \
|
||||
libct \
|
||||
libgt \
|
||||
libmisc \
|
||||
DIRS +=\
|
||||
rdd_ads \
|
||||
samples \
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -14,8 +14,24 @@
|
||||
# See doc/license.txt for licensing terms.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
if [ -z "$HB_ARCHITECTURE" ]; then export HB_ARCHITECTURE=linux; fi
|
||||
if [ -z "$HB_COMPILER" ]; then export HB_COMPILER=gcc; fi
|
||||
if [ -z "$HB_ARCHITECTURE" ]; then
|
||||
hb_arch=`uname -s | tr "[A-Z]" "[a-z]" 2>/dev/null`
|
||||
case "$hb_arch" in
|
||||
*windows*) hb_arch="w32" ;;
|
||||
*dos) hb_arch="dos" ;;
|
||||
*bsd) hb_arch="bsd" ;;
|
||||
esac
|
||||
export HB_ARCHITECTURE="$hb_arch"
|
||||
fi
|
||||
|
||||
if [ -z "$HB_COMPILER" ]; then
|
||||
case "$HB_ARCHITECTURE" in
|
||||
w32) hb_comp="mingw32" ;;
|
||||
dos) hb_comp="djgpp" ;;
|
||||
*) hb_comp="gcc" ;;
|
||||
esac
|
||||
export HB_COMPILER="$hb_comp"
|
||||
fi
|
||||
if [ -z "$HB_GT_LIB" ]; then export HB_GT_LIB=; fi
|
||||
|
||||
# export PRG_USR=
|
||||
@@ -24,8 +40,8 @@ if [ -z "$HB_GT_LIB" ]; then export HB_GT_LIB=; fi
|
||||
|
||||
# Set to constant value to be consistent with the non-GNU make files.
|
||||
|
||||
if [ -z "$HB_BIN_INSTALL" ]; then export HB_BIN_INSTALL=bin/; fi
|
||||
if [ -z "$HB_LIB_INSTALL" ]; then export HB_LIB_INSTALL=lib/; fi
|
||||
if [ -z "$HB_BIN_INSTALL" ]; then export HB_BIN_INSTALL=bin/; fi
|
||||
if [ -z "$HB_LIB_INSTALL" ]; then export HB_LIB_INSTALL=lib/; fi
|
||||
if [ -z "$HB_INC_INSTALL" ]; then export HB_INC_INSTALL=include/; fi
|
||||
|
||||
if [ -z "$HB_ARCHITECTURE" ]; then
|
||||
@@ -51,10 +67,14 @@ if [ -z "$HB_ARCHITECTURE" ] || [ -z "$HB_COMPILER" ]; then
|
||||
echo " The following values are currently supported:"
|
||||
echo
|
||||
echo " HB_ARCHITECTURE:"
|
||||
echo " - dos (HB_GT_LIB=gtdos by default)"
|
||||
echo " - w32 (HB_GT_LIB=gtw32 by default)"
|
||||
echo " - linux (HB_GT_LIB=gtstd by default)"
|
||||
echo " - os2 (HB_GT_LIB=gtos2 by default)"
|
||||
echo " - dos (HB_GT_LIB=gtdos by default)"
|
||||
echo " - w32 (HB_GT_LIB=gtw32 by default)"
|
||||
echo " - os2 (HB_GT_LIB=gtos2 by default)"
|
||||
echo " - linux (HB_GT_LIB=gtstd by default)"
|
||||
echo " - bsd (HB_GT_LIB=gtstd by default)"
|
||||
echo " - darwin (HB_GT_LIB=gtstd by default)"
|
||||
echo " - sunos (HB_GT_LIB=gtstd by default)"
|
||||
echo " - hpux (HB_GT_LIB=gtstd by default)"
|
||||
echo
|
||||
read
|
||||
echo " HB_COMPILER:"
|
||||
@@ -99,7 +119,11 @@ else
|
||||
# ---------------------------------------------------------------
|
||||
# Start the GNU make system
|
||||
|
||||
make $*
|
||||
if [ "$HB_ARCHITECTURE" = "bsd" ]; then
|
||||
gmake $*
|
||||
else
|
||||
make $*
|
||||
fi
|
||||
|
||||
if [ "$*" = "clean" ]; then
|
||||
find . -type d -name "$HB_ARCHITECTURE" | xargs rmdir 2> /dev/null
|
||||
|
||||
@@ -21,35 +21,95 @@ hb_archfile="${name}-${hb_ver}${hb_platform}.bin.tar.gz"
|
||||
hb_instfile="${name}-${hb_ver}${hb_platform}.inst.sh"
|
||||
hb_lnkso="yes"
|
||||
hb_pref="hb"
|
||||
hb_contrib="libct rdd_ads"
|
||||
hb_contrib=""
|
||||
export C_USR="-DHB_FM_STATISTICS_OFF -O2"
|
||||
if [ -z "$HB_ARCHITECTURE" ]; then export HB_ARCHITECTURE=linux; fi
|
||||
if [ -z "$HB_COMPILER" ]; then export HB_COMPILER=gcc; fi
|
||||
if [ -z "$HB_GPM_MOUSE" ]; then export HB_GPM_MOUSE=yes; fi
|
||||
|
||||
if [ -z "$HB_ARCHITECTURE" ]; then
|
||||
hb_arch=`uname -s | tr "[A-Z]" "[a-z]" 2>/dev/null`
|
||||
case "$hb_arch" in
|
||||
*windows*) hb_arch="w32" ;;
|
||||
*dos) hb_arch="dos" ;;
|
||||
*bsd) hb_arch="bsd" ;;
|
||||
esac
|
||||
export HB_ARCHITECTURE="$hb_arch"
|
||||
fi
|
||||
|
||||
if [ -z "$HB_COMPILER" ]; then
|
||||
case "$HB_ARCHITECTURE" in
|
||||
w32) hb_comp="mingw32" ;;
|
||||
dos) hb_comp="djgpp" ;;
|
||||
*) hb_comp="gcc" ;;
|
||||
esac
|
||||
export HB_COMPILER="$hb_comp"
|
||||
fi
|
||||
|
||||
if [ -z "$HB_GT_LIB" ]; then export HB_GT_LIB=gtcrs; fi
|
||||
if [ -z "$HB_MULTI_GT" ]; then export HB_MULTI_GT=no; fi
|
||||
if [ -z "$HB_MT" ]; then export HB_MT=no; fi
|
||||
if [ -z "$HB_COMMERCE" ]; then export HB_COMMERCE=no; fi
|
||||
|
||||
# default lib dir name
|
||||
HB_LIBDIRNAME="lib"
|
||||
|
||||
# Select the platform-specific installation prefix and ownership
|
||||
HB_INSTALL_OWNER=root
|
||||
case "$HB_ARCHITECTURE" in
|
||||
linux)
|
||||
[ -z "$HB_INSTALL_PREFIX" ] && HB_INSTALL_PREFIX="/usr"
|
||||
[ -d "$HB_INSTALL_PREFIX/lib64" ] && HB_LIBDIRNAME="lib64"
|
||||
HB_INSTALL_GROUP=root
|
||||
;;
|
||||
*)
|
||||
[ -z "$HB_INSTALL_PREFIX" ] && HB_INSTALL_PREFIX="/usr/local"
|
||||
HB_INSTALL_GROUP=wheel
|
||||
;;
|
||||
esac
|
||||
|
||||
# Select the platform-specific command names
|
||||
INSTALL=install
|
||||
MAKE=make
|
||||
TAR=tar
|
||||
case "$HB_ARCHITECTURE" in
|
||||
darwin) TAR=gtar; INSTALL="install -c" ;;
|
||||
bsd) MAKE=gmake ;;
|
||||
esac
|
||||
|
||||
# Set other platform-specific build options
|
||||
case "$HB_ARCHITECTURE" in
|
||||
linux)
|
||||
export HB_GPM_MOUSE=yes
|
||||
;;
|
||||
darwin)
|
||||
# Autodetect old Darwin versions and set appropriate build options
|
||||
if [ `uname -r | sed "s/\..*//g"` -lt 6 ]; then
|
||||
export HB_NCURSES_FINK=yes
|
||||
fi
|
||||
[ -z "$HB_WITHOUT_X11" ] && export HB_WITHOUT_X11=yes
|
||||
;;
|
||||
*)
|
||||
[ -z "$HB_WITHOUT_X11" ] && export HB_WITHOUT_X11=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$HB_COMMERCE" = yes ]
|
||||
then
|
||||
export HB_GPM_MOUSE=no
|
||||
export HB_WITHOUT_GTSLN=yes
|
||||
fi
|
||||
|
||||
export HB_BIN_INSTALL="/usr/bin"
|
||||
export HB_INC_INSTALL="/usr/include/${name}"
|
||||
export HB_LIB_INSTALL="/usr/lib/${name}"
|
||||
export HB_BIN_INSTALL="$HB_INSTALL_PREFIX/bin"
|
||||
export HB_INC_INSTALL="$HB_INSTALL_PREFIX/include/${name}"
|
||||
export HB_LIB_INSTALL="$HB_INSTALL_PREFIX/$HB_LIBDIRNAME/${name}"
|
||||
|
||||
# buid
|
||||
# build
|
||||
umask 022
|
||||
make -r clean
|
||||
make -r
|
||||
$MAKE -r clean
|
||||
$MAKE -r
|
||||
for l in ${hb_contrib}
|
||||
do
|
||||
(cd "contrib/$l"
|
||||
make -r clean
|
||||
make -r)
|
||||
$MAKE -r clean
|
||||
$MAKE -r)
|
||||
done
|
||||
|
||||
# install
|
||||
@@ -67,22 +127,21 @@ export HB_LIB_INSTALL="$HB_INST_PREF/$HB_LIB_INSTALL"
|
||||
mkdir -p $HB_BIN_INSTALL
|
||||
mkdir -p $HB_INC_INSTALL
|
||||
mkdir -p $HB_LIB_INSTALL
|
||||
make -r -i install
|
||||
$MAKE -r -i install
|
||||
for l in ${hb_contrib}
|
||||
do
|
||||
(cd "contrib/$l"
|
||||
make -r -i install)
|
||||
$MAKE -r -i install)
|
||||
done
|
||||
|
||||
# Keep the size of the binaries to a minimim.
|
||||
strip $HB_BIN_INSTALL/harbour
|
||||
# Keep the size of the libraries to a minimim.
|
||||
strip --strip-debug $HB_LIB_INSTALL/*
|
||||
|
||||
install -m755 bin/hb-mkslib.sh $HB_BIN_INSTALL/hb-mkslib
|
||||
# Keep the size of the libraries to a minimim, but don't try to strip symlinks.
|
||||
strip -S `find $HB_LIB_INSTALL -type f`
|
||||
|
||||
mkdir -p $HB_INST_PREF/etc/harbour
|
||||
install -m644 source/rtl/gtcrs/hb-charmap.def $HB_INST_PREF/etc/harbour/hb-charmap.def
|
||||
#$INSTALL -m644 source/rtl/gtcrs/hb-charmap.def $HB_INST_PREF/etc/harbour/hb-charmap.def
|
||||
|
||||
cat > $HB_INST_PREF/etc/harbour.cfg <<EOF
|
||||
CC=gcc
|
||||
CFLAGS=-c -I$_DEFAULT_INC_DIR -O2
|
||||
@@ -93,31 +152,44 @@ EOF
|
||||
# check if we should rebuild tools with shared libs
|
||||
if [ "${hb_lnkso}" = yes ]
|
||||
then
|
||||
export L_USR="-L${HB_LIB_INSTALL} -l${name} -lncurses -lslang -lgpm -L/usr/X11R6/lib -lX11"
|
||||
ADD_LIBS=""
|
||||
case $HB_ARCHITECTURE in
|
||||
linux) [ "${HB_GPM_MOUSE}" = yes ] && ADD_LIBS="$ADD_LIBS -lgpm" ;;
|
||||
darwin) ADD_LIBS="$ADD_LIBS -L/sw/lib" ;;
|
||||
esac
|
||||
[ "${HB_WITHOUT_GTSLN}" != yes ] && ADD_LIBS="$ADD_LIBS -lslang"
|
||||
[ "${HB_WITHOUT_X11}" != yes ] && ADD_LIBS="$ADD_LIBS -L/usr/X11R6/$HB_LIBDIRNAME -lX11"
|
||||
|
||||
export L_USR="-L${HB_LIB_INSTALL} -l${name} -lncurses ${ADD_LIBS}"
|
||||
export PRG_USR="\"-D_DEFAULT_INC_DIR='${_DEFAULT_INC_DIR}'\""
|
||||
|
||||
for utl in hbmake hbrun hbpp hbdoc hbtest
|
||||
do
|
||||
(cd "utils/${utl}"
|
||||
rm -fR "./${HB_ARCHITECTURE}"
|
||||
make -r install
|
||||
$MAKE -r install
|
||||
strip "${HB_BIN_INSTALL}/${utl}")
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Create PP
|
||||
# Create and install PP
|
||||
pushd contrib/dot
|
||||
$HB_BIN_INSTALL/${hb_pref}mk pp -n -w -D_DEFAULT_INC_DIR=\"${_DEFAULT_INC_DIR}\"
|
||||
install -m755 -s pp $HB_BIN_INSTALL/pp
|
||||
$INSTALL -m755 pp $HB_BIN_INSTALL/pp
|
||||
ln -s pp $HB_BIN_INSTALL/pprun
|
||||
install -m644 rp_dot.ch $HB_INC_INSTALL/
|
||||
$INSTALL -m644 rp_dot.ch $HB_INC_INSTALL/
|
||||
rm -f pp
|
||||
popd
|
||||
|
||||
tar -czvf "${hb_archfile}" --owner=root --group=root -C "${HB_INST_PREF}" .
|
||||
|
||||
$TAR -czvf "${hb_archfile}" --owner=${HB_INSTALL_OWNER} --group=${HB_INSTALL_GROUP} -C "${HB_INST_PREF}" .
|
||||
rm -fR "${HB_INST_PREF}"
|
||||
|
||||
if [ "${HB_ARCHITECTURE}" = darwin ]; then
|
||||
DO_LDCONFIG=""
|
||||
else
|
||||
DO_LDCONFIG="&& ldconfig"
|
||||
fi
|
||||
cat > "${hb_instfile}" <<EOF
|
||||
#!/bin/sh
|
||||
if [ "\$1" == "--extract" ]; then
|
||||
@@ -133,7 +205,7 @@ read ASK
|
||||
if [ "\${ASK}" != "y" ] && [ "\${ASK}" != "Y" ]; then
|
||||
exit 1
|
||||
fi
|
||||
(sed -e '1,/^HB_INST_EOF\$/ d' \$0 | gzip -cd | tar xvf - -C /) && ldconfig
|
||||
(sed -e '1,/^HB_INST_EOF\$/ d' \$0 | gzip -cd | $TAR xvf - -C /) ${DO_LDCONFIG}
|
||||
exit \$?
|
||||
HB_INST_EOF
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user