Ignore:
Timestamp:
Apr 15, 2011, 2:40:18 AM (14 years ago)
Author:
dmik
Message:

testapp/common.mak: Redid debug-% and other shortcut targets to fix a problem where doing "debug-my.exe" would actually try to build an executable named "debug-my.exe" instead of running "my.exe" in the debugger (this is due to the fact that the pattern rule without any requisites overrides the one with a virtual requisite).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/testapp/common.mak

    r21613 r21617  
    2323WRC = $(ODIN)/tools/wrc/bin/Release/wrc.exe
    2424
    25 ODIN_FLAVOR := Debug
     25ODIN_FLAVOR ?= Debug
    2626
    2727ifneq ($(RELEASE)$(REL),)
     
    2929endif
    3030
    31 RUN_SHELL =
    32 DEBUG_SHELL = ipmd
     31RUN_SHELL ?=
     32DEBUG_SHELL ?= ipmd
    3333
    3434run-%: %
     
    3838        @echo.
    3939
    40 debug-%: RUN_SHELL = $(DEBUG_SHELL)
    41 debug-%: run-%
    42         @rem dummy, needed for the pattern rule to work...     
     40debug-%: %
     41        @make run-$< RUN_SHELL=$(DEBUG_SHELL)
     42debug:
     43        @make run RUN_SHELL=$(DEBUG_SHELL)
    4344
    44 debug: RUN_SHELL = $(DEBUG_SHELL)
    45 debug: run
     45ipmd-%: %
     46        @make run-$< RUN_SHELL=ipmd
     47ipmd:
     48        @make run RUN_SHELL=ipmd
    4649
    47 ipmd-%: RUN_SHELL = ipmd
    48 ipmd-%: run-%
    49         @rem dummy, needed for the pattern rule to work...     
     50idbug-%: %
     51        @make run-$< RUN_SHELL=idbug
     52idbug:
     53        @make run RUN_SHELL=idbug
    5054
    51 ipmd: RUN_SHELL = ipmd
    52 ipmd: run
    53 
    54 idbug-%: RUN_SHELL = idbug
    55 idbug-%: run-%
    56         @rem dummy, needed for the pattern rule to work...     
    57 
    58 idbug: RUN_SHELL = idbug
    59 idbug: run
    60 
    61 r-%: ODIN_FLAVOR = Release
    62 r-%: %
    63         @rem dummy, needed for the pattern rule to work...     
    64 
    65 d-%: ODIN_FLAVOR = Debug
    66 d-%: %
    67         @rem dummy, needed for the pattern rule to work...     
     55r-%:
     56        @make $(@:r-%=%) ODIN_FLAVOR=Release
     57d-%:
     58        @make $(@:d-%=%) ODIN_FLAVOR=Debug
    6859
    6960help:
Note: See TracChangeset for help on using the changeset viewer.