From 06c1e1ee6cde5231eda696b8d7bf957fd1333d93 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Wed, 31 Jan 2018 13:12:22 -0700 Subject: Make tagged layout consistent with versioned layout. Also, enable explicitly using old layouts. --- boostcpp.jam | 84 +++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 20 deletions(-) (limited to 'boostcpp.jam') diff --git a/boostcpp.jam b/boostcpp.jam index c5d5f53ee1..cb01893cfc 100644 --- a/boostcpp.jam +++ b/boostcpp.jam @@ -25,6 +25,7 @@ import set ; import targets ; import feature ; import property ; +import version : version-less ; ############################################################################## # @@ -59,6 +60,23 @@ if ! ( $(build-type) in complete minimal ) # What kind of layout are we doing? layout = [ option.get layout : "" ] ; + +layout = [ MATCH (versioned|tagged|system)(-(.+))? : $(layout) ] ; +if $(layout[3]) +{ + layout-version = $(layout[3]) ; + layout = $(layout[1]) ; + if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 66 ] + { + layout-version = 1.40 ; + } + else if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 67 ] + { + layout-version = 1.66 ; + } +} +layout-version ?= 1.67 ; + # On Windows, we used versioned layout by default in order to be compatible with # autolink. On other systems, we use system layout which is what every other # program uses. Note that the Windows check is static, and will not be affected @@ -109,6 +127,46 @@ if $(python-id) } +if $(layout) = versioned +{ + switch $(layout-version) + { + case 1.40 : + .format-name-args = + ; + case 1.66 : + .format-name-args = + ; + case 1.67 : + .format-name-args = + ; + } +} +else if $(layout) = tagged +{ + switch $(layout-version) + { + case 1.40 : + .format-name-args = + ; + case 1.66 : + .format-name-args = + ; + case 1.67 : + .format-name-args = + ; + } +} +else if $(layout) = system +{ + .format-name-args = ; +} +else +{ + .format-name-error = true ; +} + + ################################################################################ # # 1. 'tag' function adding decorations suitable to the properties if versioned @@ -120,29 +178,15 @@ rule tag ( name : type ? : property-set ) { if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB { - local result ; + local args = $(.format-name-args) ; if $(layout) = versioned { - result = [ common.format-name - -$(BOOST_VERSION_TAG) - -$(BUILD_ID) - : $(name) : $(type) : $(property-set) ] ; - } - else if $(layout) = tagged - { - result = [ common.format-name - - -$(BUILD_ID) - : $(name) : $(type) : $(property-set) ] ; + args += -$(BOOST_VERSION_TAG) ; } - else if $(layout) = system - { - result = [ common.format-name - - -$(BUILD_ID) - : $(name) : $(type) : $(property-set) ] ; - } - else + local result = [ common.format-name + $(args) -$(BUILD_ID) + : $(name) : $(type) : $(property-set) ] ; + if $(.format-name-error) { EXIT error\: invalid layout '$(layout:E=)' ; } -- cgit v1.2.1