VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /proc/self/root/usr/share/boost-build/src/tools/generators/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/share/boost-build/src/tools/generators/searched-lib-generator.jam
# Copyright 2002-2017 Rene Rivera
# Copyright 2002-2017 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

import "class" : new ;
import generators ;

class searched-lib-generator : generator
{
    import property-set ;

    rule __init__ ( )
    {
        # The requirements cause the generators to be tried *only* when we are
        # building a lib target with a 'search' feature. This seems ugly --- all
        # we want is to make sure searched-lib-generator is not invoked deep
        # inside transformation search to produce intermediate targets.
        generator.__init__ searched-lib-generator : : SEARCHED_LIB ;
    }

    rule run ( project name ? : property-set : sources * )
    {
        if $(name)
        {
            # If 'name' is empty, it means we have not been called to build a
            # top-level target. In this case, we just fail immediately, because
            # searched-lib-generator cannot be used to produce intermediate
            # targets.

            local properties = [ $(property-set).raw ] ;
            local shared ;
            if <link>shared in $(properties)
            {
                shared = true ;
            }

            local search = [ feature.get-values <search> : $(properties) ] ;

            local a = [ new null-action [ $(property-set).add-raw <relevant>link ] ] ;
            local lib-name = [ feature.get-values <name> : $(properties) ] ;
            lib-name ?= $(name) ;
            local t = [ new searched-lib-target $(lib-name) : $(project)
                : $(shared) : $(search) : $(a) ] ;
            # We return sources for a simple reason. If there is
            #    lib png : z : <name>png ;
            # the 'z' target should be returned, so that apps linking to 'png'
            # will link to 'z', too.
            return [ property-set.create <xdll-path>$(search) <relevant>link ]
                   [ virtual-target.register $(t) ] $(sources) ;
        }
    }
}

generators.register [ new searched-lib-generator ] ;

class searched-lib-target : abstract-file-target
{
    rule __init__ ( name
        : project
        : shared ?
        : search *
        : action
    )
    {
        abstract-file-target.__init__ $(name) : SEARCHED_LIB : $(project)
          : $(action) : ;

        self.shared = $(shared) ;
        self.search = $(search) ;
    }

    rule shared ( )
    {
        return $(self.shared) ;
    }

    rule search ( )
    {
        return $(self.search) ;
    }

    rule actualize-location ( target )
    {
        NOTFILE $(target) ;
    }

    rule relevant ( )
    {
        return [ property-set.create <relevant>link ] ;
    }

    rule path ( )
    {
    }
}

VaKeR 2022