summaryrefslogtreecommitdiffstats
path: root/boost/layout-tagged.patch
blob: 05e60ec91749c7465c970d8d3327b16cbb16b03a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Patch to add --layout=tagged option which has the same behaviour as the
previous --layout=system.  This comes from boost svn changeset r53015
https://svn.boost.org/trac/boost/changeset/53015/trunk

--- Jamroot.orig	2009-06-15 23:01:28.000000000 -0400
+++ Jamroot	2009-06-15 23:08:08.000000000 -0400
@@ -64,21 +64,26 @@
 #                           versions of Boost or multiple compilers can
 #                           be used on the same system.
 #
-#                               versioned (default) - Names of boost
-#                               binaries include the Boost version
-#                               number and the name and version of the
-#                               compiler.  Boost headers are installed
-#                               in a subdirectory of <HDRDIR> whose
-#                               name contains the Boost version
-#                               number.
-#
-#                               system - Binaries names do not include
-#                               the Boost version number or the name
-#                               and version number of the compiler.
-#                               Boost headers are installed directly
-#                               into <HDRDIR>.  This option is
-#                               intended for system integrators who
-#                               are building distribution packages.
+#                               versioned (default) - Names of boost binaries
+#                               include the Boost version number, name and
+#                               version of the compiler and encoded build
+#                               properties.  Boost headers are installed in a
+#                               subdirectory of <HDRDIR> whose name contains
+#                               the Boost version number.
+#
+#                               tagged -- Names of boost binaries include the
+#                               encoded build properties such as variant and
+#                               threading, but do not including compiler name
+#                               and version, or Boost version. This option is
+#                               useful if you build several variants of Boost,
+#                               using the same compiler.
+#
+#                               system - Binaries names do not include the
+#                               Boost version number or the name and version
+#                               number of the compiler.  Boost headers are
+#                               installed directly into <HDRDIR>.  This option
+#                               is intended for system integrators who are
+#                               building distribution packages.
 #
 #   --buildid=ID            Adds the specified ID to the name of built
 #                           libraries.  The default is to not add anything.
@@ -318,53 +323,50 @@
 {
     if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
     {
+        local result ;
         if $(layout) = versioned
         {
-            local result = [ common.format-name
+            result = [ common.format-name
                 <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
                 -$(BUILD_ID)
                 : $(name) : $(type) : $(property-set) ] ;
-
-            # Optionally add version suffix. On NT, library with version suffix
-            # will not be recognized by linkers. On CYGWIN, we get strage
-            # duplicate symbol errors when library is generated with version
-            # suffix. On OSX, version suffix is not needed -- the linker expects
-            # the libFoo.1.2.3.dylib format. AIX linkers do not accept version
-            # suffixes either. Pgi compilers can not accept library with version
-            # suffix.
-            if $(type) = SHARED_LIB &&
-              ( ! ( [ $(property-set).get <target-os> ] in windows cygwin darwin aix ) &&
-                ! ( [ $(property-set).get <toolset> ] in pgi ) )
-            {
-                result = $(result).$(BOOST_VERSION)  ;
-            }
-
-            return $(result) ;
+        }        
+        else if $(layout) = tagged
+        {
+            result = [ common.format-name
+                <base> <threading> <runtime>
+                -$(BUILD_ID)
+                : $(name) : $(type) : $(property-set) ] ;            
         }
-        else
+        else if $(layout) = system
         {
-            local result = [ common.format-name
+            result = [ common.format-name
                 <base> 
                 -$(BUILD_ID)
                 : $(name) : $(type) : $(property-set) ] ;
-
-            # Optionally add version suffix. On NT, library with version suffix
-            # will not be recognized by linkers. On CYGWIN, we get strage
-            # duplicate symbol errors when library is generated with version
-            # suffix. On OSX, version suffix is not needed -- the linker expects
-            # the libFoo.1.2.3.dylib format. AIX linkers do not accept version
-            # suffixes either. Pgi compilers can not accept library with version
-            # suffix.
-            if $(type) = SHARED_LIB &&
-              ( ! ( [ $(property-set).get <target-os> ] in windows cygwin darwin aix ) &&
-                ! ( [ $(property-set).get <toolset> ] in pgi ) )
-            {
-                result = $(result).$(BOOST_VERSION)  ;
-            }
-
-            return $(result) ;
         }
-    }
+        else
+        {
+            ECHO "error: invalid layout '$(layout)'" ;
+            EXIT ;               
+        }
+                
+        # Optionally add version suffix. On NT, library with version suffix
+        # will not be recognized by linkers. On CYGWIN, we get strage
+        # duplicate symbol errors when library is generated with version
+        # suffix. On OSX, version suffix is not needed -- the linker expects
+        # the libFoo.1.2.3.dylib format. AIX linkers do not accept version
+        # suffixes either. Pgi compilers can not accept library with version
+        # suffix.
+        if $(type) = SHARED_LIB &&
+          ( ! ( [ $(property-set).get <target-os> ] in windows cygwin darwin aix ) &&
+            ! ( [ $(property-set).get <toolset> ] in pgi ) )
+        {
+            result = $(result).$(BOOST_VERSION)  ;
+        }
+            
+        return $(result) ;
+    }    
 }