Changeset 22114


Ignore:
Timestamp:
Feb 9, 2016, 12:57:42 PM (10 years ago)
Author:
rousseau
Message:

Work around Open Watcom v1.9 (owcc) bug [apitest]

The 'owcc' compiler front-end of v1.9 does not handle '/' in source
specifications correctly. So the 'subst' macro is used to revert to '\'
for those cases. This seems to have been fixed in v2.0-beta.

Also make Odin Based and Win32 variants use the built Odin instead of
the stock release.

And added a target to start Win32 variants using 'pe'.

Location:
branches/swt/testapp/apitest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/swt/testapp/apitest/GNUmakefile

    r22112 r22114  
    119119ODIN32SDK_LIBS+=gdi32.lib
    120120ODIN32SDK_LIBS:=$(strip $(ODIN32SDK_LIBS))
     121
     122# Make running ApiTest use the built Odin version instead of the stock release
     123#ODIN32SDK_BEGINLIBPATH=..\..\out\os2.x86\debug\stage\bin
     124ODIN32SDK_BEGINLIBPATH=..\..\out\os2.x86\release\stage\bin
    121125
    122126# This macro is invoked by defined but not yet implemented targets
     
    326330
    327331
     332# ! Note: Open Watcom v1.9 bugs (owcc front-end)
     333# ! The 'owcc' front-end has several problems passing flags to the compilers.
     334# ! For instance, it does not handle the '/' correctly when part of the path
     335# ! that specifies a source. The path is discarded and the source is looked for
     336# ! in the current directory. Also, using '-fr=<file>' has its problems.
     337# ! Because we want to use '/' for the most part, a small hack is done using
     338# ! the 'subst' macro on the source specification.
     339# ! At least the '/' bug with regard to the source specification seems to be
     340# ! fixed as of 'owcc' "Version 2.0 beta Apr 27 2014 22:48:31 (32-bit)".
     341
     342
    328343# ------------------------------------------------------------- [ApiTestPm.exe]
    329344# Build the Pm32 target executable (LX)
    330345# -----------------------------------------------------------------------------
    331 $(out)/ApiTestPm.exe: $(src)/ApiTestPm.cpp $(out)/ApiTestPm.res $(module.def)
     346$(out)/ApiTestPm.exe: $(subst /,\,$(src)/ApiTestPm.cpp) $(out)/ApiTestPm.res $(module.def)
    332347        @echo [$@]
    333348        $(cc) $(cc.flags.sys) $(cc.flags.pre) $(cc.flags.incdirs) $(cc.flags.libdirs) $(cc.flags.libs) $(cc.flags.post) $(cc.defines) $< -o $@
     
    347362# Build the Odin32 target executable (LX)
    348363# -----------------------------------------------------------------------------
    349 $(out)/ApiTestOdin.exe: $(src)/ApiTestOdin.cpp $(out)/ApiTestOdin.ors $(module.def)
     364$(out)/ApiTestOdin.exe: $(subst /,\,$(src)/ApiTestOdin.cpp) $(out)/ApiTestOdin.ors $(module.def)
    350365        @echo [$@]
    351366        $(cc) $(cc.flags.sys) $(cc.flags.pre) $(cc.flags.incdirs) $(cc.flags.libdirs) $(cc.flags.libs) $(cc.flags.post) $(cc.defines) $< -o $@
     
    375390# Build the Win32 target executable (PE)
    376391# -----------------------------------------------------------------------------
    377 $(out)/ApiTestWin.exe: $(src)/ApiTestWin.cpp $(out)/ApiTestWin.res $(module.def)
     392$(out)/ApiTestWin.exe: $(subst /,\,$(src)/ApiTestWin.cpp) $(out)/ApiTestWin.res $(module.def)
    378393        @echo [$@]
    379394        $(cc) $(cc.flags.sys) $(cc.flags.pre) $(cc.flags.incdirs) $(cc.flags.libdirs) $(cc.flags.libs) $(cc.flags.post) $(cc.defines) $< -o $@ $(module.def)
     
    419434        @echo [$@]
    420435#       $(out)\ApiTestOdin.exe
    421         cmd /c $(out)\ApiTestOdin.exe
     436        cmd /c "set BEGINLIBPATH=$(ODIN32SDK_BEGINLIBPATH)&$(out)\ApiTestOdin.exe"
     437
     438
     439# -------------------------------------------------------------- [run.win32.pe]
     440# Run the Win32 variant using pe
     441# -----------------------------------------------------------------------------
     442# Quirk: *** If Main Window is not destroyed, pe hangs but pec terminates ***
     443# Needs more investigation.
     444# Also, for both pe and pec, the value for PostQuitMessage() is not present
     445# in the 'wParam' field of the message-structure at exit. (wParam is 0)
     446# -----------------------------------------------------------------------------
     447run.win32.pe: owcc.build.win32
     448        @echo [$@]
     449#       pe $(out)\ApiTestWin.exe
     450        cmd /c "set BEGINLIBPATH=$(ODIN32SDK_BEGINLIBPATH)&pe $(out)\ApiTestWin.exe"
    422451
    423452
     
    434463        @echo [$@]
    435464#       pec $(out)\ApiTestWin.exe
    436         cmd /c pec $(out)\ApiTestWin.exe
     465        cmd /c "set BEGINLIBPATH=$(ODIN32SDK_BEGINLIBPATH)&pec $(out)\ApiTestWin.exe"
    437466
    438467
     
    443472        @echo [$@]
    444473        $(out)\ApiTestWin.exe
     474
    445475
    446476# ----------------------------------------------------------- [gen.tools.flags]
     
    456486        -gcc --help=common > .flags.gcc.common
    457487
     488
    458489# --------------------------------------------------------------------- [clean]
    459490# Cleanup by removing the complete out-directory
  • branches/swt/testapp/apitest/fc.mnu

    r22112 r22114  
    4343W:      Win32 variant (using pec.exe)
    4444        make run.win32.pec
     45.:      Win32 variant (using pe.exe)
     46        make run.win32.pe
    4547-:      --------------------------------
    4648K:      Win32 variant (using win32k.sys)
Note: See TracChangeset for help on using the changeset viewer.