From c8f03dd0c7afa74ee86f0fbcffaba0e245a04481 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 17 Feb 2009 00:12:11 +0000 Subject: [PATCH] 2009-02-17 01:03 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * contrib/gtwvg/make_b32.bat * contrib/gtwvg/make_vc.bat * contrib/gtwvg/Makefile * Trying new method to point to hbwin, so that we're not relying on hbwin headers being installed. ; Please test. * contrib/Makefile + Added hbblat. * contrib/make_vc_all.bat * contrib/make_b32_all.bat * contrib/make_gcc_all.sh * contrib/hbblat/Makefile * contrib/hbblat/common.mak * contrib/hbblat/make_b32.bat * contrib/hbblat/make_vc.bat * contrib/hbblat/blatwrp.c * contrib/hbblat/tests/hbmk.bat * contrib/hbblat/tests/blatcmd.prg + Added support for HB_INC_BLAT (needed for releases). * Some EOLs added. * Minor correction to .ch name in make files. % Replaced command line retrieval with hb_cmdline() call. * Cleaned some headers/#defines. * GNU make file got protection to only compile for win, and to install headers. * make_gnu.bat * contrib/hbct/Makefile * contrib/hbwin/Makefile * Minor formatting. --- harbour/ChangeLog | 34 ++++++++++++++++++++ harbour/contrib/Makefile | 1 + harbour/contrib/gtwvg/Makefile | 4 +-- harbour/contrib/gtwvg/make_b32.bat | 2 ++ harbour/contrib/gtwvg/make_vc.bat | 2 ++ harbour/contrib/hbblat/Makefile | 23 +++++++++---- harbour/contrib/hbblat/blatwrp.c | 17 +++------- harbour/contrib/hbblat/common.mak | 2 +- harbour/contrib/hbblat/make_b32.bat | 10 ++++-- harbour/contrib/hbblat/make_vc.bat | 22 ++++++++----- harbour/contrib/hbblat/tests/blatcmd.prg | 41 +----------------------- harbour/contrib/hbblat/tests/hbmk.bat | 2 +- harbour/contrib/hbct/Makefile | 4 +-- harbour/contrib/hbwin/Makefile | 4 +-- harbour/contrib/make_b32_all.bat | 4 +-- harbour/contrib/make_gcc_all.sh | 1 + harbour/contrib/make_vc_all.bat | 4 +-- harbour/make_gnu.bat | 2 +- 18 files changed, 97 insertions(+), 82 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 75cfd873bb..a16467c8f1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,40 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-02-17 01:03 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * contrib/gtwvg/make_b32.bat + * contrib/gtwvg/make_vc.bat + * contrib/gtwvg/Makefile + * Trying new method to point to hbwin, so that + we're not relying on hbwin headers being installed. + ; Please test. + + * contrib/Makefile + + Added hbblat. + + * contrib/make_vc_all.bat + * contrib/make_b32_all.bat + * contrib/make_gcc_all.sh + * contrib/hbblat/Makefile + * contrib/hbblat/common.mak + * contrib/hbblat/make_b32.bat + * contrib/hbblat/make_vc.bat + * contrib/hbblat/blatwrp.c + * contrib/hbblat/tests/hbmk.bat + * contrib/hbblat/tests/blatcmd.prg + + Added support for HB_INC_BLAT (needed for releases). + * Some EOLs added. + * Minor correction to .ch name in make files. + % Replaced command line retrieval with hb_cmdline() call. + * Cleaned some headers/#defines. + * GNU make file got protection to only compile for win, + and to install headers. + + * make_gnu.bat + * contrib/hbct/Makefile + * contrib/hbwin/Makefile + * Minor formatting. + 2009-02-16 23:55 UTC+0100 Francesco Saverio Giudice (info/at/fsgiudice.com) + harbour/contrib/hbblat + harbour/contrib/hbblat/blatcls.prg diff --git a/harbour/contrib/Makefile b/harbour/contrib/Makefile index c555229301..52a3e9700f 100644 --- a/harbour/contrib/Makefile +++ b/harbour/contrib/Makefile @@ -35,6 +35,7 @@ DIRS=\ DIRS +=\ gtalleg \ hbapollo \ + hbblat \ hbcurl \ hbfbird \ hbfimage \ diff --git a/harbour/contrib/gtwvg/Makefile b/harbour/contrib/gtwvg/Makefile index 88d7461bcf..76c6a20bce 100644 --- a/harbour/contrib/gtwvg/Makefile +++ b/harbour/contrib/gtwvg/Makefile @@ -2,6 +2,8 @@ # $Id$ # +HB_USER_CFLAGS += -I$(TOP)$(ROOT)contrib/hbwin + ROOT = ../../ LIBNAME=gtwvg @@ -17,7 +19,6 @@ C_SOURCES=\ wvggui.c \ wincallb.c \ - PRG_SOURCES=\ wvgclass.prg \ wvgpaint.prg \ @@ -46,7 +47,6 @@ PRG_SOURCES=\ wvgsysw.prg \ wvgdarea.prg \ - PRG_HEADERS=\ hbgtwvg.ch \ wvtwin.ch \ diff --git a/harbour/contrib/gtwvg/make_b32.bat b/harbour/contrib/gtwvg/make_b32.bat index c484512c4c..46519b6255 100644 --- a/harbour/contrib/gtwvg/make_b32.bat +++ b/harbour/contrib/gtwvg/make_b32.bat @@ -3,4 +3,6 @@ rem rem $Id$ rem +set CFLAGS=-I..\hbwin + call ..\mtpl_b32.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/harbour/contrib/gtwvg/make_vc.bat b/harbour/contrib/gtwvg/make_vc.bat index 4ceb9b9261..7ca0702467 100644 --- a/harbour/contrib/gtwvg/make_vc.bat +++ b/harbour/contrib/gtwvg/make_vc.bat @@ -3,4 +3,6 @@ rem rem $Id$ rem +set CFLAGS=-I..\hbwin + call ..\mtpl_vc.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/harbour/contrib/hbblat/Makefile b/harbour/contrib/hbblat/Makefile index 479e5c77ae..9331c98138 100644 --- a/harbour/contrib/hbblat/Makefile +++ b/harbour/contrib/hbblat/Makefile @@ -4,15 +4,26 @@ ROOT = ../../ +LIBNAME=hbblat + +ifeq ($(HB_ARCHITECTURE),win) + C_SOURCES = \ blatwrp.c \ -PRG_SOURCES= \ - blatcls.prg \ +PRG_SOURCES = \ + blatcls.prg \ -PRG_HEADERS=\ - blat.ch \ - -LIBNAME=hbblat +PRG_HEADERS = \ + hbblat.ch \ +include $(TOP)$(ROOT)config/header.cf +INSTALL_RULE_HEADERS := $(INSTALL_RULE) include $(TOP)$(ROOT)config/lib.cf + +install:: + $(INSTALL_RULE_HEADERS) + +else +include $(TOP)$(ROOT)config/none.cf +endif diff --git a/harbour/contrib/hbblat/blatwrp.c b/harbour/contrib/hbblat/blatwrp.c index 21b5076aff..03bdb4894d 100644 --- a/harbour/contrib/hbblat/blatwrp.c +++ b/harbour/contrib/hbblat/blatwrp.c @@ -50,20 +50,15 @@ * */ -/* NOTE: we need this to prevent base types redefinition */ -#define _CLIPDEFS_H - -#define HB_OS_WIN_32_USED - #include "hbapi.h" -#include "hbapiitm.h" -#include "hbstack.h" #include "hbapierr.h" -#include "hbapifs.h" + +/* NOTE: We're not using the original blat headers, because they + contain C++ parts, which we don't need anyway. */ /* ---------------------------------------------------------------------------*/ -extern int cSend( char *szCmd ); +extern int cSend( char * szCmd ); /* ---------------------------------------------------------------------------*/ @@ -84,12 +79,10 @@ HB_FUNC( HB_BLATSEND ) // void BlatSend( char *szCmd ) /* Return result */ hb_retni( iRet ); - } else - // Parameter error + /* Parameter error */ hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } /* ---------------------------------------------------------------------------*/ - diff --git a/harbour/contrib/hbblat/common.mak b/harbour/contrib/hbblat/common.mak index 70e9be0dcb..edabedef58 100644 --- a/harbour/contrib/hbblat/common.mak +++ b/harbour/contrib/hbblat/common.mak @@ -7,7 +7,7 @@ LIBNAME = $(LIBPREF)hbblat LIB_PATH = $(LIB_DIR)\$(LIBNAME)$(LIBEXT) PRG_HEADERS = \ - blat.ch \ + hbblat.ch \ LIB_OBJS = \ $(OBJ_DIR)\blatwrp$(OBJEXT) \ diff --git a/harbour/contrib/hbblat/make_b32.bat b/harbour/contrib/hbblat/make_b32.bat index e207907f88..cc9dceca1e 100644 --- a/harbour/contrib/hbblat/make_b32.bat +++ b/harbour/contrib/hbblat/make_b32.bat @@ -3,19 +3,23 @@ rem rem $Id$ rem -if not "%HB_DIR_BLAT%" == "" goto DIR_OK +if not "%HB_INC_BLAT%%HB_DIR_BLAT%" == "" goto DIR_OK echo --------------------------------------------------------------- echo IMPORTANT: You'll need blat dll from here: echo http://blat.sourceforge.net/ (Download section) echo and this envvar to be set to successfully build this library: -echo set HB_DIR_BLAT=C:\Blat +echo set HB_INC_BLAT=C:\blat\full\source +echo or +echo set HB_DIR_BLAT=C:\blat +echo if you want to generate .lib for the .dll. echo --------------------------------------------------------------- goto POST_EXIT :DIR_OK -set CFLAGS= +if "%HB_INC_BLAT%" == "" set HB_INC_BLAT=%HB_DIR_BLAT%\full\source +set CFLAGS=-I"%HB_INC_BLAT%" set _HB_DLL_NAME=blat set _HB_DLL_DIR=%HB_DIR_BLAT%\full diff --git a/harbour/contrib/hbblat/make_vc.bat b/harbour/contrib/hbblat/make_vc.bat index 91e820b14b..184372aeeb 100644 --- a/harbour/contrib/hbblat/make_vc.bat +++ b/harbour/contrib/hbblat/make_vc.bat @@ -3,19 +3,23 @@ rem rem $Id$ rem -if not "%HB_DIR_BLAT%" == "" goto DIR_OK +if not "%HB_INC_BLAT%%HB_DIR_BLAT%" == "" goto DIR_OK echo --------------------------------------------------------------- echo IMPORTANT: You'll need blat dll from here: echo http://blat.sourceforge.net/ (Download section) echo and this envvar to be set to successfully build this library: -echo set HB_DIR_BLAT=C:\Blat +echo set HB_INC_BLAT=C:\blat\full\source +echo or +echo set HB_DIR_BLAT=C:\blat +echo if you want to generate .lib for the .dll. echo --------------------------------------------------------------- goto POST_EXIT :DIR_OK -set CFLAGS= +if "%HB_INC_BLAT%" == "" set HB_INC_BLAT=%HB_DIR_BLAT%\full\source +set CFLAGS=-I"%HB_INC_BLAT%" set _HB_DLL_NAME=blat set _HB_DLL_DIR=%HB_DIR_BLAT%\full @@ -25,6 +29,8 @@ call ..\mtpl_vc.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 rem --------------------------------------------------------------- +if "%HB_DIR_BLAT%" == "" goto POST_EXIT + set _HB_INSTALL_PREFIX=%HB_INSTALL_PREFIX% if "%_HB_INSTALL_PREFIX%" == "" set _HB_INSTALL_PREFIX=..\.. set _HB_LIB_INSTALL=%HB_LIB_INSTALL% @@ -45,15 +51,15 @@ if "%1" == "INSTALL" goto POST_INSTALL :POST_CLEAN - if exist ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib del ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib > nul - if exist ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.exp del ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.exp > nul - if exist %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib del %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib > nul + if exist ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib del ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib > nul + if exist ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.exp del ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.exp > nul + if exist %_HB_LIB_INSTALL%\%_HB_DLL_NAME%.lib del %_HB_LIB_INSTALL%\%_HB_DLL_NAME%.lib > nul goto POST_EXIT :POST_INSTALL - if exist %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib del %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib - if exist ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib copy ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib %_HB_LIB_INSTALL% + if exist %_HB_LIB_INSTALL%\%_HB_DLL_NAME%.lib del %_HB_LIB_INSTALL%\%_HB_DLL_NAME%.lib + if exist ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib copy ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib %_HB_LIB_INSTALL% goto POST_EXIT :POST_EXIT diff --git a/harbour/contrib/hbblat/tests/blatcmd.prg b/harbour/contrib/hbblat/tests/blatcmd.prg index ee9e16e8ba..a172e297d5 100644 --- a/harbour/contrib/hbblat/tests/blatcmd.prg +++ b/harbour/contrib/hbblat/tests/blatcmd.prg @@ -55,7 +55,7 @@ PROCEDURE Main() - LOCAL cCmd := GetParams() + LOCAL cCmd := hb_cmdline() LOCAL nRet ? "Simple BLAT Command interface" @@ -69,42 +69,3 @@ PROCEDURE Main() ENDIF RETURN - -STATIC FUNCTION GetParams() - LOCAL cCmd := WAPI_GetCommandLine() - LOCAL n - - // Search first space after program name - n := AT( " ", cCmd ) - IF n > 0 - // remove program name - cCmd := SubStr( cCmd, n + 1 ) - ELSE - // empty params list - cCmd := "" - ENDIF - -RETURN cCmd - -//----------------------------------------- - -// TODO: move to hbwin lib -#pragma BEGINDUMP - -#define HB_OS_WIN_32_USED - -#include - -#include "hbapi.h" -#include "hbapiitm.h" -#include "hbstack.h" -#include "hbapierr.h" -#include "hbapifs.h" - -/* GetCommandLine() returns entire command line as a single string */ -HB_FUNC( WAPI_GETCOMMANDLINE ) -{ - hb_retc( GetCommandLine() ); -} - -#pragma ENDDUMP diff --git a/harbour/contrib/hbblat/tests/hbmk.bat b/harbour/contrib/hbblat/tests/hbmk.bat index ff64f3bcbd..9194fb81a8 100644 --- a/harbour/contrib/hbblat/tests/hbmk.bat +++ b/harbour/contrib/hbblat/tests/hbmk.bat @@ -4,4 +4,4 @@ @set HB_USER_LIBS=hbblat.lib blat.lib -@..\..\..\bin\hbmk %* -I.. \ No newline at end of file +@..\..\..\bin\hbmk %* diff --git a/harbour/contrib/hbct/Makefile b/harbour/contrib/hbct/Makefile index 42925cac31..b94e20e7a6 100644 --- a/harbour/contrib/hbct/Makefile +++ b/harbour/contrib/hbct/Makefile @@ -4,6 +4,8 @@ ROOT = ../../ +LIBNAME=hbct + C_SOURCES =\ addascii.c \ asciisum.c \ @@ -117,8 +119,6 @@ PRG_HEADERS=\ ctextern.ch \ ctvideo.ch \ -LIBNAME=hbct - include $(TOP)$(ROOT)config/header.cf INSTALL_RULE_HEADERS := $(INSTALL_RULE) include $(TOP)$(ROOT)config/lib.cf diff --git a/harbour/contrib/hbwin/Makefile b/harbour/contrib/hbwin/Makefile index ced4efeb10..e4ef5a90a7 100644 --- a/harbour/contrib/hbwin/Makefile +++ b/harbour/contrib/hbwin/Makefile @@ -8,7 +8,7 @@ LIBNAME=hbwin ifeq ($(HB_ARCHITECTURE),win) -C_SOURCES=\ +C_SOURCES = \ win_dll.c \ win_misc.c \ win_ole.c \ @@ -19,7 +19,7 @@ C_SOURCES=\ win_regc.c \ wapi_commctrl.c \ -PRG_SOURCES=\ +PRG_SOURCES = \ win_os.prg \ win_reg.prg \ win_tole.prg \ diff --git a/harbour/contrib/make_b32_all.bat b/harbour/contrib/make_b32_all.bat index df9e3182b5..cc243b4cae 100644 --- a/harbour/contrib/make_b32_all.bat +++ b/harbour/contrib/make_b32_all.bat @@ -55,7 +55,7 @@ for %%n in ( %_HB_DIRS% ) do %COMSPEC% /c %_HB_BATWORKER% %%n %1 %2 %3 %4 %5 %6 set _HB_DIRS=rddado rddsql xhb if not "%HB_INC_ALLEGRO%%HB_DIR_ALLEGRO%" == "" set _HB_DIRS=%_HB_DIRS% gtalleg if not "%HB_INC_APOLLO%%HB_DIR_APOLLO%" == "" set _HB_DIRS=%_HB_DIRS% hbapollo -if not "%HB_DIR_BLAT%" == "" set _HB_DIRS=%_HB_DIRS% hbblat +if not "%HB_INC_BLAT%%HB_DIR_BLAT%" == "" set _HB_DIRS=%_HB_DIRS% hbblat if not "%HB_INC_CURL%%HB_DIR_CURL%" == "" set _HB_DIRS=%_HB_DIRS% hbcurl if not "%HB_INC_FIREBIRD%%HB_DIR_FIREBIRD%" == "" set _HB_DIRS=%_HB_DIRS% hbfbird if not "%HB_INC_FREEIMAGE%%HB_DIR_FREEIMAGE%" == "" set _HB_DIRS=%_HB_DIRS% hbfimage @@ -80,4 +80,4 @@ del %_HB_BATWORKER% > nul set _HB_DIRS= set _HB_BATWORKER= -set HB_SHOW_ERRORS= \ No newline at end of file +set HB_SHOW_ERRORS= diff --git a/harbour/contrib/make_gcc_all.sh b/harbour/contrib/make_gcc_all.sh index 32f1294a5d..719cb1a0be 100755 --- a/harbour/contrib/make_gcc_all.sh +++ b/harbour/contrib/make_gcc_all.sh @@ -52,6 +52,7 @@ else if [ "${HB_INC_ALLEGRO}" != "" ]; then _HB_DIRS="${_HB_DIRS} gtalleg" ; fi; if [ "${HB_INC_APOLLO}" != "" ]; then _HB_DIRS="${_HB_DIRS} hbapollo"; fi; + if [ "${HB_INC_BLAT}" != "" ]; then _HB_DIRS="${_HB_DIRS} hbblat" ; fi; if [ "${HB_INC_CURL}" != "" ]; then _HB_DIRS="${_HB_DIRS} hbcurl" ; fi; if [ "${HB_INC_FIREBIRD}" != "" ]; then _HB_DIRS="${_HB_DIRS} hbfbird" ; fi; if [ "${HB_INC_FREEIMAGE}" != "" ]; then _HB_DIRS="${_HB_DIRS} hbfimage"; fi; diff --git a/harbour/contrib/make_vc_all.bat b/harbour/contrib/make_vc_all.bat index 746c1a3e8d..ea07e955bf 100644 --- a/harbour/contrib/make_vc_all.bat +++ b/harbour/contrib/make_vc_all.bat @@ -55,7 +55,7 @@ for %%n in ( %_HB_DIRS% ) do %COMSPEC% /c %_HB_BATWORKER% %%n %1 %2 %3 %4 %5 %6 set _HB_DIRS=rddado rddsql xhb if not "%HB_INC_ALLEGRO%%HB_DIR_ALLEGRO%" == "" set _HB_DIRS=%_HB_DIRS% gtalleg if not "%HB_INC_APOLLO%%HB_DIR_APOLLO%" == "" set _HB_DIRS=%_HB_DIRS% hbapollo -if not "%HB_DIR_BLAT%" == "" set _HB_DIRS=%_HB_DIRS% hbblat +if not "%HB_INC_BLAT%%HB_DIR_BLAT%" == "" set _HB_DIRS=%_HB_DIRS% hbblat if not "%HB_INC_CURL%%HB_DIR_CURL%" == "" set _HB_DIRS=%_HB_DIRS% hbcurl if not "%HB_INC_FIREBIRD%%HB_DIR_FIREBIRD%" == "" set _HB_DIRS=%_HB_DIRS% hbfbird if not "%HB_INC_FREEIMAGE%%HB_DIR_FREEIMAGE%" == "" set _HB_DIRS=%_HB_DIRS% hbfimage @@ -80,4 +80,4 @@ del %_HB_BATWORKER% > nul set _HB_DIRS= set _HB_BATWORKER= -set HB_SHOW_ERRORS= \ No newline at end of file +set HB_SHOW_ERRORS= diff --git a/harbour/make_gnu.bat b/harbour/make_gnu.bat index 282caaafb8..573a2f65a3 100644 --- a/harbour/make_gnu.bat +++ b/harbour/make_gnu.bat @@ -89,7 +89,7 @@ if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=%HB_INSTALL_PREFIX%/include echo. echo HB_USER_PRGFLAGS - Extra Harbour compiler options echo HB_USER_CFLAGS - Extra C compiler options - echo HB_USER_LDFLAGS - Extra linker options + echo HB_USER_LDFLAGS - Extra linker options goto END :BAD_ARCH