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/thread-self/root/usr/share/boost-build/src/tools/generators/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/root/usr/share/boost-build/src/tools/generators/c-compiling-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 ;
import virtual-target ;

# Declare a special compiler generator. The only thing it does is changing the
# type used to represent 'action' in the constructed dependency graph to
# 'compile-action'. That class in turn adds additional include paths to handle
# cases when a source file includes headers which are generated themselves.
#
class C-compiling-generator : generator
{
    rule __init__ ( id : source-types + : target-types + : requirements *
        : optional-properties * )
    {
        generator.__init__ $(id) : $(source-types) : $(target-types) :
            $(requirements) : $(optional-properties) ;
    }

    rule action-class ( )
    {
        return compile-action ;
    }
}


rule register-c-compiler ( id : source-types + : target-types + : requirements *
    : optional-properties * )
{
    generators.register [ new C-compiling-generator $(id) : $(source-types) :
        $(target-types) : $(requirements) : $(optional-properties) ] ;
}

# FIXME: this is ugly, should find a better way (we would like client code to
# register all generators as "generators.some-rule" instead of
# "some-module.some-rule".)
#
IMPORT $(__name__) : register-c-compiler : : generators.register-c-compiler ;

class compile-action : action
{
    import sequence ;

    rule __init__ ( targets * : sources * : action-name : properties * )
    {
        action.__init__ $(targets) : $(sources) : $(action-name) : $(properties) ;
    }

    # For all virtual targets for the same dependency graph as self, i.e. which
    # belong to the same main target, add their directories to the include path.
    #
    rule adjust-properties ( property-set )
    {
        local s = [ $(self.targets[1]).creating-subvariant ] ;
        if $(s)
        {
            return [ $(property-set).add-raw
              [ $(s).implicit-includes "include" : H ] ] ;
        }
        else
        {
            return $(property-set) ;
        }
    }
}

VaKeR 2022