From 7d6cf877efbaa7bfc44fce5a8417f755bf8ce053 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 25 Aug 2009 07:18:37 +0000 Subject: [PATCH] 2009-08-25 09:18 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Mentioning dosemu. * bin/postinst.bat + dos shell flavour zip creation. * config/global.mk + Added make platform detection. + Changed 'dos shell on win platform' warning to be based on make platform. + Not showing 'dos make on win platform' warning when doing DJGPP build because this is the right (and only) way in case of this compiler. * config/globsh.mk + Added command line length limit details for dos shell. + Added command line length limit for OS/2. Copied from other .mk file. * config/dirsh.mk * config/instsh.mk - Deleted comments 'We have to use script to overcome the DOS limit of max 128 characters' from all places. * config/dos/djgpp.mk + Will now error if trying to use other than DJGPP make to built with this compiler. --- harbour/ChangeLog | 50 +++++++++++++++++++++++++++++-------- harbour/INSTALL | 1 + harbour/bin/postinst.bat | 16 +++++++++--- harbour/config/dirsh.mk | 1 - harbour/config/dos/djgpp.mk | 10 ++++++++ harbour/config/global.mk | 28 ++++++++++++++++----- harbour/config/globsh.mk | 10 ++++++++ harbour/config/instsh.mk | 2 -- 8 files changed, 95 insertions(+), 23 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9efc543c9c..4253d8bf8d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,34 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-25 09:18 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * INSTALL + + Mentioning dosemu. + + * bin/postinst.bat + + dos shell flavour zip creation. + + * config/global.mk + + Added make platform detection. + + Changed 'dos shell on win platform' warning to be based on make + platform. + + Not showing 'dos make on win platform' warning when doing DJGPP + build because this is the right (and only) way in case of this + compiler. + + * config/globsh.mk + + Added command line length limit details for dos shell. + + Added command line length limit for OS/2. Copied from other .mk file. + + * config/dirsh.mk + * config/instsh.mk + - Deleted comments 'We have to use script to overcome the DOS limit of max 128 characters' + from all places. + + * config/dos/djgpp.mk + + Will now error if trying to use other than DJGPP make + to built with this compiler. + 2009-08-25 03:20 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * bin/postinst.bat + Reworked to work better in cross-build/cross-shell scenarios. @@ -1136,7 +1164,7 @@ 2009-08-21 20:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/globsh.mk - + Extended NOTE about max cmdline lenght on nt shells. + + Extended NOTE about max cmdline length on nt shells. * ChangeLog + Added solution to 'move' problem on nt (and other) shells. @@ -2991,7 +3019,7 @@ 2009-08-15 23:25 UTC+0200 Maurilio Longo (maurilio.longo@libero.it) * config/instsh.cf - ! fixed OS/2 section, work around for OS/2 shell max line lenght. + ! fixed OS/2 section, work around for OS/2 shell max line length. 2009-08-15 18:32 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/global.cf @@ -5952,7 +5980,7 @@ parameters. This replaces WIN_PORTBUFFERS() function. + Added WIN_PORTRECV() function which is similar to WIN_PORTREAD() but returns the result directly rather than putting it in a var - passed by reference. It accepts lenght parameter and return result + passed by reference. It accepts length parameter and return result code by reference. It's a little bit more effient than WIN_PORTREAD(). % Some if/else branches swapped to make code a little smoother. @@ -6014,7 +6042,7 @@ ! fixed OS/2 section, os2-mkdir needs forward slashes as directory separators, not backslashes. * config/instsh.cf - ! fixed OS/2 section, work around for OS/2 shell max line lenght. + ! fixed OS/2 section, work around for OS/2 shell max line length. * config/os2/global.cf * BIN_EXT set to .exe @@ -6342,7 +6370,7 @@ ! Added TOFIX for an lstrcpy() function. This is unsafe and can easily cause buffer overrun. Until someone fixes this properly, I've added a workaround where input - string lenght is checked to be smaller than approriate + string length is checked to be smaller than approriate buffer size. Only compilation was tested using poccarm, I have no WinCE device. Thanks to Tamas Tevesz for pointing to this problem. @@ -42927,7 +42955,7 @@ + Added hb_FileArrayRDD() function to check existence of a table in memory. * Changed EraseArrayRDD() -> hb_EraseArrayRDD() - * removed string lenght limit in case of a Memo field + * removed string length limit in case of a Memo field 2008-11-07 22:45 UTC+0100 Francesco Saverio Giudice (info fsgiudice com) * contrib/xhb/hboutdbg.c @@ -94411,7 +94439,7 @@ All this changes (except Ron's PP) are my work borrowed from xHarbour. ! Fix in ParsePict method * @D function, overwrite the mask for SET DATE FORMAT - * @S without lenght parameter or @S0, they don't have effect. + * @S without length parameter or @S0, they don't have effect. ! Fix in Untransform method * if ::lEdit is false, return ::VarGet() without evaluate @@ -94419,7 +94447,7 @@ All this changes (except Ron's PP) are my work borrowed from xHarbour. * Better detection of a negative, minimizing false detections. * Improvement in the handling of mask. * More compliant in @D, @E, @X, @C, @(, @) functions. - * In compliant with Clipper, the lenght of number (internal lenght) + * In compliant with Clipper, the length of number (internal length) corresponds to the applied picture. ! Bug in conversion with date types and with @E function. @@ -111130,7 +111158,7 @@ NOTICE: static HB_ITEM structures cannot be initialized with hb_itemClear() * utils/hbdoc/genos2.prg utils/hbdoc/os2.prg % Many optimizations - ! Many compile error now are fixed(most was the 255 character line lenght) + ! Many compile error now are fixed(most was the 255 character line length) % Better Table support, Now it generate true Tables * Many thanks for Maurilio Longo.With out his help this changes was not possible @@ -129486,7 +129514,7 @@ NOTE: You have to recompile all PRG sources! + hb_itemDo() and hb_itemDoC() function added, they do the same as hb_eval() but in a lot more convenient way. + hb_itemPutNDLen(), hb_itemPutNILen(), hb_itemPutNLLen() functions added - to make to number lenght setting easier. + to make to number length setting easier. * source/rtl/do.c ! DO() without any parameter caused a GPF. Fixed. * tests/working/rtl_test.prg @@ -129639,7 +129667,7 @@ NOTE: You have to recompile all PRG sources! + hb_arrayGetNL(), hb_arrayGetNI() added to be in sync with Item API. ! hb_arrayGetDate() now properly clears the date field on error. * source/rtl/dir.c - + NOTE: added about the behaviour on reaching array lenght limit. + + NOTE: added about the behaviour on reaching array length limit. * source/rtl/extend.c + NOTE: added about parameter -1 * source/rtl/set.c diff --git a/harbour/INSTALL b/harbour/INSTALL index f412f7eb26..b66da8df82 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -308,6 +308,7 @@ SUPPORTED PLATFORMS AND C COMPILERS win - MS Windows (all flavors) wce - MS Windows CE dos - MS-DOS (32-bit protected mode only) + (MS-DOS compatible system also work, like dosemu) os2 - OS/2 You can use HB_COMPILER values to select compilers: diff --git a/harbour/bin/postinst.bat b/harbour/bin/postinst.bat index 70e3911967..7333eaf124 100644 --- a/harbour/bin/postinst.bat +++ b/harbour/bin/postinst.bat @@ -38,7 +38,7 @@ echo libpaths=../examples/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg if "%HB_SHELL%" == "nt" goto _SH_NT - if "%HB_INSTALL_PREFIX%" == "" goto END + if "%HB_INSTALL_PREFIX%" == "" goto _NO_COPYD copy CHANG* %HB_INSTALL_PREFIX%\CHANGES > nul copy COPYING %HB_INSTALL_PREFIX% > nul @@ -46,6 +46,17 @@ if "%HB_SHELL%" == "nt" goto _SH_NT copy INSTALL %HB_INSTALL_PREFIX% > nul copy TODO %HB_INSTALL_PREFIX% > nul +:_NO_COPYD + + if "%HB_PLATFORM%" == "linux" goto _NO_PKG + if not "%HB_BUILD_PKG%" == "yes" goto _NO_PKG + + echo ! Making Harbour .zip install package: '%HB_TOP%\%HB_PKGNAME%.zip' + if exist "%HB_TOP%\%HB_PKGNAME%.zip" del %HB_TOP%\%HB_PKGNAME%.zip + cd %HB_INSTALL_PREFIX% + cd .. + %HB_DIR_ZIP%zip.exe -q -9 -X -r -o %HB_TOP%\%HB_PKGNAME%.zip . -i %HB_PKGNAME%\* -x *.tds -x *.exp + goto END :_SH_NT @@ -101,8 +112,7 @@ if "%HB_SHELL%" == "nt" goto _SH_NT echo ! Making Harbour .zip install package: '%HB_TOP%\%HB_PKGNAME%.zip' if exist "%HB_TOP%\%HB_PKGNAME%.zip" del "%HB_TOP%\%HB_PKGNAME%.zip" pushd - cd "%HB_INSTALL_PREFIX%" - cd .. + cd "%HB_INSTALL_PREFIX%\.." "%HB_DIR_ZIP%zip.exe" -q -9 -X -r -o "%HB_TOP%\%HB_PKGNAME%.zip" . -i "%HB_PKGNAME%\*" -x *.tds -x *.exp popd diff --git a/harbour/config/dirsh.mk b/harbour/config/dirsh.mk index 6200753bde..d8dd98c8dc 100644 --- a/harbour/config/dirsh.mk +++ b/harbour/config/dirsh.mk @@ -30,7 +30,6 @@ endif ifeq ($(HB_SHELL),dos) -# We have to use script to overcome the DOS limit of max 128 characters # NOTE: The empty line directly before 'endef' HAVE TO exist! # It causes that every command will be separated by LF define dir_mk diff --git a/harbour/config/dos/djgpp.mk b/harbour/config/dos/djgpp.mk index fffad442d5..d6fec7db7c 100644 --- a/harbour/config/dos/djgpp.mk +++ b/harbour/config/dos/djgpp.mk @@ -2,6 +2,16 @@ # $Id$ # +# NOTE: We do need DJGPP build of GNU Make. The reason is +# that this uses special trick to pass command lines +# to other DJGPP tools (like gcc) to overcome 126 +# chars MS-DOS command line length limitation. +# IOW: mingw32-make.exe won't work with DJGPP. +# [vszakats] +ifneq ($(HB_MAKE_PLAT),dos) + $(error ! Error: You must use DJGPP provided GNU Make) +endif + ifeq ($(HB_BUILD_MODE),cpp) HB_CMP := gpp else diff --git a/harbour/config/global.mk b/harbour/config/global.mk index 056ad03c1e..25c68360d8 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -240,6 +240,21 @@ ifeq ($(HB_INIT_DONE),) endif endif +# Make platform detection +ifneq ($(findstring COMMAND,$(SHELL)),) + HB_MAKE_PLAT := dos +else + ifneq ($(findstring sh.exe,$(SHELL)),) + HB_MAKE_PLAT := win + else + ifneq ($(findstring CMD.EXE,$(SHELL)),) + HB_MAKE_PLAT := os2 + else + HB_MAKE_PLAT := unix + endif + endif +endif + ifeq ($(HB_INIT_DONE),) ifneq ($(MAKE_381),) @@ -484,12 +499,6 @@ ifeq ($(HB_INIT_DONE),) ifneq ($(MAKE_381),) $(info ! HB_HOST_PLAT: $(HB_HOST_PLAT)$(if $(HB_HOST_CPU), ($(HB_HOST_CPU)),) HB_SHELL: $(HB_SHELL)) endif - - ifeq ($(HB_HOST_PLAT)-$(HB_SHELL),win-dos) - $(warning ! Warning: You're using DOS GNU Make executable (or DOS shell) on Windows host.) - $(warning ! Not recommended combination. Some features will be disabled.) - $(warning ! Please use the Windows build of GNU Make.) - endif endif HB_PLAT_AUTO := @@ -926,6 +935,13 @@ else endif ifeq ($(HB_INIT_DONE),) + ifneq ($(HB_COMPILER),djgpp) + ifeq ($(HB_HOST_PLAT)-$(HB_MAKE_PLAT),win-dos) + $(warning ! Warning: You're using MS-DOS GNU Make executable on Windows host.) + $(warning ! Not recommended combination. Some features will be disabled.) + $(warning ! Please use the Windows build of GNU Make.) + endif + endif ifneq ($(MAKE_381),) $(info ! HB_PLATFORM: $(HB_PLATFORM)$(if $(HB_CPU), ($(HB_CPU)),) $(HB_PLAT_AUTO)) $(info ! HB_COMPILER: $(HB_COMPILER) $(HB_COMP_AUTO)) diff --git a/harbour/config/globsh.mk b/harbour/config/globsh.mk index bab5bd0045..dd184f3e41 100644 --- a/harbour/config/globsh.mk +++ b/harbour/config/globsh.mk @@ -120,6 +120,9 @@ endif ifeq ($(HB_SHELL),os2) +# NOTE: Maximum size of command line in OS/2 is limited to 1024 +# characters. + # NOTE: Comment on included OS/2 GNU tools: # os2mkdir and os2cp expects forward slashes, while # os2rm expects backslashes in filenames. [vszakats] @@ -157,6 +160,13 @@ endif ifeq ($(HB_SHELL),dos) +# NOTE: DOS command line length has a limit of 126 characters. +# When using DJGPP GNU Make to invoke other DJGPP tools this limit +# is about 13KB, as they do special trick to overcome it. +# See DJGPP (djgppfaq) FAQ 16.4 and 16.5: +# ftp://ftp.delorie.com/pub/djgpp/v2faq/frfaq.zip +# [vszakats] + MK := $(subst \,/,$(MAKE)) RM := $(TOOL_DIR)dosrm -f RDP := $(TOOL_DIR)dosrm -fr diff --git a/harbour/config/instsh.mk b/harbour/config/instsh.mk index f27cbf8b97..580d649a83 100644 --- a/harbour/config/instsh.mk +++ b/harbour/config/instsh.mk @@ -55,7 +55,6 @@ ifeq ($(HB_SHELL),os2) $(foreach file,$(INSTALL_FILES),$(inst_file)) endef - # We have to use script to overcome the DOS limit of max 128 characters # NOTE: The empty line directly before 'endef' HAVE TO exist! # It causes that every command will be separated by LF define inst_file @@ -74,7 +73,6 @@ ifeq ($(HB_SHELL),dos) $(foreach file,$(INSTALL_FILES_OS),$(inst_file)) endef - # We have to use script to overcome the DOS limit of max 128 characters # NOTE: The empty line directly before 'endef' HAVE TO exist! # It causes that every command will be separated by LF define inst_file