See ChangeLog entry 19990716-20:00 EDT David G. Holm <dholm@jsd-llc.com>
This commit is contained in:
@@ -1,3 +1,30 @@
|
||||
19990716-20:00 EDT David G. Holm <dholm@jsd-llc.com>
|
||||
* config/rules.cf
|
||||
+ Added ifeq section for BCC, which requires that the output
|
||||
file be listed ahead of the input file on the command line
|
||||
(at least for version 3.1)
|
||||
+ config/dos/bcc31.cf
|
||||
+ New GNU Make System module for Borland C++ 3.1
|
||||
(adapted from original config/win32/bcc32.cf)
|
||||
* config/dos/global.cf
|
||||
+ Added 'if not exist' to both 'dirbase::' commands
|
||||
+ Added 'if exist' to all deletes of a single file type
|
||||
* config/win32/bcc32.cf
|
||||
* Applied several changes from config/dos/bcc31.cf,
|
||||
but remains untested
|
||||
* doc/gmake.txt
|
||||
+ Added dos/bcc31
|
||||
* source/hbpp/hbpp.c
|
||||
! Temporary fix to avoid an incorrect "Cycled #define" error
|
||||
* source/hbpp/hbppint.c
|
||||
! Use of exit() warrants inclusion of stdlib.h for all compilers
|
||||
* source/rtl/environ.c
|
||||
+ Added RUN() support for MSC, IBMCPP, and GCC for OS/2
|
||||
* tests/working/dosshell.prg
|
||||
+ Added support for OS/2
|
||||
* tests/working/procline.prg
|
||||
- Removed unneeded 'local a' that I accidentally left in earlier
|
||||
|
||||
Fri Jul 16 17:53:35 1999 Gonzalo A. Diethelm <Gonzalo.Diethelm@jda.cl>
|
||||
|
||||
* source/rtl/gt/gtwin.c:
|
||||
|
||||
71
harbour/config/dos/bcc31.cf
Normal file
71
harbour/config/dos/bcc31.cf
Normal file
@@ -0,0 +1,71 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# The Harbour Project
|
||||
# GNU MAKE file for Borland C/C++ 3.1
|
||||
|
||||
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
|
||||
|
||||
OBJ_EXT = .obj
|
||||
EXE_EXT = .exe
|
||||
LIB_PREF =
|
||||
LIB_EXT = .lib
|
||||
|
||||
$(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP = $(subst /,\\,$(GRANDP))
|
||||
_HB_INC_COMPILE = $(subst /,\\,$(HB_INC_COMPILE))
|
||||
_HL = $(notdir $(HB_LIB_COMPILE))
|
||||
ifeq ($(_HL),)
|
||||
#there is an ending slash
|
||||
_HB_LIB_COMPILE = $(subst /,\\,$(HB_LIB_COMPILE))
|
||||
else
|
||||
_HB_LIB_COMPILE = $(subst /,\\,$(HB_LIB_COMPILE)/)
|
||||
endif
|
||||
|
||||
CC = bcc
|
||||
CC_IN = -c
|
||||
CC_OUT = -o
|
||||
CPPFLAGS = -I$($(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP) -I$(_HB_INC_COMPILE)
|
||||
CFLAGS = -O2 -mh
|
||||
|
||||
#Note: The empty line below HAVE TO exist!
|
||||
define link_file
|
||||
echo $(file) >> __link__.tmp
|
||||
|
||||
endef
|
||||
|
||||
|
||||
define link_exe_file
|
||||
echo $(LDFLAGS) -e$@ > __link__.tmp
|
||||
$(foreach file, $^, $(link_file))
|
||||
$(foreach file, $(LINKLIBS), $(link_file))
|
||||
-$(LD) @__link__.tmp
|
||||
endef
|
||||
|
||||
LD = bcc
|
||||
LDFLAGS = -O2 -mh
|
||||
ifeq ($(HB_LIB_COMPILE),)
|
||||
LINKLIBS = $(foreach lib, $(LIBS), $(TOP)$(ROOT)source/$(lib)/$(ARCH)/$(lib)$(LIB_EXT))
|
||||
else
|
||||
LINKLIBS = $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
|
||||
endif
|
||||
LD_RULE = $(link_exe_file)
|
||||
|
||||
#Note: The empty line below HAVE TO exist!
|
||||
define lib_object
|
||||
echo -+$(file) &>> __lib__.tmp
|
||||
|
||||
endef
|
||||
|
||||
define create_library
|
||||
echo $@ &> __lib__.tmp
|
||||
$(foreach file, $^, $(lib_object))
|
||||
echo ,, >> __lib__.tmp
|
||||
$(AR) @__lib__.tmp
|
||||
del __lib__.tmp
|
||||
endef
|
||||
|
||||
AR = tlib
|
||||
ARFLAGS =
|
||||
AR_RULE = $(create_library)
|
||||
|
||||
include $(TOP)$(ROOT)config/rules.cf
|
||||
@@ -34,6 +34,6 @@ clean::
|
||||
-if exist *.obj $(RM) *.obj
|
||||
-if exist core $(RM) core
|
||||
-if exist *.o $(RM) *.o
|
||||
-if exist $(ARCH_DOS) $(RD) $(ARCH_DOS)
|
||||
-if exist $(HB_ARCHITECTURE) $(RD) $(HB_ARCHITECTURE)
|
||||
-$(RD) $(ARCH_DOS)
|
||||
-$(RD) $(HB_ARCHITECTURE)
|
||||
endif
|
||||
@@ -42,6 +42,16 @@ ifeq ($(SOURCE_DIR),)
|
||||
SOURCE_DIR = $(GRANDP)
|
||||
endif
|
||||
|
||||
# BCC (at least version 3.1) requires that the output file be listed ahead of the input file
|
||||
ifeq ($(CC),bcc)
|
||||
# Rule to generate an object file from a C source file in the parent.
|
||||
%$(OBJ_EXT) : $(SOURCE_DIR)%.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_OUT)$(subst .c,$(OBJ_EXT),$(subst $(SOURCE_DIR),,$?)) $(CC_IN) $?
|
||||
|
||||
# Rule to generate an object file from a C source file.
|
||||
%$(OBJ_EXT) : %.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_OUT)$(?:.c=$(OBJ_EXT)) $(CC_IN) $?
|
||||
else
|
||||
# Rule to generate an object file from a C source file in the parent.
|
||||
%$(OBJ_EXT) : $(SOURCE_DIR)%.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_IN) $? $(CC_OUT)$(subst .c,$(OBJ_EXT),$(subst $(SOURCE_DIR),,$?))
|
||||
@@ -49,6 +59,7 @@ endif
|
||||
# Rule to generate an object file from a C source file.
|
||||
%$(OBJ_EXT) : %.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_IN) $? $(CC_OUT)$(?:.c=$(OBJ_EXT))
|
||||
endif
|
||||
|
||||
# Rule to generate an executable file from an object file.
|
||||
%$(EXE_EXT) : %$(OBJ_EXT)
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
#
|
||||
# The Harbour Project
|
||||
# GNU MAKE file for Borland C/C++ Builder
|
||||
#
|
||||
# This code is NOT TESTED yet! (19990711)
|
||||
|
||||
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
|
||||
|
||||
@@ -18,16 +16,16 @@ _HB_INC_COMPILE = $(subst /,\\,$(HB_INC_COMPILE))
|
||||
_HL = $(notdir $(HB_LIB_COMPILE))
|
||||
ifeq ($(_HL),)
|
||||
#there is an ending slash
|
||||
_HB_LIB_COMPILE = $(subst /,\,$(HB_LIB_COMPILE))
|
||||
_HB_LIB_COMPILE = $(subst /,\\,$(HB_LIB_COMPILE))
|
||||
else
|
||||
_HB_LIB_COMPILE = $(subst /,\,$(HB_LIB_COMPILE)/)
|
||||
_HB_LIB_COMPILE = $(subst /,\\,$(HB_LIB_COMPILE)/)
|
||||
endif
|
||||
|
||||
CC = bcc32
|
||||
CC_IN = -c
|
||||
CC_OUT = -o
|
||||
CPPFLAGS = -O2
|
||||
CFLAGS = -i. -i$(_HB_INC_COMPILE)
|
||||
CPPFLAGS = -I$($(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP) -I$(_HB_INC_COMPILE)
|
||||
CFLAGS = -O2
|
||||
|
||||
#Note: The empty line below HAVE TO exist!
|
||||
define link_file
|
||||
@@ -43,20 +41,25 @@ $(COMSPEC) /E:2048 /Cecho $(LINKLIBS) >> __link__.tmp
|
||||
-$(LD) @__link__.tmp
|
||||
endef
|
||||
|
||||
LD = bcc32
|
||||
LD = bcc
|
||||
LDFLAGS = -O2
|
||||
LINKLIBS = $(foreach lib, $(LIBS), $(_HB_LIB_COMPILE)$(lib))
|
||||
ifeq ($(HB_LIB_COMPILE),)
|
||||
LINKLIBS = $(foreach lib, $(LIBS), $(TOP)$(ROOT)source/$(lib)/$(ARCH)/$(lib)$(LIB_EXT))
|
||||
else
|
||||
LINKLIBS = $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
|
||||
endif
|
||||
LD_RULE = $(link_exe_file)
|
||||
|
||||
#Note: The empty line below HAVE TO exist!
|
||||
define lib_object
|
||||
echo -+$(file) >> __lib__.tmp
|
||||
echo -+$(file) &>> __lib__.tmp
|
||||
|
||||
endef
|
||||
|
||||
define create_library
|
||||
echo $@ > __lib__.tmp
|
||||
echo $@ &> __lib__.tmp
|
||||
$(foreach file, $^, $(lib_object))
|
||||
echo ,, >> __lib__.tmp
|
||||
$(AR) @__lib__.tmp
|
||||
del __lib__.tmp
|
||||
endef
|
||||
@@ -66,4 +69,3 @@ ARFLAGS =
|
||||
AR_RULE = $(create_library)
|
||||
|
||||
include $(TOP)$(ROOT)config/rules.cf
|
||||
|
||||
|
||||
@@ -157,6 +157,10 @@ For IBM Visual Age C++ on OS/2:
|
||||
HB_ARCHITECTURE os2
|
||||
HB_COMPILER icc
|
||||
|
||||
For Borland C++ 3.1
|
||||
HB_ARCHITECTURE dos
|
||||
HB_COMPILER bcc31
|
||||
|
||||
For DJGPP (GCC port for DOS)
|
||||
HB_ARCHITECTURE dos
|
||||
HB_COMPILER djgpp
|
||||
|
||||
@@ -544,11 +544,11 @@ int ParseExpression( char* sLine, char* sOutLine )
|
||||
if ( (stdef=DefSearch(sToken)) != NULL )
|
||||
{
|
||||
for(i=0;i<kolused;i++) if ( aUsed[i] == stdef ) break;
|
||||
if ( i < kolused )
|
||||
/*if ( i < kolused )
|
||||
{
|
||||
if ( i < lastused ) GenError( _szPErrors, 'P', ERR_RECURSE, NULL, NULL );
|
||||
}
|
||||
else if ( WorkDefine ( &ptri, &ptro, stdef, lenToken ) )
|
||||
else */if ( WorkDefine ( &ptri, &ptro, stdef, lenToken ) )
|
||||
{
|
||||
aUsed[kolused++] = stdef;
|
||||
rezDef++;
|
||||
|
||||
@@ -25,13 +25,12 @@
|
||||
their web site at http://www.gnu.org/).
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#if defined(__GNUC__)
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#if (defined(_MSC_VER) || defined(__IBMCPP__) || defined(__WATCOMC__))
|
||||
#include <memory.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <alloc.h>
|
||||
#include <mem.h>
|
||||
|
||||
@@ -263,7 +263,7 @@ HARBOUR HB_GETENV(void)
|
||||
*/
|
||||
HARBOUR HB___RUN( void )
|
||||
{
|
||||
#if defined(__TURBOC__) || defined(__BORLANDC__) || defined(__DJGPP__)
|
||||
#if defined(__TURBOC__) || defined(__BORLANDC__) || defined(__DJGPP__) || defined(__MSC__) || defined(_MSC_VER) || defined(__IBMCPP__) || defined(HARBOUR_GCC_OS2)
|
||||
if( hb_pcount() == 1 ) /* Parameter passed */
|
||||
{
|
||||
system( hb_parc( 1 ) );
|
||||
|
||||
@@ -21,11 +21,12 @@ function Main()
|
||||
local cOs := Upper( OS() )
|
||||
local cShell := GetEnv("COMSPEC")
|
||||
|
||||
if (at( "WINDOWS", cOs ) != 0) .or. at( "DOS", cOs ) != 0
|
||||
if at( "WINDOWS", cOs ) != 0 .or. at( "DOS", cOs ) != 0 ;
|
||||
.or. at( "OS/2", cOs ) != 0
|
||||
? "About to shell to DOS.."
|
||||
! (cShell)
|
||||
? "Hey, I am back !"
|
||||
else
|
||||
? "Sorry this program is for Windows and DOS only"
|
||||
? "Sorry this program is for Windows, DOS, and OS/2 only"
|
||||
endif
|
||||
return nil
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
FUNCTION Main()
|
||||
local a
|
||||
|
||||
? "hello 1", ProcLine(), "Expected: ", 8
|
||||
|
||||
? "hello 2", ProcLine(), "Expected: ", 10
|
||||
|
||||
Reference in New Issue
Block a user