Changeset 9063 for trunk/make/testcase


Ignore:
Timestamp:
Aug 20, 2002, 11:14:30 PM (23 years ago)
Author:
bird
Message:

Bugfixes.

Location:
trunk/make/testcase
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/make/testcase/Makefile

    r9059 r9063  
    1 # $Id: Makefile,v 1.3 2002-08-20 19:09:59 bird Exp $
     1# $Id: Makefile,v 1.4 2002-08-20 21:14:29 bird Exp $
    22
    33#
     
    9494    @echo # >> $@
    9595    @echo #   CC_ENVIRONMENTS >> $@
    96 # WAT11C-16  doesn't work :((
    9796    @for %%j in ($(MODES)) do $(COMSPEC) /C "echo   set BUILD_MODE=%%j >> $@ & \
    98         for %%%%i in ($(CC_ENVIRONMENTS:WAT11C-16=)) do echo     $(TOOL_MAKE) -f dll-prog-c.mak BUILD_ENV_FORCE=%%%%i rebuild test clean >> $@"
     97        for %%%%i in ($(CC_ENVIRONMENTS)) do echo     $(TOOL_MAKE) -f dll-prog-c.mak BUILD_ENV_FORCE=%%%%i rebuild test clean >> $@"
    9998!endif
    10099!if 1
  • trunk/make/testcase/dll-c.c

    r8423 r9063  
    1 /* $Id: dll-c.c,v 1.1 2002-05-16 11:37:06 bird Exp $
     1/* $Id: dll-c.c,v 1.2 2002-08-20 21:14:29 bird Exp $
    22 *
    33 * Test DLL.
     
    2323
    2424#if (defined(__IBMCPP__) || defined(__IBMC__))
    25 
     25/*
     26 * IBM C/C++
     27 */
    2628#define DLLENTRYPOINT_CCONV _System
    2729#define DLLENTRYPOINT_NAME  _DLL_InitTerm
     
    3436#define ctordtorTerm()  __ctordtorTerm()
    3537
    36 #elif (__IBMCPP__ == 360) || (__IBMC__ == 360)
     38#elif (__IBMCPP__ >= 360) || (__IBMC__ >= 360)
    3739void _Optlink __ctordtorInit( int flag );
    3840#define ctordtorInit()  __ctordtorInit(0)
     
    4244
    4345#else
    44 #error "Unknown compiler!"
     46#error "Unknown IBM compiler!"
    4547#endif
    4648
     
    4850void _Optlink _CRT_term(void);
    4951
     52
    5053#elif defined(__WATCOMC__)
    51 
     54/*
     55 * Watcom C
     56 */
    5257#define DLLENTRYPOINT_CCONV _syscall
    5358#define DLLENTRYPOINT_NAME  LibMain
     
    5964#define _CRT_term() ((void)0)
    6065
    61 #endif
     66#ifdef __16BIT__
     67#define LOADDS _loadds
     68#endif
     69
     70
     71#elif defined(_MSC_VER)
     72/*
     73 * MS C
     74 */
     75#ifdef __16BIT__
     76#define LOADDS _loadds
     77#endif
     78
     79#elif defined(__GNUC__) && defined(__EMX__)
     80/*
     81 * GCC+EMX
     82 */
     83#define DLLENTRYPOINT_CCONV _System
     84#define DLLENTRYPOINT_NAME  _DLL_InitTerm
     85
     86#define ctordtorInit() ((void)0)
     87#define ctordtorTerm() ((void)0)
     88
     89int  _CRT_init(void);
     90void _CRT_term(void);
     91
     92
     93#endif /* compilers */
    6294
    6395#ifdef __cplusplus
     
    6597#endif
    6698
     99
     100#ifndef LOADDS
     101#ifdef __16BIT__
     102#error "16-bit compiles must must define LOADDS!"
     103#else
     104#define LOADDS
     105#endif
     106#endif
    67107
    68108
     
    76116#ifdef OS2
    77117#include <os2.h>
    78 #define OSCALL APIENTRY
     118#define OSCALL APIENTRY LOADDS
    79119#endif
    80120
     
    83123 * @returns 0 on success.
    84124 */
    85 int OSCALL FOO42(void)
     125int OSCALL LOADDS FOO42(void)
    86126{
    87127    long double lrd = asin(cos(0));
     
    124164
    125165
    126 int OSCALL FOONAME(void)
     166int OSCALL LOADDS FOONAME(void)
    127167{
    128168    puts("FOOName");
  • trunk/make/testcase/dll-c.mak

    r9053 r9063  
    1 # $Id: dll-c.mak,v 1.2 2002-08-20 07:56:24 bird Exp $
     1# $Id: dll-c.mak,v 1.3 2002-08-20 21:14:29 bird Exp $
    22
    33# Testcase for makeing simple C DLLs.
    44
    55# root & setup
    6 !if "$(BUILD_ENV)" == "WAT11C-16"
     6!if "$(BUILD_ENV)" == "WAT11C-16" || "$(BUILD_ENV)" == "MSCV6-16"
    77ALL_MODEL=LARGE
    88!endif
    9 TARGET_MODE = DLL #watcom workaround (again!)
     9TARGET_MODE = DLL #watcom+msc6-16 workaround (again!)
    1010PATH_ROOT=..\..
    1111!include $(PATH_ROOT)\make\setup.mak
     
    1717
    1818# rules and more
     19RULES_FORWARD = test
    1920!include $(MAKE_INCLUDE_PROCESS)
     21
     22!if !$(BUILD_FORWARDING)
    2023
    2124
     
    3841# validate that the executable actually runs and produces the desired output.
    3942#
     43OUTFILE=out
    4044test:
    41 !if "$(MAKE_INCLUDE_PROCESS:process.forwarder=)" == "$(MAKE_INCLUDE_PROCESS)"
    4245    $(TOOL_MAKE) -f dll-prog-c.mak rebuild
    43     $(PATH_OBJ)\dll-prog-c.exe\dll-prog-c.exe $(TARGET) > out
     46    $(PATH_OBJ)\dll-prog-c.exe\dll-prog-c.exe $(TARGET) > $(OUTFILE)
    4447! ifdef BUILD_VERBOSE
    45     type out
     48    type $(OUTFILE)
    4649! endif
    47     $(TOOL_CMP) out <<
     50    $(TOOL_CMP) $(OUTFILE) <<
    4851DLLInit
    4952$(_STR1)
     
    5356<<
    5457    $(TOOL_MAKE) -f dll-prog-c.mak clean
    55 !else
    56 ! ifndef BUILD_VERBOSE
    57     @ \
    58 ! endif
    59     $(TOOL_BUILDENV) $(BUILD_ENVS_CHANGE) * $(TOOL_MAKE) -f $(MAKEFILE) $@
     58
    6059!endif
    6160
  • trunk/make/testcase/dll-prog-c.mak

    r9054 r9063  
    1 # $Id: dll-prog-c.mak,v 1.2 2002-08-20 08:01:46 bird Exp $
     1# $Id: dll-prog-c.mak,v 1.3 2002-08-20 21:14:29 bird Exp $
    22
    33# Testcase for makeing simple C DLLs.
     
    1313
    1414# rules and more
     15RULES_FORWARD = test
    1516!include $(MAKE_INCLUDE_PROCESS)
    1617
     18!if !$(BUILD_FORWARDING)
    1719
    1820
     
    3436# validate that the executable actually runs and produces the desired output.
    3537#
     38OUTFILE = out
    3639test:
    37 !if "$(MAKE_INCLUDE_PROCESS:process.forwarder=)" == "$(MAKE_INCLUDE_PROCESS)"
    3840    $(TOOL_MAKE) -f dll-c.mak rebuild
    39     $(TARGET) $(PATH_OBJ)\dll-c.dll\dll-c.dll > out
     41    $(TARGET) $(PATH_OBJ)\dll-c.dll\dll-c.dll > $(OUTFILE)
    4042! ifdef BUILD_VERBOSE
    41     type out
     43    type $(OUTFILE)
    4244! endif
    43     $(TOOL_CMP) out <<
     45    $(TOOL_CMP) $(OUTFILE) <<
    4446DLLInit
    4547$(_STR1)
     
    4951<<
    5052    $(TOOL_MAKE) -f dll-c.mak clean
    51 !else
    52 ! ifndef BUILD_VERBOSE
    53     @ \
    54 ! endif
    55     $(TOOL_BUILDENV) $(BUILD_ENVS_CHANGE) * $(TOOL_MAKE) -f $(MAKEFILE) $@
     53
    5654!endif
    5755
  • trunk/make/testcase/prog-c-as-cxx.mak

    r8423 r9063  
    1 # $Id: prog-c-as-cxx.mak,v 1.1 2002-05-16 11:37:07 bird Exp $
     1# $Id: prog-c-as-cxx.mak,v 1.2 2002-08-20 21:14:29 bird Exp $
    22
    33# Testcase for makeing simple C programs as C++.
     
    1414
    1515# rules and more
     16RULES_FORWARD = test
    1617!include $(MAKE_INCLUDE_PROCESS)
    1718
     19!if !$(BUILD_FORWARDING)
    1820
    1921# some helpers for the output.
     
    3537#
    3638test:
    37 !if "$(MAKE_INCLUDE_PROCESS:process.forwarder=)" == "$(MAKE_INCLUDE_PROCESS)"
    3839    $(TARGET) > out
    39 ! ifdef BUILD_VERBOSE
     40!ifdef BUILD_VERBOSE
    4041    type out
    41 ! endif
     42!endif
    4243    $(TOOL_CMP) out <<
    4344$(_STR1)
     
    4647
    4748<<
    48 !else
    49 ! ifndef BUILD_VERBOSE
    50     @ \
    51 ! endif
    52     $(TOOL_BUILDENV) $(BUILD_ENVS_CHANGE) * $(TOOL_MAKE) -f $(MAKEFILE) $@
     49
    5350!endif
  • trunk/make/testcase/prog-c.mak

    r8423 r9063  
    1 # $Id: prog-c.mak,v 1.1 2002-05-16 11:37:07 bird Exp $
     1# $Id: prog-c.mak,v 1.2 2002-08-20 21:14:30 bird Exp $
    22
    33# Testcase for makeing simple C programs.
     
    1313
    1414# rules and more
     15RULES_FORWARD = test
    1516!include $(MAKE_INCLUDE_PROCESS)
     17
     18!if !$(BUILD_FORWARDING)
    1619
    1720
     
    3437#
    3538test:
    36 !if "$(MAKE_INCLUDE_PROCESS:process.forwarder=)" == "$(MAKE_INCLUDE_PROCESS)"
    3739    $(TARGET) > out
    3840! ifdef BUILD_VERBOSE
     
    4547
    4648<<
    47 !else
    48 ! ifndef BUILD_VERBOSE
    49     @ \
    50 ! endif
    51     $(TOOL_BUILDENV) $(BUILD_ENVS_CHANGE) * $(TOOL_MAKE) -f $(MAKEFILE) $@
     49
    5250!endif
  • trunk/make/testcase/prog-cxx-as-c.mak

    r8423 r9063  
    1 # $Id: prog-cxx-as-c.mak,v 1.1 2002-05-16 11:37:07 bird Exp $
     1# $Id: prog-cxx-as-c.mak,v 1.2 2002-08-20 21:14:30 bird Exp $
    22
    33# Testcase for makeing simple C programs as C++.
     
    99
    1010# target config.
    11 TARGET_NAME = prog-c
    12 MAKEFILE    = prog-c-as-cxx.mak
     11TARGET_NAME = prog-cxx
     12MAKEFILE    = prog-cxx-as-c.mak
    1313TARGET_LIBS = $(LIB_C_OBJ) $(LIB_OS)    # use the static library!
    1414
    1515# rules and more
     16RULES_FORWARD = test
    1617!include $(MAKE_INCLUDE_PROCESS)
    1718
     19!if !$(BUILD_FORWARDING)
    1820
    1921# some helpers for the output.
     
    3537#
    3638test:
    37 !if "$(MAKE_INCLUDE_PROCESS:process.forwarder=)" == "$(MAKE_INCLUDE_PROCESS)"
    3839    $(TARGET) > out
    39 ! ifdef BUILD_VERBOSE
     40!ifdef BUILD_VERBOSE
    4041    type out
    41 ! endif
     42!endif
    4243    $(TOOL_CMP) out <<
    4344$(_STR1)
     
    4647
    4748<<
    48 !else
    49 ! ifndef BUILD_VERBOSE
    50     @ \
    51 ! endif
    52     $(TOOL_BUILDENV) $(BUILD_ENVS_CHANGE) * $(TOOL_MAKE) -f $(MAKEFILE) $@
     49
    5350!endif
  • trunk/make/testcase/prog-cxx.mak

    r8423 r9063  
    1 # $Id: prog-cxx.mak,v 1.1 2002-05-16 11:37:08 bird Exp $
     1# $Id: prog-cxx.mak,v 1.2 2002-08-20 21:14:30 bird Exp $
    22
    33# Testcase for makeing simple C++ programs.
     
    1313
    1414# rules and more
     15RULES_FORWARD = test
    1516!include $(MAKE_INCLUDE_PROCESS)
     17
     18!if !$(BUILD_FORWARDING)
    1619
    1720
     
    3437#
    3538test:
    36 !if "$(MAKE_INCLUDE_PROCESS:process.forwarder=)" == "$(MAKE_INCLUDE_PROCESS)"
    3739    $(TARGET) > out
    3840! ifdef BUILD_VERBOSE
     
    4547
    4648<<
    47 !else
    48 ! ifndef BUILD_VERBOSE
    49     @ \
    50 ! endif
    51     $(TOOL_BUILDENV) $(BUILD_ENVS_CHANGE) * $(TOOL_MAKE) -f $(MAKEFILE) $@
     49
    5250!endif
     51
Note: See TracChangeset for help on using the changeset viewer.