Changeset 8076


Ignore:
Timestamp:
Mar 10, 2002, 6:24:33 AM (24 years ago)
Author:
bird
Message:

PREMAKEFILES, TARGET_MODE=EMPTY, NODEP for dep rule. ++(?)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/splittup/tools/make/process.mak

    r8037 r8076  
    1 # $Id: process.mak,v 1.1.2.1 2002-03-06 02:15:10 bird Exp $
     1# $Id: process.mak,v 1.1.2.2 2002-03-10 05:24:33 bird Exp $
    22
    33#
     
    6262TARGET_EXT=$(EXT_LIB)
    6363!endif
     64!if "$(TARGET_MODE)" == "EMPTY"
     65TARGET_EXT=empty
     66!endif
    6467!ifndef TARGET_EXT
    6568!error Error: TARGET_EXT not set
     
    8184
    8285!ifndef TARGET_STACKSIZE
     86# check if 16-bit target compiler
     87! if "$(BUILD_ENV)" == "MSCV6"
     88TARGET_STACKSIZE=0x2000
     89! else
    8390TARGET_STACKSIZE=0x10000
     91! endif
    8492!endif
    8593
     
    270278!ifdef SUBDIRS
    271279SUBDIRS_BUILD = subbuild
    272 $(SUBDIRS_BUILD): $(MAKEFILE)
     280$(SUBDIRS_BUILD):
    273281    @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) build
    274282!endif
    275 build: $(SUBDIRS_BUILD) $(TARGET) $(TARGET_ILIB) $(TARGET_PUBLIB)
     283
     284!ifdef PREMAKEFILES
     285PREMAKEFILES_BUILD = premakefiles_build
     286$(PREMAKEFILES_BUILD):
     287    @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) build
     288!endif
     289
     290build: $(SUBDIRS_BUILD) $(PREMAKEFILES_BUILD) $(TARGET) $(TARGET_ILIB) $(TARGET_PUBLIB)
    276291    @$(ECHO) Successfully Built $(CLRFIL)$(TARGET) $(TARGET_ILIB)$(CLRRST)
    277292!ifdef POSTMAKEFILES
     
    285300!ifdef SUBDIRS
    286301SUBDIRS_LIB = subdir_lib
    287 $(SUBDIRS_LIB): $(MAKEFILE)
     302$(SUBDIRS_LIB):
    288303    @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) lib
    289304!endif
    290305
    291 lib: $(SUBDIRS_LIB) $(TARGET_ILIB) $(TARGET_PUBLIB)
     306!ifdef PREMAKEFILES
     307PREMAKEFILES_LIB = premakefiles_lib
     308$(PREMAKEFILES_LIB):
     309    @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) lib
     310!endif
     311
     312lib: $(SUBDIRS_LIB)  $(TARGET_ILIB) $(TARGET_PUBLIB)
    292313!ifdef POSTMAKEFILES
    293314    @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
     
    317338    @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) $@
    318339!endif
     340!ifdef PREMAKEFILES
     341    @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
     342!endif
    319343!ifdef POSTMAKEFILES
    320344    @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
     
    332356    @$(TOOL_DOMAKES) "testcase.mak" $(TOOL_MAKE) $@
    333357!endif
     358!ifdef SUBDIRS
     359    @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) $@
     360!endif
     361!ifdef PREMAKEFILES
     362    @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
     363!endif
     364!ifdef POSTMAKEFILES
     365    @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
     366!endif
    334367
    335368
     
    339372dep:
    340373    @$(ECHO) Building dependencies $(CLRRST)
    341     $(TOOL_DEP) $(TOOL_DEP_FLAGS) -o$$(PATH_TARGET) -d$(BUILD_TARGET_DEPEND) $(TOOL_DEP_FILES)
     374    @$(TOOL_DEP) $(TOOL_DEP_FLAGS) -o$$(PATH_TARGET) -d$(BUILD_TARGET_DEPEND) $(TOOL_DEP_FILES)
    342375!ifdef SUBDIRS
    343     @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) $@
     376    @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) NODEP=1 $@
     377!endif
     378!ifdef PREMAKEFILES
     379    @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
    344380!endif
    345381!ifdef POSTMAKEFILES
    346     @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
     382    @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
    347383!endif
    348384
     
    384420    @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) $@
    385421!endif
     422!ifdef PREMAKEFILES
     423    @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
     424!endif
    386425!ifdef POSTMAKEFILES
    387426    @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
     
    475514# read dependency file from current directory
    476515#
    477 !if [$(TOOL_EXISTS) $(BUILD_TARGET_DEPEND)] == 0
    478 ! if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_TARGET_DEPEND)$(CLRRST)]
    479 ! endif
    480 ! include $(BUILD_TARGET_DEPEND)
    481 !else
    482 ! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_TARGET_DEPEND) is missing.$(CLRRST)]
     516!if "$(TARGET_MODE)" != "EMPTY"
     517! if [$(TOOL_EXISTS) $(BUILD_TARGET_DEPEND)] == 0
     518!  if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_TARGET_DEPEND)$(CLRRST)]
     519!  endif
     520!  include $(BUILD_TARGET_DEPEND)
     521! else
     522!  ifndef NODEP
     523!    if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_TARGET_DEPEND) is missing.$(CLRRST)]
     524!    endif
     525!  endif
    483526! endif
    484527!endif
Note: See TracChangeset for help on using the changeset viewer.