Ticket #4866: Jamfile.v2.patch

File Jamfile.v2.patch, 1.4 KB (added by Steven Watanabe, 9 years ago)

Patch to fix the problem

  • libs/iostreams/build/Jamfile.v2

     
    2121import os ;
    2222import path ;
    2323import ac ;
     24import print ;
    2425local debug = [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] ;
    2526
    2627for local v in NO_COMPRESSION
     
    144145    }       
    145146}
    146147
     148if [ os.name ] = NT
     149{
     150    rule read-file ( file )
     151    {
     152        return [ SPLIT_BY_CHARACTERS [ SHELL "type \"$(file:G=)\" 2>nul" ] : "\n" ] ;
     153    }
     154}
     155else
     156{
     157    rule read-file ( file )
     158    {
     159        return [ SPLIT_BY_CHARACTERS [ SHELL "cat \"$(file:G=)\" 2>/dev/null" ]  : "\n" ] ;
     160    }
     161}
    147162
     163rule make-bz2-def-file ( target : source : properties * )
     164{
     165    print.output $(target) ;
     166    for local line in [ read-file $(source) ]
     167    {
     168        if ! [ MATCH "(LIBRARY[ \t]+LIBBZ2)" : $(line) ]
     169        {
     170            print.text $(line) : yes ;
     171        }
     172    }
     173}
     174
     175if $(BZIP2_SOURCE)
     176{
     177    make bz2.def : $(BZIP2_SOURCE)/libbz2.def : @make-bz2-def-file ;
     178    bz2-def-file = bz2.def ;
     179}
     180
    148181local sources = file_descriptor.cpp mapped_file.cpp ;
    149182local bz2 = [ create-library bzip2 : libbz2 bz2 :
    150183    blocksort bzlib compress crctable decompress huffman randtable :
    151     <link>shared:<def-file>$(BZIP2_SOURCE)/libbz2.def ] ;
     184    <link>shared:<def-file>$(bz2-def-file) ] ;
    152185
    153186if $(bz2)
    154187{