Changeset 31247

Show
Ignore:
Timestamp:
2008-09-22 22:15:06 (4 months ago)
Author:
sunshine
Message:

Augmented CS/scripts/msi/Jamfile to warn about unassigned
WIN32LIBS.MSM_PATH variable only if one of the msi/msm targets are built,
rather than every single time Jam is invoked for any target. Also, the
warning is now issued only once per session (until 'jam clean' resets it).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • CS/trunk/scripts/msi/Jamfile

    r31139 r31247  
    1010# This will become the MSI package version "build" number. 
    1111MSI_VERSION_PACKAGE = 4 ; 
     12 
     13WIN32LIBS.MSM_PATH_DEFAULT = "$(BUILDTOP)/win32libs/mergemodules" ; 
    1214 
    1315# Set up file lists for MSVC binaries. 
     
    193195rule GetWin32LibsMSMPath 
    194196{ 
    195   if "$(WIN32LIBS.MSM_PATH)" = "" 
    196   { 
    197     local guess = "$(TOP)/win32libs/mergemodules" ; 
    198     echo "No path for the cs-win32libs MSMs was set; I'm guessing $(guess)." ; 
    199     echo "If that is not what you want specify the WIN32LIBS.MSM_PATH Jam variable." ; 
     197  local guess ; 
     198  if ! $(WIN32LIBS.MSM_PATH) 
     199  { 
     200    guess = $(WIN32LIBS.MSM_PATH_DEFAULT) ; 
    200201    WIN32LIBS.MSM_PATH = $(guess) ; 
    201202  } 
    202   return $(WIN32LIBS.MSM_PATH) ; 
     203  local p = $(WIN32LIBS.MSM_PATH) ; 
     204  MkDir $(p) ; 
     205  if $(guess)  
     206  { 
     207    Depends $(p) : [ WarnMsmPathNotSet $(guess) ] ; 
     208  } 
     209  CleanDir clean : $(p) ; 
     210  return $(p) ; 
     211} 
     212 
     213rule WarnMsmPathNotSet 
     214{ 
     215  local guess = $(1) ; 
     216  local w = issue.warning ; 
     217  MakeLocate $(w) : $(LOCATE.MSI) ; 
     218  GUESS on $(w) = $(guess) ; 
     219  WarnMsmPathNotSet1 $(w) ; 
     220  return $(w) ; 
     221} 
     222 
     223actions WarnMsmPathNotSet1 
     224{ 
     225  echo "*** No path for the cs-win32libs MSM's was set." >&2 
     226  echo "*** Defaulting to: $(GUESS)" >&2 
     227  echo "*** If default is undesirable, assign WIN32LIBS.MSM_PATH Jam variable." >&2 
     228  echo "dummy file" > $(1) 
    203229} 
    204230 
     
    210236  local msi = CS-$(kind)-$(arch).msi ; 
    211237 
     238  Depends $(msi) : $(win32libs_msms) ; 
    212239  Depends $(msi) : mergemodules-neutral ; 
    213240  Depends $(msi) : mergemodules-$(arch) ;