From a555a9be6e700a45743b643d0e851dbcd0c24d25 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 23 Oct 2007 18:28:19 +0000 Subject: [PATCH] 2007-10-23 20:27 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + harbour/doc/howtobld.txt + added hb* scripts description * harbour/Makefile * harbour/source/Makefile + harbour/harbour-ce-spec * harbour/bin/pack_src.sh + harbour/make_rpmce.sh + added script to build RPMs with cross build of Harbour for PocketPC make_rpmce.sh should create harbour-ce-1.1.1-0.i386.rpm which can be installed with other harbour RPMs It contains Harbour libraries compiled for WinCE/PocketPC and set of hbce* scripts which should be used instead of standard hb* ones to create PocketPC binaries. It means that you can create standard Linux binaries and PocketPC binaries in the same session without setting/changing any additional environment varibales, f.e: hbmk -n -w -es2 test.prg will create linux binaries and: hbcemk -n -w -es2 test.prg will create binaries for WinCE/PocketPC --- harbour/ChangeLog | 22 +++ harbour/Makefile | 16 +- harbour/bin/pack_src.sh | 3 + harbour/doc/howtobld.txt | 118 +++++++++++++ harbour/harbour-ce-spec | 352 +++++++++++++++++++++++++++++++++++++++ harbour/make_rpmce.sh | 114 +++++++++++++ harbour/source/Makefile | 33 ++-- 7 files changed, 639 insertions(+), 19 deletions(-) create mode 100644 harbour/doc/howtobld.txt create mode 100644 harbour/harbour-ce-spec create mode 100755 harbour/make_rpmce.sh diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c5370b9db8..f31f252416 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,28 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-10-23 20:27 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + + harbour/doc/howtobld.txt + + added hb* scripts description + + * harbour/Makefile + * harbour/source/Makefile + + harbour/harbour-ce-spec + * harbour/bin/pack_src.sh + + harbour/make_rpmce.sh + + added script to build RPMs with cross build of Harbour for PocketPC + make_rpmce.sh should create harbour-ce-1.1.1-0.i386.rpm which + can be installed with other harbour RPMs + It contains Harbour libraries compiled for WinCE/PocketPC and + set of hbce* scripts which should be used instead of standard hb* + ones to create PocketPC binaries. It means that you can create + standard Linux binaries and PocketPC binaries in the same session + without setting/changing any additional environment varibales, f.e: + hbmk -n -w -es2 test.prg + will create linux binaries and: + hbcemk -n -w -es2 test.prg + will create binaries for WinCE/PocketPC + 2007-10-23 16:39 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/libnf/fttext.c ! Fixed opening mode in FT_FUSE(). diff --git a/harbour/Makefile b/harbour/Makefile index 1e3c2950ca..c25da38757 100644 --- a/harbour/Makefile +++ b/harbour/Makefile @@ -4,14 +4,28 @@ ROOT = ./ +ifeq ($(HB_HOST_BUILD),yes) + +DIRS=\ + source \ + +else + +ifeq ($(HB_HOST_BUILD),lib) +HB_UTIL_DIR= +else +HB_UTIL_DIR=utils +endif + DIRS=\ doc \ include \ source \ - utils \ + $(HB_UTIL_DIR) \ contrib \ # samples \ +endif ifeq ($(HB_POSTINST),) diff --git a/harbour/bin/pack_src.sh b/harbour/bin/pack_src.sh index 7e6d746cfc..7d0c3cc571 100755 --- a/harbour/bin/pack_src.sh +++ b/harbour/bin/pack_src.sh @@ -246,6 +246,9 @@ $hb_collect source/vm/*.prg # SOURCE\VM\MAINSTD $hb_collect source/vm/mainstd/Makefile +# SOURCE\VM\MAINWIN +$hb_collect source/vm/mainwin/Makefile + # TESTS $hb_collect tests/Makefile $hb_collect tests/*.bat diff --git a/harbour/doc/howtobld.txt b/harbour/doc/howtobld.txt new file mode 100644 index 0000000000..602cc8721d --- /dev/null +++ b/harbour/doc/howtobld.txt @@ -0,0 +1,118 @@ +/* + * $Id$ + */ + +In the last phase of install process if bash shell is available in the +system then few bash scripts are created to make compiling and linking +with Harbour a little easier. There are compiler and linker wrappers +called "hbcc", "hbcmp", "hblnk" and "hbmk". + +"hbcc" is a wrapper to the C compiler only. It sets all flags +and paths necessary to compile .c files which include Harbour header +files. The result of its work is an object file. + +Use "hbcmp" exactly as you would use the harbour compiler itself. +The main difference with hbcmp is that it results in an object file, +not a C file that needs compiling down to an object. hbcmp also +ensures that the harbour include directory is seen by the harbour compiler. + +"hblnk" simply takes a list of object files and links them together +with the harbour virtual machine and run-time library to produce an +executable. The executable will be given the basename of the first object +file if not directly set by the "-o" command line switch. + +"hbmk" tries to produce an executable from your .prg file. It's a simple +equivalent of cl.bat from the CA-Clipper distribution. + +All these scripts accept command line switches: +-o # output file name +-static # link with static Harbour libs +-fullstatic # link with all static libs +-shared # link with shared libs (default) +-mt # link with multi-thread libs +-gt # link with GT driver, can be repeated to + # link with more GTs. The first one will be + # the default at runtime +-xbgtk # link with xbgtk library (xBase GTK+ interface) +-hwgui # link with HWGUI library (GTK+ interface) +-l # link with library +-L # additional path to search for libraries +-fmstat # link with the memory statistics lib +-nofmstat # do not link with the memory statistics lib (default) +-[no]strip # strip (no strip) binaries +-main= # set the name of main program function/procedure. + # if not set then 'MAIN' is used or if it doesn't + # exist the name of first public function/procedure + # in first linked object module (link) + +Link options work only with "hblnk" and "hbmk" and have no effect +in "hbcc" and "hbcmp". +Other options are passed to Harbour/C compiler/linker. +To save compatibility with older harbour distributions, "gharbour" can +be used as a synonym of "hbcmp", and "harbour-link" as synonym of "hblnk" + +An example compile/link session looks like: +---------------------------------------------------------------------- +druzus@uran:~/tmp$ cat foo.prg +function main() +? "Hello, World!" +return nil + +druzus@uran:~/tmp$ hbcmp foo +Harbour Compiler Alpha build 46.2 (Flex) +Copyright 1999-2006, http://www.harbour-project.org/ +Compiling 'foo.prg'... +Lines 5, Functions/Procedures 2 +Generating C source output to 'foo.c'... Done. + +druzus@uran:~/tmp$ hblnk foo.o + +druzus@uran:~/tmp$ strip foo + +druzus@uran:~/tmp$ ls -l foo +-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo +---------------------------------------------------------------------- + +or using hbmk only: +---------------------------------------------------------------------- +druzus@uran:~/tmp$ cat foo.prg +function main() +? "Hello, World!" +return nil + +druzus@uran:~/tmp$ hbmk foo +Harbour Compiler Alpha build 46.2 (Flex) +Copyright 1999-2006, http://www.harbour-project.org/ +Compiling 'foo.prg'... +Lines 5, Functions/Procedures 2 +Generating C source output to 'foo.c'... Done. + +druzus@uran:~/tmp$ ls -l foo +-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo +---------------------------------------------------------------------- + + +You will find additional wonderful tools: /usr/bin/hbrun +You can run clipper/xbase compatible source files with it +if you only put in their first line: +#!/usr/bin/hbrun + +For example: +---------------------------------------------------------------------- +druzus@uran:~/tmp$ cat foo.prg +#!/usr/bin/hbrun +function main() +? "Hello, World!, This is a script !!! :-)" +? +return nil + +druzus@uran:~/tmp$ chmod +x foo.prg + +druzus@uran:~/tmp$ ./foo.prg + +Hello, World!, This is a script !!! :-) + +druzus@uran:~/tmp$ + +I hope you will find this information useful, +Przemyslaw Czerpak (druzus/at/priv.onet.pl) diff --git a/harbour/harbour-ce-spec b/harbour/harbour-ce-spec new file mode 100644 index 0000000000..efa6f9569e --- /dev/null +++ b/harbour/harbour-ce-spec @@ -0,0 +1,352 @@ +# +# $Id$ +# + +# --------------------------------------------------------------- +# Copyright 2007 Przemyslaw Czerpak (druzus/at/priv.onet.pl), +# Harbour-WinCE cross build RPM spec file +# +# See doc/license.txt for licensing terms. +# --------------------------------------------------------------- + +###################################################################### +# Conditional build: +# --with mysql - build mysql lib +# --with pgsql - build pgsql lib +# --with gd - build gd lib +# --with allegro - build GTALLEG - Allegro based GT driver +# --without odbc - do not build odbc lib +# --without adsrdd - do not build ADS RDD +# --without nf - do not build nanforum lib +###################################################################### + +###################################################################### +## Definitions. +###################################################################### + +%define name harbour-ce +%define version 1.1.1 +%define releasen 0 +%define hb_pref hbce +%define hb_ccpath /opt/mingw32ce/bin +%define hb_ccpref arm-wince-mingw32ce- +%define hb_host www.harbour-project.org +%define readme README.RPM + +# Workaround for the problem of /usr/bin/strip not handling PE binaries. +%define __strip %{hb_ccpath}/%{hb_ccpref}strip +%define __objdump %{hb_ccpath}/%{hb_ccpref}objdump + +###################################################################### +## Preamble. +###################################################################### + +Summary: Free software Clipper compatible compiler +Summary(pl): Darmowy kompilator kompatybilny z językiem Clipper. +Name: %{name} +Version: %{version} +Release: %{releasen} +License: GPL (plus exception) +Group: Development/Languages +Vendor: %{hb_host} +URL: http://%{hb_host}/ +Source: harbour-%{version}.src.tar.gz +Packager: Przemysław Czerpak (druzus/at/priv.onet.pl) +BuildPrereq: gcc binutils bash +Requires: gcc binutils bash sh-utils cegcc-mingw32ce harbour = %{?epoch:%{epoch}:}%{version}-%{release} +Provides: %{name} +BuildRoot: /tmp/%{name}-%{version}-root + +%define _noautoreq 'libharbour.*' + +%description +Harbour is a CA-Clipper compatible compiler for multiple platforms. This +package includes a compiler, pre-processor, header files, virtual machine +and libraries for creating WinCE application in Linux box using MinGW-CE +GCC port. + +%description -l pl +Harbour to kompatybilny z językiem CA-Clipper kompilator rozwijany na +wielu różnych platformach. Ten pakiet zawiera kompilator, preprocesor, +zbiory nagłówkowe, wirtualną maszynę oraz biblioteki pozwalające na +tworzenie aplikacji dla WinCE-PocketPC przy użyciu MinGW-CE GCC. + + +###################################################################### +## Preperation. +###################################################################### + +%prep +%setup -c harbour +rm -fR $RPM_BUILD_ROOT + +###################################################################### +## Build. +###################################################################### + +%build + +export HB_HOST_BUILD=yes +export HB_ARCHITECTURE=linux +export HB_COMPILER=gcc +export C_USR="-O2 -DHB_FM_STATISTICS_OFF" +make -r + +export HB_HOST_BUILD=lib +export HB_ARCHITECTURE=w32 +export HB_COMPILER=cemgw + +mkdir -p source/pp/${HB_ARCHITECTURE}/${HB_COMPILER} +ln -s ../../linux/gcc/ppgen source/pp/${HB_ARCHITECTURE}/${HB_COMPILER}/ppgen.exe +mkdir -p source/main/${HB_ARCHITECTURE}/${HB_COMPILER} +ln -s ../../linux/gcc/harbour source/main/${HB_ARCHITECTURE}/${HB_COMPILER}/harbour.exe + +export CC_C_USR="-DHOST_OS_UNIX_COMPATIBLE" +export C_USR="$CC_C_USR -O2 -DHB_FM_STATISTICS_OFF" +export CC_PRG_USR="-D__PLATFORM__Windows -D__PLATFORM__WINCE -undef:__PLATFORM__UNIX -undef:__PLATFORM__Linux" +export PRG_USR="$CC_PRG_USR" +export L_USR="${CC_L_USR}" + +export CCPATH="%{hb_ccpath}:" +export CCPREFIX="%{hb_ccpref}" +export PATH="$CCPATH$PATH" + +export HB_MT=no +export HB_GT_LIB=gtwvt +export HB_BIN_INSTALL=%{_bindir} +export HB_INC_INSTALL=%{_includedir}/harbour +export HB_LIB_INSTALL=%{_libdir}/%{name} +export HB_GTALLEG=%{?_with_allegro:yes} +export HB_CONTRIBLIBS="%{?_with_gd:gd} %{?_with_pgsql:pgsql} %{?_with_mysql:mysql}" + +make -r + +###################################################################### +## Install. +###################################################################### + +%install + +# Install harbour itself. + +export CC_C_USR="-DHOST_OS_UNIX_COMPATIBLE" +export C_USR="$CC_C_USR -O2 -DHB_FM_STATISTICS_OFF" +export CC_PRG_USR="-D__PLATFORM__Windows -D__PLATFORM__WINCE -undef:__PLATFORM__UNIX -undef:__PLATFORM__Linux" +export PRG_USR="$CC_PRG_USR" +export L_USR="${CC_L_USR}" + +export CCPATH="%{hb_ccpath}:" +export CCPREFIX="%{hb_ccpref}" +export PATH="$CCPATH$PATH" + +export HB_HOST_BUILD=lib +export HB_ARCHITECTURE=w32 +export HB_COMPILER=cemgw +export HB_MT=no +export HB_GT_LIB=gtwvt +export HB_BIN_INSTALL=%{_bindir} +export HB_INC_INSTALL=%{_includedir}/harbour +export HB_LIB_INSTALL=%{_libdir}/%{name} +export HB_GTALLEG=%{?_with_allegro:yes} +export HB_CONTRIBLIBS="%{?_with_gd:gd} %{?_with_pgsql:pgsql} %{?_with_mysql:mysql}" + +export _DEFAULT_BIN_DIR=$HB_BIN_INSTALL +export _DEFAULT_INC_DIR=$HB_INC_INSTALL +export _DEFAULT_LIB_DIR=$HB_LIB_INSTALL +export HB_BIN_INSTALL=$RPM_BUILD_ROOT/$HB_BIN_INSTALL +export HB_INC_INSTALL=$RPM_BUILD_ROOT/$HB_INC_INSTALL +export HB_LIB_INSTALL=$RPM_BUILD_ROOT/$HB_LIB_INSTALL +export HB_TOOLS_PREF=%{hb_pref} + +mkdir -p $HB_BIN_INSTALL +mkdir -p $HB_LIB_INSTALL + +make -r -i install + +[ "%{?_without_odbc:1}" ] && rm -f $HB_LIB_INSTALL/libhbodbc.a +[ "%{?_with_allegro:1}" ] || rm -f $HB_LIB_INSTALL/libgtalleg.a + +# Keep the size of the libraries to a minimim. +${CCPREFIX}strip --strip-debug $HB_LIB_INSTALL/* + +# remove unused files +rm -fR ${HB_BIN_INSTALL}/{harbour,hbdoc,hbdot,hbmake,hbpp,hbrun,hbtest,hbverfix,pretest}.exe +rm -fR ${HB_BIN_INSTALL}/{gharbour,harbour-link} +rm -fR $HB_INC_INSTALL + +mv ${HB_BIN_INSTALL}/hb-mkslib ${HB_BIN_INSTALL}/%{hb_pref}-mkslib + +# Create a README file for people using this RPM. +cat > doc/%{readme} < # output file name +-static # link with static Harbour libs +-fullstatic # link with all static libs +-shared # link with shared libs (default) +-mt # link with multi-thread libs +-gt # link with GT driver, can be repeated to + # link with more GTs. The first one will be + # the default at runtime +-xbgtk # link with xbgtk library (xBase GTK+ interface) +-hwgui # link with HWGUI library (GTK+ interface) +-l # link with library +-L # additional path to search for libraries +-fmstat # link with the memory statistics lib +-nofmstat # do not link with the memory statistics lib (default) +-[no]strip # strip (no strip) binaries +-main= # set the name of main program function/procedure. + # if not set then 'MAIN' is used or if it doesn't + # exist the name of first public function/procedure + # in first linked object module (link) + +Link options work only with "%{hb_pref}lnk" and "%{hb_pref}mk" and have no effect +in "%{hb_pref}cc" and "%{hb_pref}cmp". +Other options are passed to Harbour/C compiler/linker. + +An example compile/link session looks like: +---------------------------------------------------------------------- +druzus@uran:~/tmp$ cat foo.prg +function main() +? "Hello, World!" +return nil + +druzus@uran:~/tmp$ %{hb_pref}cmp foo +Harbour Compiler Alpha build 46.2 (Flex) +Copyright 1999-2006, http://www.harbour-project.org/ +Compiling 'foo.prg'... +Lines 5, Functions/Procedures 2 +Generating C source output to 'foo.c'... Done. + +druzus@uran:~/tmp$ %{hb_pref}lnk foo.o + +druzus@uran:~/tmp$ ls -l foo +-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo.exe +---------------------------------------------------------------------- + +or using %{hb_pref}mk only: +---------------------------------------------------------------------- +druzus@uran:~/tmp$ cat foo.prg +function main() +? "Hello, World!" +return nil + +druzus@uran:~/tmp$ %{hb_pref}mk foo +Harbour Compiler Alpha build 46.2 (Flex) +Copyright 1999-2006, http://www.harbour-project.org/ +Compiling 'foo.prg'... +Lines 5, Functions/Procedures 2 +Generating C source output to 'foo.c'... Done. + +druzus@uran:~/tmp$ ls -l foo +-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo.exe +---------------------------------------------------------------------- + +I hope this RPM is useful. Have fun with Harbour. + +Przemyslaw Czerpak (druzus/at/priv.onet.pl) +EOF + +###################################################################### +## Post install +###################################################################### +#%post lib +#/sbin/ldconfig + +###################################################################### +## Post uninstall +###################################################################### +#%postun lib +#/sbin/ldconfig + +###################################################################### +## Clean. +###################################################################### + +%clean +rm -fR $RPM_BUILD_ROOT + +###################################################################### +## File list. +###################################################################### + +%files +%defattr(-,root,root,755) +%doc doc/%{readme} + +%{_bindir}/%{hb_pref}-mkslib +%{_bindir}/%{hb_pref}-build +%{_bindir}/%{hb_pref}cc +%{_bindir}/%{hb_pref}cmp +%{_bindir}/%{hb_pref}lnk +%{_bindir}/%{hb_pref}mk + +%defattr(644,root,root,755) +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/libcodepage.a +%{_libdir}/%{name}/libcommon.a +%{_libdir}/%{name}/libcompiler.a +%{_libdir}/%{name}/libdebug.a +%{_libdir}/%{name}/libfm.a +%{_libdir}/%{name}/libdb*.a +%{_libdir}/%{name}/libgt*.a +%{_libdir}/%{name}/liblang.a +%{_libdir}/%{name}/libmacro.a +%{_libdir}/%{name}/libhbpcre.a +%{_libdir}/%{name}/libnulsys.a +%{_libdir}/%{name}/libpp.a +%{_libdir}/%{name}/librdd.a +%{_libdir}/%{name}/libhsx.a +%{_libdir}/%{name}/libhbsix.a +%{_libdir}/%{name}/librtl.a +%{_libdir}/%{name}/libsamples.a +%{_libdir}/%{name}/libvm.a +%{_libdir}/%{name}/libmainstd.a +%{_libdir}/%{name}/libmainwin.a +%{_libdir}/%{name}/libusrrdd.a + +%{!?_without_odbc: %{_libdir}/%{name}/libhbodbc.a} +%{!?_without_adsrdd: %{_libdir}/%{name}/librddads.a} +%{!?_without_nf: %{_libdir}/%{name}/libnf.a} +%{?_with_mysql: %{_libdir}/%{name}/libhbmysql.a} +%{?_with_pgsql: %{_libdir}/%{name}/libhbpg.a} +%{?_with_gd: %{_libdir}/%{name}/libhbgd.a} +%{_libdir}/%{name}/libhbbtree.a +%{_libdir}/%{name}/libhtml.a +%{_libdir}/%{name}/libmisc.a +%{_libdir}/%{name}/libct.a +%{_libdir}/%{name}/libtip.a +%{_libdir}/%{name}/libxhb.a +%{_libdir}/%{name}/libadordd.a +%{_libdir}/%{name}/libhbwin32.a + +%defattr(755,root,root,755) +%{_libdir}/%{name}/*.dll + +###################################################################### +## Spec file Changelog. +###################################################################### + +%changelog +* Thu Oct 23 2007 Przemyslaw Czerpak (druzus/at/priv.onet.pl) +- initial release diff --git a/harbour/make_rpmce.sh b/harbour/make_rpmce.sh new file mode 100755 index 0000000000..051475e2a0 --- /dev/null +++ b/harbour/make_rpmce.sh @@ -0,0 +1,114 @@ +#!/bin/sh +# +# $Id$ +# + +# --------------------------------------------------------------- +# Copyright 2007 Przemyslaw Czerpak (druzus/at/priv.onet.pl) +# simple script to build Harbour-WinCE cross build RPMs +# +# See doc/license.txt for licensing terms. +# --------------------------------------------------------------- + +###################################################################### +# Conditional build: +# --with mysql - build mysql lib +# --with pgsql - build pgsql lib +# --with gd - build gd lib +# --with allegro - build GTALLEG - Allegro based GT driver +# --without odbc - do not build odbc lib +# --without adsrdd - do not build ADS RDD +# --without nf - do not build nanforum lib +###################################################################### + +test_reqrpm() +{ + rpm -q --whatprovides "$1" &> /dev/null +} + +get_rpmmacro() +{ + local R X Y + + R=`rpm --showrc|sed -e "/^-14:.${1}[^a-z0-9A-Z_]/ !d" -e "s/^-14: ${1}.//"` + X=`echo "${R}"|sed -e "s/.*\(%{\([^}]*\)}\).*/\2/"` + while [ "${X}" != "${R}" ] + do + Y=`get_rpmmacro "$X"` + if [ -n "${Y}" ] + then + R=`echo "${R}"|sed -e "s!%{${X}}!${Y}!g"` + X=`echo "${R}"|sed -e "s/.*\(%{\([^}]*\)}\).*/\2/"` + else + X="${R}" + fi + done + echo -n "${R}" +} + +NEED_RPM="make gcc binutils bash cegcc-mingw32ce" + +FORCE="" + +LAST="" +while [ $# -gt 0 ] +do + if [ "$1" = "--force" ] + then + FORCE="yes" + else + INST_PARAM="${INST_PARAM} $1" + fi + LAST="$1" + shift +done + +TOINST_LST="" +for i in ${NEED_RPM} +do + test_reqrpm "$i" || TOINST_LST="${TOINST_LST} $i" +done + +if [ -z "${TOINST_LST}" ] || [ "${FORCE}" = "yes" ] +then + . ./bin/pack_src.sh + stat="$?" + if [ -z "${hb_filename}" ] + then + echo "The script ./bin/pack_src.sh doesn't set archive name to \${hb_filename}" + exit 1 + elif [ "${stat}" != 0 ] + then + echo "Error during packing the sources in ./bin/pack_src.sh" + exit 1 + elif [ -f ${hb_filename} ] + then + if [ `id -u` != 0 ] && [ ! -f ${HOME}/.rpmmacros ] + then + RPMDIR="${HOME}/RPM" + mkdir -p ${RPMDIR}/SOURCES ${RPMDIR}/RPMS ${RPMDIR}/SRPMS \ + ${RPMDIR}/BUILD ${RPMDIR}/SPECS + echo "%_topdir ${RPMDIR}" > ${HOME}/.rpmmacros + else + RPMDIR=`get_rpmmacro "_topdir"` + fi + cp ${hb_filename} ${RPMDIR}/SOURCES/ + cp harbour-ce-spec ${RPMDIR}/SPECS/harbour-ce.spec + if which rpmbuild &>/dev/null + then + RPMBLD="rpmbuild" + else + RPMBLD="rpm" + fi + cd ${RPMDIR}/SPECS + ${RPMBLD} -ba harbour-ce.spec ${INST_PARAM} + else + echo "Cannot find archive file: ${hb_filename}" + exit 1 + fi +else + echo "If you want to build Harbour compiler" + echo "you have to install the folowing RPM files:" + echo "${TOINST_LST}" + exit 1 +fi diff --git a/harbour/source/Makefile b/harbour/source/Makefile index 6c58d82f9d..e85884914f 100644 --- a/harbour/source/Makefile +++ b/harbour/source/Makefile @@ -4,30 +4,27 @@ ROOT = ../ -ifeq ($(HB_COMPILER),bcc16) - -# Don't build the Harbour compiler for 16-bit DOS, -# because it frequently runs out of memory, so it -# is necessary to use the DJGPP Harbour compiler. - -DIRS=\ - common \ - pp \ - rtl \ - vm \ - macro \ - codepage \ - lang \ - rdd \ - debug \ - -else +ifeq ($(HB_HOST_BUILD),yes) DIRS=\ common \ pp \ compiler \ main \ + +else + +ifeq ($(HB_HOST_BUILD),lib) +HB_COMP_DIR= +else +HB_COMP_DIR=main +endif + +DIRS=\ + common \ + pp \ + compiler \ + $(HB_COMP_DIR) \ rtl \ vm \ macro \