2009-07-16 01:11 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* config/global.cf
  * config/win/global.cf
  * config/linux/global.cf
  * config/os2/global.cf
  * config/wce/global.cf
    + Changed host CPU detection.
    + Added automatic __PLATFORM__* macro configuration in cross-build
      situations.
    + Enhanced target/host CPU detection and decisions based on them.
    + Added automatic HB_BIN_COMPILE setup if not specified by user.
      In such case Harbour build will automatically look for the first
      available native build and use that.
    + Protected detection related screen messages with HB_BUILD_VERBOSE=yes.
    * Minor sync in shell command definition order.

  * INSTALL
    % User set __PLATFORM__* macro tweaks not needed anymore.

  * bin/postinst.cmd
  * bin/postinst.bat
  * bin/hb-func.sh
    * addins -> addons
      (hm, which is better?)
This commit is contained in:
Viktor Szakats
2009-07-15 23:13:16 +00:00
parent 25ab839bd0
commit a8c53c2e3e
10 changed files with 108 additions and 27 deletions

View File

@@ -17,6 +17,31 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-07-16 01:11 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/global.cf
* config/win/global.cf
* config/linux/global.cf
* config/os2/global.cf
* config/wce/global.cf
+ Changed host CPU detection.
+ Added automatic __PLATFORM__* macro configuration in cross-build
situations.
+ Enhanced target/host CPU detection and decisions based on them.
+ Added automatic HB_BIN_COMPILE setup if not specified by user.
In such case Harbour build will automatically look for the first
available native build and use that.
+ Protected detection related screen messages with HB_BUILD_VERBOSE=yes.
* Minor sync in shell command definition order.
* INSTALL
% User set __PLATFORM__* macro tweaks not needed anymore.
* bin/postinst.cmd
* bin/postinst.bat
* bin/hb-func.sh
* addins -> addons
(hm, which is better?)
2009-07-15 22:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/rules.cf
* config/dos/watcom.cf

View File

@@ -595,7 +595,6 @@ EXAMPLES
rem
set HB_ARCHITECTURE=os2
set HB_COMPILER=watcom
set HB_USER_PRGFLAGS=%HB_USER_PRGFLAGS% -D__PLATFORM__OS2 -undef:__PLATFORM__WINDOWS
set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER%
call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1
---
@@ -614,7 +613,6 @@ EXAMPLES
# ;
export HB_ARCHITECTURE=os2
export HB_COMPILER=watcom
export HB_USER_PRGFLAGS="${HB_USER_PRGFLAGS} -D__PLATFORM__OS2 -undef:__PLATFORM__UNIX -undef:__PLATFORM__LINUX"
export HB_INSTALL_PREFIX="$(pwd)/hb-os2/watcom"
./make_gnu.sh "$@"
---
@@ -633,7 +631,6 @@ EXAMPLES
rem
set HB_ARCHITECTURE=linux
set HB_COMPILER=watcom
set HB_USER_PRGFLAGS=%HB_USER_PRGFLAGS% -D__PLATFORM__LINUX -D__PLATFORM__UNIX -undef:__PLATFORM__WINDOWS
set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER%
call make_gnu.bat %1 %2 > log-%HB_COMPILER%.txt 2>&1
---

View File

@@ -245,7 +245,7 @@ mk_hbtools()
echo "">> ${hb_hbmkcfg}
echo "libpaths=../contrib/%%{hb_name}">> ${hb_hbmkcfg}
echo "libpaths=../contrib/rddsql/%%{hb_name}">> ${hb_hbmkcfg}
echo "libpaths=../addins/%%{hb_name}">> ${hb_hbmkcfg}
echo "libpaths=../addons/%%{hb_name}">> ${hb_hbmkcfg}
echo "libpaths=../examples/%%{hb_name}">> ${hb_hbmkcfg}
echo "">> ${hb_hbmkcfg}
if [ -n "${hb_gt_ori}" ]; then

View File

@@ -19,7 +19,7 @@ echo # Generated by Harbour build process>> %HB_BIN_INSTALL%\hbmk.cfg
echo.>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../contrib/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../contrib/rddsql/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../addins/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../addons/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../examples/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
rem ; Post-build installation

View File

@@ -19,7 +19,7 @@ echo # Generated by Harbour build process>> %HB_BIN_INSTALL%\hbmk.cfg
echo.>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../contrib/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../contrib/rddsql/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../addins/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../addons/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../examples/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
rem ; Post-build installation

View File

@@ -130,36 +130,95 @@ ifeq ($(HB_HOST_ARCH),)
endif
endif
$(info Detected host platform: $(HB_HOST_ARCH))
ifeq ($(HB_BUILD_VERBOSE),yes)
$(info Detected host platform: $(HB_HOST_ARCH))
endif
HB_HOST_CPU :=
ifeq ($(HB_HOST_ARCH),win)
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
HB_HOST_ARCH := win_x86_64
HB_HOST_CPU := x86_64
else ifeq ($(PROCESSOR_ARCHITECTURE),IA64)
HB_HOST_CPU := ia64
else
ifeq ($(PROCESSOR_ARCHITECTURE),IA64)
HB_HOST_ARCH := win_ia64
endif
HB_HOST_CPU := x86
endif
endif
ifneq ($(HB_HOST_ARCH),$(HB_ARCHITECTURE))
ifeq ($(HB_BIN_COMPILE),)
# Not required in these combinations: [vszakats]
ifneq ($(HB_HOST_ARCH)-$(HB_ARCHITECTURE),win_x86_64-win)
ifneq ($(HB_HOST_ARCH)-$(HB_ARCHITECTURE),win-dos)
$(warning Warning: HB_BIN_COMPILE must be specified for cross-builds.)
endif
endif
ifeq ($(HB_BUILD_VERBOSE),yes)
$(info Detected host CPU: $(HB_HOST_CPU))
endif
# TODO: Set this in <arch>/<comp>.cf
HB_CPU :=
ifeq ($(HB_ARCHITECTURE),win)
ifeq ($(HB_COMPILER),msvc64)
HB_CPU := x86_64
else ifeq ($(HB_COMPILER),mingw64)
HB_CPU := x86_64
else ifeq ($(HB_COMPILER),pocc64)
HB_CPU := x86_64
else ifeq ($(HB_COMPILER),msvcia64)
HB_CPU := ia64
else ifeq ($(HB_COMPILER),iccia64)
HB_CPU := ia64
else
HB_CPU := x86
endif
endif
ifneq ($(findstring $(HB_HOST_ARCH),win win_x86_64 win_ia64 wce dos os2),)
ifeq ($(HB_BUILD_VERBOSE),yes)
$(info Detected target CPU: $(HB_CPU))
endif
ifneq ($(findstring $(HB_HOST_ARCH),win wce dos os2),)
HB_HOST_BIN_EXT := .exe
else
HB_HOST_BIN_EXT :=
endif
$(info Detected host executable extension: $(HB_HOST_BIN_EXT))
ifeq ($(HB_BUILD_VERBOSE),yes)
$(info Detected host executable extension: $(HB_HOST_BIN_EXT))
endif
ifneq ($(HB_HOST_ARCH)$(HB_HOST_CPU),$(HB_ARCHITECTURE)$(HB_CPU))
ifeq ($(HB_BIN_COMPILE),)
# Not required in these combinations: [vszakats]
ifneq ($(HB_HOST_ARCH)-$(HB_HOST_CPU)-$(HB_ARCHITECTURE)-$(HB_CPU),win-x86_64-win-x86)
ifneq ($(HB_HOST_ARCH)-$(HB_HOST_CPU)-$(HB_ARCHITECTURE)-$(HB_CPU),win-x86-dos-)
# Try to autosetup
HB_BIN_COMPILE := $(dir $(firstword $(wildcard $(TOP)$(ROOT)bin/$(HB_HOST_ARCH)/*/harbour$(HB_HOST_BIN_EXT))))
ifeq ($(HB_BIN_COMPILE),)
$(warning Warning: HB_BIN_COMPILE not specified. Couldn't find native build.)
else
$(info HB_BIN_COMPILE not specified. Automatically set to: $(HB_BIN_COMPILE))
endif
endif
endif
else
# Setup platform macros (undefine host, define target)
ifeq ($(HB_HOST_ARCH),win)
HB_USER_PRGFLAGS += -undef:__PLATFORM__WINDOWS
else ifeq ($(HB_HOST_ARCH),dos)
HB_USER_PRGFLAGS += -undef:__PLATFORM__DOS
else ifeq ($(HB_HOST_ARCH),os2)
HB_USER_PRGFLAGS += -undef:__PLATFORM__OS2
else ifeq ($(HB_HOST_ARCH),linux)
HB_USER_PRGFLAGS += -undef:__PLATFORM__LINUX -undef:__PLATFORM__UNIX
endif
ifeq ($(HB_ARCHITECTURE),win)
HB_USER_PRGFLAGS += -D__PLATFORM__WINDOWS
else ifeq ($(HB_ARCHITECTURE),wce)
HB_USER_PRGFLAGS += -D__PLATFORM__WINDOWS -D__PLATFORM__WINCE
else ifeq ($(HB_ARCHITECTURE),dos)
HB_USER_PRGFLAGS += -D__PLATFORM__DOS
else ifeq ($(HB_ARCHITECTURE),os2)
HB_USER_PRGFLAGS += -D__PLATFORM__OS2
else ifeq ($(HB_ARCHITECTURE),linux)
HB_USER_PRGFLAGS += -D__PLATFORM__LINUX -D__PLATFORM__UNIX
endif
endif
endif
# Names of valid RDD libraries
HB_DB_DRIVERS=\

View File

@@ -28,9 +28,9 @@ ifneq ($(HB_SHELL),os2)
MK = $(subst /,\,$(subst \~,~,$(MAKE)))
RM = del /q /f
RD = rmdir /q /s
MD = mkdir
CP = $(COMSPEC) /c copy
MV = move
MD = mkdir
dirbase::
-@$(COMSPEC) /c if not exist $(OBJ_DIR_OS) $(MD) $(OBJ_DIR_OS)
@@ -46,9 +46,9 @@ else # OS/2
MK = $(subst /,\,$(subst \~,~,$(MAKE)))
RM = del /n
RD = rmdir
MD = md
CP = copy
MV = move
MD = md
dirbase::
-for %d in ($(OBJ_BASE) $(OBJ_ARCH_DIR_OS) $(OBJ_DIR_OS)) do if not exist %d $(MD) %d

View File

@@ -28,9 +28,9 @@ ifneq ($(HB_SHELL),os2)
MK = $(subst /,\,$(subst \~,~,$(MAKE)))
RM = del /q /f
RD = rmdir /q /s
MD = mkdir
CP = $(COMSPEC) /c copy
MV = move
MD = mkdir
dirbase::
-@$(COMSPEC) /c if not exist $(OBJ_DIR_OS) $(MD) $(OBJ_DIR_OS)
@@ -46,9 +46,9 @@ else # OS/2
MK = $(subst /,\,$(subst \~,~,$(MAKE)))
RM = del /n
RD = rmdir
MD = md
CP = copy
MV = move
MD = md
dirbase::
-for %d in ($(OBJ_BASE) $(OBJ_ARCH_DIR_OS) $(OBJ_DIR_OS)) do if not exist %d $(MD) %d

View File

@@ -36,9 +36,9 @@ EXE_FILE_OS = $(subst /,\,$(EXE_FILE))
MK = $(subst \,/,$(subst \~,~,$(MAKE)))
RM = del /q /f
RD = rmdir /q /s
MD = mkdir
CP = $(COMSPEC) /c copy
MV = move
MD = mkdir
dirbase::
-@$(COMSPEC) /c if not exist $(OBJ_DIR_OS) $(MD) $(OBJ_DIR_OS)

View File

@@ -32,9 +32,9 @@ EXE_FILE_OS = $(subst /,\,$(EXE_FILE))
MK = $(subst \,/,$(subst \~,~,$(MAKE)))
RM = del /q /f
RD = rmdir /q /s
MD = mkdir
CP = $(COMSPEC) /c copy
MV = move
MD = mkdir
dirbase::
-@$(COMSPEC) /c if not exist $(OBJ_DIR_OS) $(MD) $(OBJ_DIR_OS)