Ignore:
Timestamp:
Jun 19, 2002, 4:16:27 AM (23 years ago)
Author:
bird
Message:

Merged in NMAKE5 and other changes from UNIMAC. New mode: TESTCASE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/make/process.mak

    r8423 r8714  
    1 # $Id: process.mak,v 1.13 2002-05-16 11:37:00 bird Exp $
     1# $Id: process.mak,v 1.14 2002-06-19 02:16:27 bird Exp $
    22
    33#
     
    1717#   It also requires the TARGET_NAME to be specified in the makefile.
    1818# -----------------------------------------------------------------------------
    19 !if "$(MAKE_SETUP_INCLUDED)" != "YES"
    20 ! if [$(ECHO) $(CLRERR)Fatal error: You must include setup.mak before process.mak in the makefile.$(CLRRST)]
    21 ! endif
    22 ! error
     19!if "$(MAKE_SETUP_INCLUDED)"  != "YES"
     20! ifndef MAKEVER
     21!  if [$(ECHO) $(CLRERR)Fatal error: You must include setup.mak before process.mak in the makefile.$(CLRRST)]
     22!  endif
     23!  error
     24!else
     25!  error $(CLRERR)Fatal error: You must include setup.mak before process.mak in the makefile.$(CLRRST)
     26!endif
    2327!endif
    2428!if "$(ENV_STATUS)" != "OK"
    25 ! if [$(ECHO) $(CLRERR)Fatal error: The environment is not valid. Bad setup.mak?$(CLRRST)]
    26 ! endif
    27 ! error
     29! ifndef MAKEVER
     30!  if [$(ECHO) $(CLRERR)Fatal error: The environment is not valid. Bad setup.mak?$(CLRRST)]
     31!  endif
     32!  error
     33! else
     34!  error $(CLRERR)Fatal error: The environment is not valid. Bad setup.mak?$(CLRRST)
     35! endif
    2836!endif
    2937
    3038!if "$(TARGET_NAME)" == "" && "$(TARGET_MODE)" != "EMPTY"
    31 ! if [$(ECHO) $(CLRERR)Fatal error: TARGET_NAME is not defined! Should be set in the makefile.$(CLRRST)]
    32 ! endif
    33 ! error
     39! ifndef MAKEVER
     40!  if [$(ECHO) $(CLRERR)Fatal error: TARGET_NAME is not defined! Should be set in the makefile.$(CLRRST)]
     41!  endif
     42!  error
     43! else
     44!  error $(CLRERR)Fatal error: TARGET_NAME is not defined! Should be set in the makefile.$(CLRRST)
     45! endif
    3446!endif
    3547
     
    5365# Dummy/Hub/TopLevel empty makefile. This has no target.
    5466!         if "$(TARGET_MODE)" != "EMPTY"
    55 !          if [$(ECHO) $(CLRERR)Fatal Error: Bad TARGET_MODE="$(TARGET_MODE)". Valid ones are: EXE, DLL, SYS, IFS, VDD, LIB, SYSLIB, IFSLIB and EMPTY.$(CLRRST)]
     67!          if "$(TARGET_MODE)" != "TESTCASE"
     68!           ifndef MAKEVER
     69!            if [$(ECHO) $(CLRERR)Fatal Error: Bad TARGET_MODE="$(TARGET_MODE)". Valid ones are: EXE, DLL, SYS, IFS, VDD, LIB, SYSLIB, IFSLIB, TESTCASE and EMPTY.$(CLRRST)]
     70!            endif
     71!            error
     72!           else
     73!            error $(CLRERR)Fatal Error: Bad TARGET_MODE="$(TARGET_MODE)". Valid ones are: EXE, DLL, SYS, IFS, VDD, LIB, SYSLIB, IFSLIB, TESTCASE and EMPTY.$(CLRRST)
     74!           endif
    5675!          endif
    57 !          error
    5876!         endif
    5977!        endif
     
    100118TARGET_EXT  = empty
    101119! endif
     120! if "$(TARGET_MODE)" == "TESTCASE"
     121TARGET_EXT  = testcase
     122! endif
    102123! ifndef TARGET_EXT
    103 !  if [$(ECHO) $(CLRERR)Internal Error: TARGET_EXT not set. Probably invalid TARGET_MODE. (TARGET_MODE="$(TARGET_MODE)")$(CLRRST)]
    104 !  endif
    105 !  error
     124!  ifndef MAKEVER
     125!   if [$(ECHO) $(CLRERR)Internal Error: TARGET_EXT not set. Probably invalid TARGET_MODE. (TARGET_MODE="$(TARGET_MODE)")$(CLRRST)]
     126!   endif
     127!   error
     128!  else
     129!   error $(CLRERR)Internal Error: TARGET_EXT not set. Probably invalid TARGET_MODE. (TARGET_MODE="$(TARGET_MODE)")$(CLRRST)
     130!  endif
    106131! endif
    107132!endif
     
    115140!ifndef TARGET
    116141! if "$(TARGET_MODE)" != "EMPTY"
     142!  if "$(TARGET_MODE)" != "TESTCASE"
    117143TARGET      = $(PATH_TARGET)\$(TARGET_NAME).$(TARGET_EXT)
     144!  else
     145TARGET      = testcase
     146!  endif
    118147! endif
    119148!endif
     
    228257# -----------------------------------------------------------------------------
    229258!ifndef BUILD_QUIET
    230 !if [$(ECHO) Target is $(CLRFIL)$(TARGET)$(CLRRST)]
    231 !endif
     259! ifndef MAKEVER
     260!  if [$(ECHO) Target is $(CLRFIL)$(TARGET)$(CLRRST)]
     261!  endif
     262! else
     263$(ECHO) Target is $(CLRFIL)$(TARGET)$(CLRRST)
     264! endif
    232265!endif
    233266
     
    239272!if "$(TARGET_MODE)" != "EMPTY"
    240273! if "$(PATH_TARGET)" != ""
    241 !  if [$(TOOL_EXISTS) $(PATH_TARGET)] != 0
    242 !   ifndef BUILD_QUIET
    243 !    if [$(ECHO) Target path $(CLRFIL)$(PATH_TARGET)$(CLRTXT) does NOT exist. Creating. $(CLRRST)]
    244 !    endif
    245 !   endif
    246 !   if [$(TOOL_CREATEPATH) $(PATH_TARGET)]
    247 !    if [$(ECHO) $(CLRERR)Error: Could not create $(CLRFIL)$(PATH_TARGET)$(CLRRST)]
    248 !    endif
    249 !    error
     274!  ifndef MAKEVER
     275!   if [$(TOOL_EXISTS) $(PATH_TARGET)] != 0
     276!    ifndef BUILD_QUIET
     277!     if [$(ECHO) Target path $(CLRFIL)$(PATH_TARGET)$(CLRTXT) does NOT exist. Creating. $(CLRRST)]
     278!     endif
     279!    endif
     280!    if [$(TOOL_CREATEPATH) $(PATH_TARGET)]
     281!     if [$(ECHO) $(CLRERR)Error: Could not create $(CLRFIL)$(PATH_TARGET)$(CLRRST)]
     282!     endif
     283!     error
     284!    endif
     285!   endif
     286!  else
     287!   if %exist($(PATH_TARGET)) == 0
     288!    ifndef BUILD_QUIET
     289$(ECHO) Target path $(CLRFIL)$(PATH_TARGET)$(CLRTXT) does NOT exist. Creating. $(CLRRST)
     290!    endif
     291!   else
     292!    if [$(TOOL_CREATEPATH) $(PATH_TARGET)]
     293!     error $(CLRERR)Error: Could not create $(CLRFIL)$(PATH_TARGET)$(CLRRST)
     294!    endif
    250295!   endif
    251296!  endif
     
    259304# Common inference rules
    260305# -----------------------------------------------------------------------------
    261 
    262306.SUFFIXES:
    263 .SUFFIXES: .$(EXT_OBJ) .c .cpp .asm .$(EXT_RES) .rc .pre-c .pre-cpp # .h .def
     307.SUFFIXES: .c .cpp .asm .$(EXT_OBJ) .$(EXT_RES) .rc .ii .s
     308
     309#
     310# A workaround for SlickEdits inability to find the buggy files..
     311# This makes the source filenames in the error listing have full path.
     312# See setup.mak for compile command line.
     313#
     314_SRC = $<
     315!ifdef SLKRUNS
     316_SRC = $(PATH_CURRENT)\$<
     317!endif
    264318
    265319
    266320# Assembling assembly source.
    267321.asm{$(PATH_TARGET)}.$(EXT_OBJ):
    268     @$(ECHO) Assembling $(CLRFIL)$< $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
     322    @$(ECHO) Assembling $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
     323    \
    269324! ifndef BUILD_VERBOSE
    270325    @ \
    271326! endif
    272327!if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
    273     $(TOOL_JOB_SUB) $(AS) $(AS_FLAGS_SYS) $< $(AS_OBJ_OUT)$@
     328    $(TOOL_JOB_SUB) $(AS) $(AS_FLAGS_SYS) $(_SRC) $(AS_OBJ_OUT)$@
    274329!else
    275     $(TOOL_JOB_SUB) $(AS) $(AS_FLAGS) $< $(AS_OBJ_OUT)$@
     330    $(TOOL_JOB_SUB) $(AS) $(AS_FLAGS) $(_SRC) $(AS_OBJ_OUT)$@
    276331!endif
    277332
    278333.asm.$(EXT_OBJ):
    279     @$(ECHO) Assembling $(CLRFIL)$< $(CLRRST)
     334    @$(ECHO) Assembling $(CLRFIL)$(_SRC) $(CLRRST)
     335    \
    280336!ifndef BUILD_VERBOSE
    281337    @ \
    282338!endif
    283339!if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
    284     $(AS) $(AS_FLAGS_SYS) $< $(AS_OBJ_OUT)$(PATH_TARGET)\$(@F)
     340    $(AS) $(AS_FLAGS_SYS) $(_SRC) $(AS_OBJ_OUT)$(PATH_TARGET)\$(@F)
    285341!else
    286     $(AS) $(AS_FLAGS) $< $(AS_OBJ_OUT)$(PATH_TARGET)\$(@F)
    287 !endif
    288 
     342    $(AS) $(AS_FLAGS) $(_SRC) $(AS_OBJ_OUT)$(PATH_TARGET)\$(@F)
     343!endif
     344
     345# C++ Compiler base line
     346_CXX_BASELINE = $(CXX) \
     347!if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB"
     348        $(CXX_FLAGS_EXE) \
     349!endif
     350!if "$(TARGET_MODE)" == "DLL"
     351        $(CXX_FLAGS_DLL) \
     352!endif
     353!if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB"
     354        $(CXX_FLAGS_SYS) \
     355!endif
     356!if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
     357        $(CXX_FLAGS_IFS) \
     358!endif
    289359
    290360# Compiling C++ source.
    291361.cpp{$(PATH_TARGET)}.$(EXT_OBJ):
    292     @$(ECHO) C++ Compiler $(CLRFIL)$< $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
    293 !ifndef BUILD_VERBOSE
    294     @ \
    295 !endif
    296     $(TOOL_JOB_SUB) $(CXX) \
    297 !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB"
    298         $(CXX_FLAGS_EXE) \
    299 !endif
    300 !if "$(TARGET_MODE)" == "DLL"
    301         $(CXX_FLAGS_DLL) \
    302 !endif
    303 !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB"
    304         $(CXX_FLAGS_SYS) \
    305 !endif
    306 !if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
    307         $(CXX_FLAGS_IFS) \
    308 !endif
     362    @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
     363    \
     364!ifndef BUILD_VERBOSE
     365    @ \
     366!endif
     367    $(TOOL_JOB_SUB) $(_CXX_BASELINE) \
    309368!if "$(CXX_LST_OUT)" != ""
    310369        $(CXX_LST_OUT)$(PATH_TARGET)\$(@B).s \
    311370!endif
    312         $(CXX_OBJ_OUT)$@ $<
     371        $(CXX_OBJ_OUT)$@ $(_SRC)
    313372
    314373.cpp.$(EXT_OBJ):
    315     @$(ECHO) C++ Compiler $(CLRFIL)$< $(CLRRST)
    316 !ifndef BUILD_VERBOSE
    317     @ \
    318 !endif
    319     $(CXX) \
    320 !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB"
    321         $(CXX_FLAGS_EXE) \
    322 !endif
    323 !if "$(TARGET_MODE)" == "DLL"
    324         $(CXX_FLAGS_DLL) \
    325 !endif
    326 !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB"
    327         $(CXX_FLAGS_SYS) \
    328 !endif
    329 !if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
    330         $(CXX_FLAGS_IFS) \
    331 !endif
     374    @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRRST)
     375    \
     376!ifndef BUILD_VERBOSE
     377    @ \
     378!endif
     379    $(_CXX_BASELINE) \
    332380!if "$(CXX_LST_OUT)" != ""
    333381        $(CXX_LST_OUT)$(PATH_TARGET)\$(@B).s \
    334382!endif
    335         $(CXX_OBJ_OUT)$(PATH_TARGET)\$(@F) $<
     383        $(CXX_OBJ_OUT)$(PATH_TARGET)\$(@F) $(_SRC)
    336384
    337385
    338386# Pre-Compiling C++ source.
    339 .cpp.pre-cpp:
    340     @$(ECHO) C++ Compiler $(CLRFIL)$< $(CLRRST)
    341 !ifndef BUILD_VERBOSE
    342     @ \
    343 !endif
    344     $(CXX) \
     387.cpp.ii:
     388    @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRRST)
     389    \
     390!ifndef BUILD_VERBOSE
     391    @ \
     392!endif
     393    $(_CXX_BASELINE) \
     394        $(CXX_PC_2_STDOUT) $(_SRC) > $@
     395
     396
     397# Compiler C++ source to assembly.
     398!if "$(CXX_AS_2_FILE)" != ""
     399.cpp.s:
     400    @$(ECHO) C++ To Assembly $(CLRFIL)$(_SRC) $(CLRRST)
     401    \
     402!ifndef BUILD_VERBOSE
     403    @ \
     404!endif
     405    $(_CXX_BASELINE) \
     406        $(CXX_AS_2_FILE)$@ $(_SRC)
     407!endif
     408
     409
     410
     411# C Compiler base line
     412_CC_BASELINE = $(CC) \
    345413!if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB"
    346         $(CXX_FLAGS_EXE) \
     414        $(CC_FLAGS_EXE) \
    347415!endif
    348416!if "$(TARGET_MODE)" == "DLL"
    349         $(CXX_FLAGS_DLL) \
     417        $(CC_FLAGS_DLL) \
    350418!endif
    351419!if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB"
    352         $(CXX_FLAGS_SYS) \
     420        $(CC_FLAGS_SYS) \
    353421!endif
    354422!if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
    355         $(CXX_FLAGS_IFS) \
    356 !endif
    357         $(CXX_PC_2_STDOUT) $< > $@
    358 
     423        $(CC_FLAGS_IFS) \
     424!endif
    359425
    360426# Compiling C source.
    361427.c{$(PATH_TARGET)}.$(EXT_OBJ):
    362     @$(ECHO) C Compiler $(CLRFIL)$< $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
    363 !ifndef BUILD_VERBOSE
    364     @ \
    365 !endif
    366     $(TOOL_JOB_SUB) $(CC) \
    367 !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB"
    368         $(CC_FLAGS_EXE) \
    369 !endif
    370 !if "$(TARGET_MODE)" == "DLL"
    371         $(CC_FLAGS_DLL) \
    372 !endif
    373 !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB"
    374         $(CC_FLAGS_SYS) \
    375 !endif
    376 !if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
    377         $(CC_FLAGS_IFS) \
    378 !endif
     428    @$(ECHO) C Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
     429    \
     430!ifndef BUILD_VERBOSE
     431    @ \
     432!endif
     433    $(TOOL_JOB_SUB) $(_CC_BASELINE) \
    379434!if "$(CC_LST_OUT)" != ""
    380435        $(CC_LST_OUT)$(PATH_TARGET)\$(@B).s \
    381436!endif
    382         $(CC_OBJ_OUT)$@ $<
     437        $(CC_OBJ_OUT)$@ $(_SRC)
    383438
    384439.c.$(EXT_OBJ):
    385     @$(ECHO) C Compiler $(CLRFIL)$< $(CLRRST)
    386 !ifndef BUILD_VERBOSE
    387     @ \
    388 !endif
    389     $(CC) \
    390 !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB"
    391         $(CC_FLAGS_EXE) \
    392 !endif
    393 !if "$(TARGET_MODE)" == "DLL"
    394         $(CC_FLAGS_DLL) \
    395 !endif
    396 !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB"
    397         $(CC_FLAGS_SYS) \
    398 !endif
    399 !if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
    400         $(CC_FLAGS_IFS) \
    401 !endif
     440    @$(ECHO) C Compiler $(CLRFIL)$(_SRC) $(CLRRST)
     441    \
     442!ifndef BUILD_VERBOSE
     443    @ \
     444!endif
     445    $(_CC_BASELINE) \
    402446!if "$(CC_LST_OUT)" != ""
    403447        $(CC_LST_OUT)$(PATH_TARGET)\$(@B).s \
    404448!endif
    405         $(CC_OBJ_OUT)$(PATH_TARGET)\$(@F) $<
     449        $(CC_OBJ_OUT)$(PATH_TARGET)\$(@F) $(_SRC)
    406450
    407451
    408452# Pre-Compiling C source.
    409 .c.pre-c:
    410     @$(ECHO) C PreCompiler $(CLRFIL)$< $(CLRRST)
    411 !ifndef BUILD_VERBOSE
    412     @ \
    413 !endif
    414     $(CC) \
    415 !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB"
    416         $(CC_FLAGS_EXE) \
    417 !endif
    418 !if "$(TARGET_MODE)" == "DLL"
    419         $(CC_FLAGS_DLL) \
    420 !endif
    421 !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB"
    422         $(CC_FLAGS_SYS) \
    423 !endif
    424 !if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
    425         $(CC_FLAGS_IFS) \
    426 !endif
    427         $(CC_PC_2_STDOUT) $< > $@
     453.c.ii:
     454    @$(ECHO) C PreCompiler $(CLRFIL)$(_SRC) $(CLRRST)
     455    \
     456!ifndef BUILD_VERBOSE
     457    @ \
     458!endif
     459    $(_CC_BASELINE) \
     460        $(CC_PC_2_STDOUT) $(_SRC) > $@
     461
     462
     463# Compiler C source to assembly.
     464!if "$(CC_AS_2_FILE)" != ""
     465.c.s:
     466    @$(ECHO) C To Assembly $(CLRFIL)$(_SRC) $(CLRRST)
     467    \
     468!ifndef BUILD_VERBOSE
     469    @ \
     470!endif
     471    $(_CC_BASELINE) \
     472        $(CC_AS_2_FILE)$@ $(_SRC)
     473!endif
    428474
    429475
    430476# Compiling resources.
    431477.rc{$(PATH_TARGET)}.res:
    432     @$(ECHO) RC Compiler $(CLRFIL)$< $(CLRTXT)$(TOOL_JOB_SUB_MSG)$(CLRRST)
    433 !ifndef BUILD_VERBOSE
    434     @ \
    435 !endif
    436     $(TOOL_JOB_SUB) $(RC) $(RC_FLAGS) $< $@
     478    @$(ECHO) RC Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG)$(CLRRST)
     479    \
     480!ifndef BUILD_VERBOSE
     481    @ \
     482!endif
     483    $(TOOL_JOB_SUB) $(RC) $(RC_FLAGS) $(_SRC) $@
    437484
    438485.rc.res:
    439     @$(ECHO) RC Compiler $(CLRFIL)$< $(CLRRST)
    440 !ifndef BUILD_VERBOSE
    441     @ \
    442 !endif
    443     $(RC) $(RC_FLAGS) $< $(PATH_TARGET)\$(@F)
     486    @$(ECHO) RC Compiler $(CLRFIL)$(_SRC) $(CLRRST)
     487    \
     488!ifndef BUILD_VERBOSE
     489    @ \
     490!endif
     491    $(RC) $(RC_FLAGS) $(_SRC) $(PATH_TARGET)\$(@F)
    444492
    445493
     
    560608
    561609
     610!if "$(TARGET_MODE)" != "TESTCASE"
     611!ifndef BUILD_OWN_TESTCASE_RULE
     612!ifndef MAKEVER
     613_TESTCASE_TST1 = [$(TOOL_EXISTS) testcase] == 0
     614_TESTCASE_TST2 = [$(TOOL_EXISTS) testcase.mak] == 0
     615!else
     616_TESTCASE_TST1 = exists(testcase) != 0
     617_TESTCASE_TST2 = exists(testcase.mak) != 0
     618!endif
    562619# -----------------------------------------------------------------------------
    563620# The testcase rule - Execute testcases when present.
    564621#   Testcases are either a testcase.mak file or a testcase subdirectory.
    565622# -----------------------------------------------------------------------------
    566 !ifndef BUILD_OWN_TESTCASE_RULE
    567623testcase:
    568 !if [$(TOOL_EXISTS) testcase] == 0
     624!if $(_TESTCASE_TST1)
    569625    @$(TOOL_DODIRS) "testcase" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
    570626!endif
    571 !if [$(TOOL_EXISTS) testcase.mak] == 0
     627!if $(_TESTCASE_TST2)
    572628    @$(TOOL_DOMAKES) "testcase.mak" $(TOOL_MAKE) $@
    573629!endif
     
    582638!endif
    583639!endif
     640!endif #!TESTCASE
    584641
    585642
     
    589646# -----------------------------------------------------------------------------
    590647shell:
     648    \
    591649!ifndef BUILD_VERBOSE
    592650    @ \
     
    602660dep:
    603661    @$(ECHO) Building dependencies $(CLRRST)
     662    \
    604663!ifndef BUILD_VERBOSE
    605664    @ \
     
    626685#   The current setup doesn't clean the installed ones.
    627686# -----------------------------------------------------------------------------
     687!if "$(TARGET_MODE)" != "TESTCASE"
    628688clean:
    629689!if "$(PATH_TARGET)" != ""              # paranoia
     
    644704        $(PATH_TARGET)\*.lst \
    645705        $(PATH_TARGET)\*.lnk \
    646         $(PATH_TARGET)\*.pre-c \
    647         $(PATH_TARGET)\*.pre-cpp \
     706        $(PATH_TARGET)\*.ii \
    648707        $(PATH_TARGET)\.depend
    649 !endif
     708    $(TOOL_RM) \
     709        .\*.ii \
     710        .\*.err \
     711        .\.depend
     712!endif
     713!ifdef SUBDIRS
     714    @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@
     715!endif
     716!ifdef PREMAKEFILES
     717    @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
     718!endif
     719!ifdef POSTMAKEFILES
     720    @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
     721!endif
     722!endif #!TESTCASE
     723
     724
     725
     726# -----------------------------------------------------------------------------
     727# The nothing rule - Rule for testing the makefile structure.
     728# -----------------------------------------------------------------------------
     729nothing:
    650730!ifdef SUBDIRS
    651731    @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
     
    657737    @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
    658738!endif
     739    @$(ECHO) Completed nothing in $(MAKEFILE).
    659740
    660741
     
    667748!if "$(TOOL_JOB_WAIT)" != ""
    668749! ifndef BUILD_QUIET
    669    @$(ECHO) Waiting for jobs to complete $(CLRRST)
    670 ! endif
     750    @$(ECHO) Waiting for jobs to complete $(CLRRST)
     751! endif
     752    \
    671753! ifndef BUILD_VERBOSE
    672    @ \
    673 ! endif
    674    $(TOOL_JOB_WAIT)
     754    @ \
     755! endif
     756    $(TOOL_JOB_WAIT)
    675757!endif
    676758    @$(ECHO) Linking $(TARGET_MODE) $(CLRFIL)$@ $(CLRRST)
     759    \
    677760!ifndef BUILD_VERBOSE
    678761    @ \
     
    698781!if "$(TARGET_RES)" != "" && "$(RL)" != ""
    699782    @$(ECHO) Linking Resources $(CLRRST)
     783    \
    700784! ifndef BUILD_VERBOSE
    701785    @ \
     
    705789!if "$(TARGET_DLLRNAME)" != ""
    706790    @$(ECHO) Dll Rename $(TARGET_DLLRNAME)
     791    \
    707792! ifndef BUILD_VERBOSE
    708793    @ \
     
    711796!endif
    712797!if "$(TOOL_MAPSYM)" != "" && "$(TARGET_SYM)" != "" && "$(TARGET_MAP)" != ""
     798    \
    713799! ifndef BUILD_VERBOSE
    714800    @ \
     
    723809$(TARGET_LNK): $(MAKE_INCLUDE_PROCESS) $(MAKE_INCLUDE_SETUP) $(PATH_MAKE)\setup.mak $(MAKEFILE)
    724810!ifndef TOOL_DEFCONV
    725     @$(ECHO) Creating Linker Input File $(CLRRST)<<$@
     811    @$(TOOL_ECHO) Creating Linker Input File $(CLRRST)<<$@
    726812$(LINK_LNK1)
    727813$(LINK_LNK2)
     
    733819    @$(ECHO) Creating Linker Input File $(CLRRST) $@
    734820    @$(TOOL_RM) $@
     821    \
    735822! ifdef BUILD_VERBOSE
    736823    @ \
     
    760847    @$(ECHO) Stamping deffile with build level info.$(CLRRST)
    761848! endif
     849    \
    762850! ifndef BUILD_VERBOSE
    763851    @ \
     
    778866   @$(ECHO) Waiting for jobs to complete $(CLRRST)
    779867! endif
     868    \
    780869! ifndef BUILD_VERBOSE
    781870   @ \
     
    797886#
    798887$(TARGET_LNK): $(MAKE_INCLUDE_PROCESS) $(MAKE_INCLUDE_SETUP) $(PATH_MAKE)\setup.mak $(MAKEFILE)
    799     @$(ECHO) Creating Lib Input File $(CLRRST)<<$@
     888    @$(TOOL_ECHO) Creating Lib Input File $(CLRRST)<<$@
    800889$(AR_LNK1)
    801890$(AR_LNK2)
     
    816905$(TARGET_PUBNAME): $(TARGET)
    817906    @$(ECHO) Copying $(CLRFIL)$(TARGET)$(CLRTXT) to $(CLRFIL)$(@D)$(CLRRST)
     907    \
    818908!ifndef BUILD_VERBOSE
    819909    @if not exist $(@D) $(ECHO) Target public path $(CLRFIL)$(@D)$(CLRTXT) does NOT exist. Creating. $(CLRRST)
    820910!endif
    821911    @if not exist $(@D) $(TOOL_CREATEPATH) $(@D)
     912    \
    822913!ifndef BUILD_VERBOSE
    823914    @ \
     
    845936$(TARGET_ILIB): $(TARGET_IDEF)
    846937    @$(ECHO) Creating Import Library $(CLRFIL)$@ $(CLRRST)
     938    \
    847939!ifndef BUILD_VERBOSE
    848940    @ \
     
    868960# Read Dependencies.
    869961# -----------------------------------------------------------------------------
    870 
    871 !if "$(TARGET_MODE)" != "EMPTY"
     962!if "$(TARGET_MODE)" != "TESTCASE"
     963!if "$(TARGET_MODE)" != "EMPTY" && "$(NODEP)" == ""
    872964
    873965#
    874966# Read dependency file for current directory
    875967#
    876 !if [$(TOOL_EXISTS) $(TARGET_DEPEND)] == 0
    877 ! ifdef BUILD_VERBOSE
    878 !  if [$(ECHO) Including dependency $(CLRFIL)$(TARGET_DEPEND)$(CLRRST)]
    879 !  endif
    880 ! endif
    881 ! include $(TARGET_DEPEND)
    882 !else
    883 ! ifndef NODEP
    884 !   if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(TARGET_DEPEND) is missing.$(CLRRST)]
    885 !   endif
    886 ! endif
    887 !endif
    888 
    889 
    890 #
    891 # Read global dependency files.
    892 #
    893 !ifdef BUILD_DEPEND1
    894 ! if [$(TOOL_EXISTS) $(BUILD_DEPEND1)] == 0
     968!ifndef MAKEVER
     969! if [$(TOOL_EXISTS) $(TARGET_DEPEND)] == 0
    895970!  ifdef BUILD_VERBOSE
    896 !   if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND1)$(CLRRST)]
    897 !   endif
    898 !  endif
    899 !  include $(BUILD_DEPEND1)
     971!   if [$(ECHO) Including dependency $(CLRFIL)$(TARGET_DEPEND)$(CLRRST)]
     972!   endif
     973!  endif
     974!  include $(TARGET_DEPEND)
    900975! else
    901976!  ifndef NODEP
    902 !    if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND1) is missing.$(CLRRST)]
    903 !    endif
    904 !  endif
    905 ! endif
    906 !endif
    907 
    908 !ifdef BUILD_DEPEND2
    909 ! if [$(TOOL_EXISTS) $(BUILD_DEPEND2)] == 0
     977!   if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(TARGET_DEPEND) is missing.$(CLRRST)]
     978!   endif
     979!  endif
     980! endif
     981!else
     982! if %exists($(TARGET_DEPEND)) != 0
    910983!  ifdef BUILD_VERBOSE
    911 !   if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND2)$(CLRRST)]
    912 !   endif
    913 !  endif
    914 !  include $(BUILD_DEPEND2)
     984$(ECHO) Including dependency $(CLRFIL)$(TARGET_DEPEND)$(CLRRST)
     985!  endif
     986!  include $(TARGET_DEPEND)
    915987! else
    916988!  ifndef NODEP
     989$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(TARGET_DEPEND) is missing.$(CLRRST)
     990!  endif
     991! endif
     992!endif
     993
     994
     995#
     996# Read global dependency files.
     997#
     998!ifdef BUILD_DEPEND1
     999! ifndef MAKEVER
     1000!  if [$(TOOL_EXISTS) $(BUILD_DEPEND1)] == 0
     1001!   ifdef BUILD_VERBOSE
     1002!    if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND1)$(CLRRST)]
     1003!    endif
     1004!   endif
     1005!   include $(BUILD_DEPEND1)
     1006!  else
     1007!   ifndef NODEP
     1008!    if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND1) is missing.$(CLRRST)]
     1009!    endif
     1010!   endif
     1011!  endif
     1012! else
     1013!  if %exists($(BUILD_DEPEND1)) != 0
     1014!   ifdef BUILD_VERBOSE
     1015$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND1)$(CLRRST)
     1016!   endif
     1017!   include $(BUILD_DEPEND1)
     1018!  else
     1019!   ifndef NODEP
     1020$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND1) is missing.$(CLRRST)
     1021!   endif
     1022!  endif
     1023! endif
     1024!endif
     1025
     1026
     1027!ifdef BUILD_DEPEND2
     1028! ifndef MAKEVER
     1029!  if [$(TOOL_EXISTS) $(BUILD_DEPEND2)] == 0
     1030!   ifdef BUILD_VERBOSE
     1031!    if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND2)$(CLRRST)]
     1032!    endif
     1033!   endif
     1034!   include $(BUILD_DEPEND2)
     1035!  else
     1036!   ifndef NODEP
    9171037!    if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND2) is missing.$(CLRRST)]
    9181038!    endif
     1039!   endif
     1040!  endif
     1041! else
     1042!  if %exists($(BUILD_DEPEND2)) != 0
     1043!   ifdef BUILD_VERBOSE
     1044$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND2)$(CLRRST)
     1045!   endif
     1046!   include $(BUILD_DEPEND2)
     1047!  else
     1048!   ifndef NODEP
     1049$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND2) is missing.$(CLRRST)
     1050!   endif
    9191051!  endif
    9201052! endif
     
    9231055
    9241056!ifdef BUILD_DEPEND3
    925 ! if [$(TOOL_EXISTS) $(BUILD_DEPEND3)] == 0
    926 !  ifdef BUILD_VERBOSE
    927 !   if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND3)$(CLRRST)]
    928 !   endif
    929 !  endif
    930 !  include $(BUILD_DEPEND3)
     1057! ifndef MAKEVER
     1058!  if [$(TOOL_EXISTS) $(BUILD_DEPEND3)] == 0
     1059!   ifdef BUILD_VERBOSE
     1060!    if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND3)$(CLRRST)]
     1061!    endif
     1062!   endif
     1063!   include $(BUILD_DEPEND3)
     1064!  else
     1065!   ifndef NODEP
     1066!    if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND3) is missing.$(CLRRST)]
     1067!    endif
     1068!   endif
     1069!  endif
    9311070! else
    932 !  ifndef NODEP
    933 !    if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND3) is missing.$(CLRRST)]
    934 !    endif
     1071!  if %exists($(BUILD_DEPEND3)) != 0
     1072!   ifdef BUILD_VERBOSE
     1073$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND3)$(CLRRST)
     1074!   endif
     1075!   include $(BUILD_DEPEND3)
     1076!  else
     1077!   ifndef NODEP
     1078$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND3) is missing.$(CLRRST)
     1079!   endif
    9351080!  endif
    9361081! endif
     
    9471092! if [$(TOOL_JOB_UP)] != 0
    9481093!  if "$(BUILD_QUITE)" == ""
    949 !   if [$(ECHO) Starting Job Daemon With $(TOOL_JOB_WORKERS) Workers...$(CLRRST)]
     1094!   ifndef MAKEVER
     1095!    if [$(ECHO) Starting Job Daemon With $(TOOL_JOB_WORKERS) Workers...$(CLRRST)]
     1096!    endif
     1097!   else
     1098$(ECHO) Starting Job Daemon With $(TOOL_JOB_WORKERS) Workers...$(CLRRST)
    9501099!   endif
    9511100!  endif
    9521101!  if [$(TOOL_JOB_INIT) $(TOOL_JOB_WORKERS)] != 0
    953 !   if [$(ECHO) $(CLRERR)Fatal error: Failed to start job daemon.$(CLRRST)]
    954 !   endif
    955 !   error
    956 !  endif
    957 ! endif
    958 !endif
    959 
     1102!   ifndef MAKEVER
     1103!    if [$(ECHO) $(CLRERR)Fatal error: Failed to start job daemon.$(CLRRST)]
     1104!    endif
     1105!    error
     1106!else
     1107!    error $(CLRERR)Fatal error: Failed to start job daemon.$(CLRRST)
     1108!endif
     1109!  endif
     1110! endif
     1111!endif
     1112
     1113!endif #!TESTCASE
Note: See TracChangeset for help on using the changeset viewer.