Changeset 8294 for trunk/make


Ignore:
Timestamp:
Apr 22, 2002, 3:59:34 AM (24 years ago)
Author:
bird
Message:

Support for forced environment change, using BUILD_ENV_FORCE,
BUILD_ENVS_PRE and BUILD_ENVS_POST.
(first successful try)

Location:
trunk/make
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/make/setup.mak

    r8291 r8294  
    1 # $Id: setup.mak,v 1.4 2002-04-22 00:28:46 bird Exp $
     1# $Id: setup.mak,v 1.5 2002-04-22 01:59:33 bird Exp $
    22
    33#
     
    6161SHT_BLDENV=mscv6
    6262!endif
    63 !if "$(BUILD_ENV)" == "WAT11"
    64 SHT_BLDENV=wat11
    65 !endif
    66 !if "$(BUILD_ENV)" == "WATCOM"
     63!if "$(BUILD_ENV)" == "WAT11C"
    6764SHT_BLDENV=wat11
    6865!endif
     
    7168!endif
    7269
     70
     71!ifdef BUILD_ENV_FORCE
     72SHT_BLDENVFRC=
     73!if "$(BUILD_ENV_FORCE)" == "VAC308"
     74SHT_BLDENVFRC=vac308
     75!endif
     76!if "$(BUILD_ENV_FORCE)" == "VAC365"
     77SHT_BLDENVFRC=vac365
     78!endif
     79!if "$(BUILD_ENV_FORCE)" == "VAC4"
     80SHT_BLDENVFRC=vac4
     81!endif
     82!if "$(BUILD_ENV_FORCE)" == "EMX"
     83SHT_BLDENVFRC=emx
     84!endif
     85!if "$(BUILD_ENV_FORCE)" == "MSCV6"
     86SHT_BLDENVFRC=mscv6
     87!endif
     88!if "$(BUILD_ENV_FORCE)" == "WAT11C"
     89SHT_BLDENVFRC=wat11
     90!endif
     91!if "$(SHT_BLDENVFRC)" == ""
     92! error Fatal error: Var BUILD_ENV_FORCE is incorrect. ($(BUILD_ENV_FORCE)) Valid values: VAC308, VAC365, VAC4, EMX, MSCV6 and WATCOM
     93!endif
     94!else
     95BUILD_ENV_FORCE=$(BUILD_ENV)
     96SHT_BLDENVFRC=$(SHT_BLDENV)
     97!endif
    7398
    7499
     
    131156
    132157# -----------------------------------------------------------------------------
    133 # Build the environments
    134 # -----------------------------------------------------------------------------
    135 
    136 # EXPERIMENTAL
    137 !if 0
    138 # These strings are passed on to the BuildEnv.cmd script to setup
    139 # the correct environment.
    140 BUILD_ENVS_BASE_POST    = toolkit40
    141 BUILD_ENVS_BASE_PRE     =
    142 
    143 # Check for forced change in default compiler environment.
    144 !ifdef BUILD_ENV_FORCE
    145 !if "$(BUILD_ENV)" != "$(BUILD_ENV_FORCE)" || "$(BUILD_ENVS_PRE)" != "" || "$(BUILD_ENVS_POST)" != ""
    146 #
    147 # Remove old compiler and insert new compiler into the environment.
    148 # The individual makefiles requests changes using BUILD_ENVS_[PRE|POST].
    149 #
    150 !if [echo call $(PATH_TOOLS)\BuildEnv.cmd $(BUILD_ENV)- $(BUILD_ENVS_BASE_PRE) $(BUILD_ENVS_PRE) $(BUILD_ENV_FORCE) $(BUILD_ENVS_BASE_POST) $(BUILD_ENVS_POST)]
    151 !endif
    152 !if [call $(PATH_TOOLS)\BuildEnv.cmd $(BUILD_ENV)- $(BUILD_ENVS_BASE_PRE) $(BUILD_ENVS_PRE) $(BUILD_ENV_FORCE) $(BUILD_ENVS_BASE_POST) $(BUILD_ENVS_POST)]
    153 !endif
    154 #BUILD_ENV = $(BUILD_ENV_FORCE)
    155 !endif
    156 !endif
    157 
    158 !endif
    159 
    160 
    161 
    162 # -----------------------------------------------------------------------------
    163158# Include the setup.
    164159#   First the default common tools setup is included.
     
    225220
    226221
    227 !endif MAKE_SETUP_INCLUDED
    228 
     222
     223# -----------------------------------------------------------------------------
     224# Build the environments
     225# -----------------------------------------------------------------------------
     226
     227# In the makefiles you're allowed to use the BUILD_ENVS_PRE,
     228# BUILD_ENV_FORCE, BUILD_ENVS_POST variables to make private changes to the
     229# environment. These are combined with the two base ones as follows:
     230#   $(BUILD_ENVS_BASE_PRE) $(BUILD_ENVS_PRE) $(ENV_ENVS) $(BUILD_ENVS_BASE_POST) $(BUILD_ENVS_POST)
     231#
     232# BUILD_ENV_FORCE is used for changing the base compiler. Do *NOT* use
     233# BUILD_ENV for that! BUILD_ENV_FORCE isn't used directly but in the setup
     234# string above, but ENV_ENVS from the setup.[w]xyz.mk setup file is used.
     235#
     236
     237# These strings are passed on to the BuildEnv.cmd script to setup the correct
     238# shell environment.
     239# TODO   Should these be overridable by setup.[w]xyz.mak ? (kso)
     240
     241BUILD_ENVS_BASE_POST    = toolkit40
     242BUILD_ENVS_BASE_PRE     =
     243
     244
     245# Check if there is any change in the environment.
     246# If there are we will have to forward all target commands to the
     247# correct shell environment
     248!if "$(BUILD_ENV)" != "$(BUILD_ENV_FORCE)" || "$(BUILD_ENVS_PRE)" != "" || "$(BUILD_ENVS_POST)" != ""
     249MAKE_INCLUDE_PROCESS = $(PATH_MAKE)\process.forwarder.mak
     250
     251
     252# Compiler change or just environment change.
     253! if "$(BUILD_ENV)" != "$(BUILD_ENV_FORCE)"
     254MAKE_INCLUDE_SETUP_FORCE = $(PATH_MAKE)\setup.$(SHT_TRGPLTFRM)$(SHT_BLDMD)$(SHT_BLDENVFRC).mk
     255!  ifndef BUILD_QUIET
     256!   if [$(ECHO) Including forced platform setup file $(CLRFIL)$(MAKE_INCLUDE_SETUP_FORCE)$(CLRRST)]
     257!   endif
     258!  endif
     259!  include $(MAKE_INCLUDE_SETUP_FORCE)
     260BUILD_ENVS_CHANGE = $(ENV_ENVS: =- )- $(BUILD_ENVS_BASE_PRE) $(BUILD_ENVS_PRE) $(ENV_ENVS_FORCE) $(BUILD_ENVS_BASE_POST) $(BUILD_ENVS_POST)
     261! else
     262BUILD_ENVS_CHANGE = $(BUILD_ENVS_BASE_PRE) $(BUILD_ENVS_PRE) $(ENV_ENVS) $(BUILD_ENVS_BASE_POST) $(BUILD_ENVS_POST)
     263! endif
     264
     265!endif
     266
     267
     268!endif # MAKE_SETUP_INCLUDED
     269
  • trunk/make/setup.os2debvac308.mk

    r8292 r8294  
    1 # $Id: setup.os2debvac308.mk,v 1.4 2002-04-22 00:30:09 bird Exp $
     1# $Id: setup.os2debvac308.mk,v 1.5 2002-04-22 01:59:34 bird Exp $
    22
    33# ---OS2, DEBUG, VAC308-------------------------
    44ENV_NAME="OS/2, Debug, IBM VisualAge for C++ 3.08"
    55ENV_STATUS=OK
     6!if "$(ENV_ENVS)" == ""
     7ENV_ENVS=vac308
     8!else
     9ENV_ENVS_FORCE=vac308
     10!endif
     11
    612
    713#
  • trunk/make/setup.os2debwat11.mk

    r8292 r8294  
    1 # $Id: setup.os2debwat11.mk,v 1.2 2002-04-22 00:30:10 bird Exp $
     1# $Id: setup.os2debwat11.mk,v 1.3 2002-04-22 01:59:34 bird Exp $
    22
    33# ---OS2, DEBUG, VAC308-------------------------
    4 ENV_NAME="OS/2, Debug, Watcom 11.0, 11.0c, ++"
     4ENV_NAME="OS/2, Debug, Watcom 11.0c"
    55ENV_STATUS=OK
     6!if "$(ENV_ENVS)" == ""
     7ENV_ENVS=vac308 watcomc11c
     8!else
     9ENV_ENVS_FORCE=vac308 watcomc11c
     10!endif
    611
    712#
  • trunk/make/setup.tools.mk

    r8293 r8294  
    1 # $Id: setup.tools.mk,v 1.5 2002-04-22 00:30:54 bird Exp $
     1# $Id: setup.tools.mk,v 1.6 2002-04-22 01:59:34 bird Exp $
    22
    33
     
    4545TOOL_RM         = rm.exe -f
    4646TOOL_TYPE       = type
     47TOOL_BUILDENV   = $(PATH_TOOLS)\BuildEnv.cmd
    4748
    4849
Note: See TracChangeset for help on using the changeset viewer.