1 # Status: mostly ported. Missing is --out-xml support, 'configure' integration
5 # Copyright 2003, 2005 Dave Abrahams
6 # Copyright 2006 Rene Rivera
7 # Copyright 2003, 2004, 2005, 2006, 2007 Vladimir Prus
8 # Distributed under the Boost Software License, Version 1.0.
9 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
13 from b2.build.engine import Engine
14 from b2.manager import Manager
15 from b2.util.path import glob
16 from b2.build import feature, property_set
17 import b2.build.virtual_target
18 from b2.build.targets import ProjectTarget
19 from b2.util.sequence import unique
20 import b2.build.build_request
21 from b2.build.errors import ExceptionWithUserContext
22 import b2.tools.common
23 from b2.build.toolset import using
25 import b2.build.project as project
26 import b2.build.virtual_target as virtual_target
27 import b2.build.build_request as build_request
31 from b2.manager import get_manager
32 from b2.util import cached
33 from b2.util import option
42 ################################################################################
46 ################################################################################
48 # Flag indicating we should display additional debugging information related to
49 # locating and loading Boost Build configuration files.
52 # Legacy option doing too many things, some of which are not even documented.
53 # Should be phased out.
54 # * Disables loading site and user configuration files.
55 # * Disables auto-configuration for toolsets specified explicitly on the
57 # * Causes --toolset command-line options to be ignored.
58 # * Prevents the default toolset from being used even if no toolset has been
60 legacy_ignore_config = False
62 # The cleaning is tricky. Say, if user says 'bjam --clean foo' where 'foo' is a
63 # directory, then we want to clean targets which are in 'foo' as well as those
64 # in any children Jamfiles under foo but not in any unrelated Jamfiles. To
65 # achieve this we collect a list of projects under which cleaning is allowed.
68 # Virtual targets obtained when building main targets references on the command
69 # line. When running 'bjam --clean main_target' we want to clean only files
70 # belonging to that main target so we need to record which targets are produced
72 results_of_main_targets = []
74 # Was an XML dump requested?
77 # Default toolset & version to be used in case no other toolset has been used
78 # explicitly by either the loaded configuration files, the loaded project build
79 # scripts or an explicit toolset request on the command line. If not specified,
80 # an arbitrary default will be used based on the current host OS. This value,
81 # while not strictly necessary, has been added to allow testing Boost-Build's
82 # default toolset usage functionality.
83 default_toolset = None
84 default_toolset_version = None
86 ################################################################################
90 ################################################################################
92 # Returns the property set with the free features from the currently processed
95 def command_line_free_features():
96 return command_line_free_features
98 # Sets the default toolset & version to be used in case no other toolset has
99 # been used explicitly by either the loaded configuration files, the loaded
100 # project build scripts or an explicit toolset request on the command line. For
101 # more detailed information see the comment related to used global variables.
103 def set_default_toolset(toolset, version=None):
104 default_toolset = toolset
105 default_toolset_version = version
110 def add_pre_build_hook(callable):
111 pre_build_hook.append(callable)
113 post_build_hook = None
115 def set_post_build_hook(callable):
116 post_build_hook = callable
118 ################################################################################
122 ################################################################################
124 # Returns actual Jam targets to be used for executing a clean request.
126 def actual_clean_targets(targets):
128 # Construct a list of projects explicitly detected as targets on this build
129 # system run. These are the projects under which cleaning is allowed.
131 if isinstance(t, b2.build.targets.ProjectTarget):
132 project_targets.append(t.project_module())
134 # Construct a list of targets explicitly detected on this build system run
135 # as a result of building main targets.
136 targets_to_clean = set()
137 for t in results_of_main_targets:
138 # Do not include roots or sources.
139 targets_to_clean.update(virtual_target.traverse(t))
142 for t in get_manager().virtual_targets().all_targets():
144 # Remove only derived targets.
147 if t in targets_to_clean or should_clean_project(p.project_module()):
150 return [t.actualize() for t in to_clean]
152 _target_id_split = re.compile("(.*)//(.*)")
154 # Given a target id, try to find and return the corresponding target. This is
155 # only invoked when there is no Jamfile in ".". This code somewhat duplicates
156 # code in project-target.find but we can not reuse that code without a
157 # project-targets instance.
159 def find_target(target_id):
161 projects = get_manager().projects()
162 m = _target_id_split.match(target_id)
164 pm = projects.find(m.group(1), ".")
166 pm = projects.find(target_id, ".")
169 result = projects.target(pm)
172 result = result.find(m.group(2))
176 def initialize_config_module(module_name, location=None):
178 get_manager().projects().initialize(module_name, location)
180 # Helper rule used to load configuration files. Loads the first configuration
181 # file with the given 'filename' at 'path' into module with name 'module-name'.
182 # Not finding the requested file may or may not be treated as an error depending
183 # on the must-find parameter. Returns a normalized path to the loaded
184 # configuration file or nothing if no file was loaded.
186 def load_config(module_name, filename, paths, must_find=False):
189 print "notice: Searching '%s' for '%s' configuration file '%s." \
190 % (paths, module_name, filename)
194 t = os.path.join(path, filename)
195 if os.path.exists(t):
200 where = os.path.realpath(where)
203 print "notice: Loading '%s' configuration file '%s' from '%s'." \
204 % (module_name, filename, where)
206 # Set source location so that path-constant in config files
207 # with relative paths work. This is of most importance
208 # for project-config.jam, but may be used in other
209 # config files as well.
210 attributes = get_manager().projects().attributes(module_name) ;
211 attributes.set('source-location', os.path.dirname(where), True)
212 get_manager().projects().load_standalone(module_name, where)
215 msg = "Configuration file '%s' not found in '%s'." % (filename, path)
217 get_manager().errors()(msg)
224 # Loads all the configuration files used by Boost Build in the following order:
227 # Loaded only if specified on the command-line using the --test-config
228 # command-line parameter. It is ok for this file not to exist even if specified.
229 # If this configuration file is loaded, regular site and user configuration
230 # files will not be. If a relative path is specified, file is searched for in
231 # the current folder.
234 # Always named site-config.jam. Will only be found if located on the system
235 # root path (Windows), /etc (non-Windows), user's home folder or the Boost Build
236 # path, in that order. Not loaded in case the test-config configuration file is
237 # loaded or either the --ignore-site-config or the --ignore-config command-line
238 # option is specified.
241 # Named user-config.jam by default or may be named explicitly using the
242 # --user-config command-line option or the BOOST_BUILD_USER_CONFIG environment
243 # variable. If named explicitly the file is looked for from the current working
244 # directory and if the default one is used then it is searched for in the
245 # user's home directory and the Boost Build path, in that order. Not loaded in
246 # case either the test-config configuration file is loaded, --ignore-config
247 # command-line option is specified or an empty file name is explicitly
248 # specified. If the file name has been given explicitly then the file must
251 # Test configurations have been added primarily for use by Boost Build's
252 # internal unit testing system but may be used freely in other places as well.
254 def load_configuration_files():
256 # Flag indicating that site configuration should not be loaded.
257 ignore_site_config = "--ignore-site-config" in sys.argv
259 if legacy_ignore_config and debug_config:
260 print "notice: Regular site and user configuration files will be ignored"
261 print "notice: due to the --ignore-config command-line option."
263 initialize_config_module("test-config")
266 m = re.match("--test-config=(.*)$", a)
268 test_config = b2.util.unquote(m.group(1))
272 where = load_config("test-config", os.path.basename(test_config), [os.path.dirname(test_config)])
274 if debug_config and not legacy_ignore_config:
275 print "notice: Regular site and user configuration files will"
276 print "notice: be ignored due to the test configuration being loaded."
278 user_path = [os.path.expanduser("~")] + bjam.variable("BOOST_BUILD_PATH")
279 site_path = ["/etc"] + user_path
280 if os.name in ["nt"]:
281 site_path = [os.getenv("SystemRoot")] + user_path
283 if ignore_site_config and not legacy_ignore_config:
284 print "notice: Site configuration files will be ignored due to the"
285 print "notice: --ignore-site-config command-line option."
287 initialize_config_module("site-config")
288 if not test_config and not ignore_site_config and not legacy_ignore_config:
289 load_config('site-config', 'site-config.jam', site_path)
291 initialize_config_module('user-config')
292 if not test_config and not legacy_ignore_config:
294 # Here, user_config has value of None if nothing is explicitly
295 # specified, and value of '' if user explicitly does not want
296 # to load any user config.
299 m = re.match("--user-config=(.*)$", a)
301 user_config = m.group(1)
304 if user_config is None:
305 user_config = os.getenv("BOOST_BUILD_USER_CONFIG")
307 # Special handling for the case when the OS does not strip the quotes
308 # around the file name, as is the case when using Cygwin bash.
309 user_config = b2.util.unquote(user_config)
310 explicitly_requested = user_config
312 if user_config is None:
313 user_config = "user-config.jam"
316 if explicitly_requested:
318 user_config = os.path.abspath(user_config)
321 print "notice: Loading explicitly specified user configuration file:"
322 print " " + user_config
324 load_config('user-config', os.path.basename(user_config), [os.path.dirname(user_config)], True)
326 load_config('user-config', os.path.basename(user_config), user_path)
329 print "notice: User configuration file loading explicitly disabled."
331 # We look for project-config.jam from "." upward.
332 # I am not sure this is 100% right decision, we might as well check for
333 # it only alonside the Jamroot file. However:
335 # - We need to load project-root.jam before Jamroot
336 # - We probably would need to load project-root.jam even if there's no
337 # Jamroot - e.g. to implement automake-style out-of-tree builds.
338 if os.path.exists("project-config.jam"):
339 file = ["project-config.jam"]
341 file = b2.util.path.glob_in_parents(".", ["project-config.jam"])
344 initialize_config_module('project-config', os.path.dirname(file[0]))
345 load_config('project-config', "project-config.jam", [os.path.dirname(file[0])], True)
348 # Autoconfigure toolsets based on any instances of --toolset=xx,yy,...zz or
349 # toolset=xx,yy,...zz in the command line. May return additional properties to
350 # be processed as if they had been specified by the user.
352 def process_explicit_toolset_requests():
354 extra_properties = []
356 option_toolsets = [e for option in b2.util.regex.transform(sys.argv, "^--toolset=(.*)$")
357 for e in option.split(',')]
358 feature_toolsets = [e for option in b2.util.regex.transform(sys.argv, "^toolset=(.*)$")
359 for e in option.split(',')]
361 for t in option_toolsets + feature_toolsets:
363 # Parse toolset-version/properties.
364 (toolset_version, toolset, version) = re.match("(([^-/]+)-?([^/]+)?)/?.*", t).groups()
367 print "notice: [cmdline-cfg] Detected command-line request for '%s': toolset= %s version=%s" \
368 % (toolset_version, toolset, version)
370 # If the toolset is not known, configure it now.
372 if toolset in feature.values("toolset"):
375 if known and version and not feature.is_subvalue("toolset", toolset, "version", version):
377 # TODO: we should do 'using $(toolset)' in case no version has been
378 # specified and there are no versions defined for the given toolset to
379 # allow the toolset to configure its default version. For this we need
380 # to know how to detect whether a given toolset has any versions
381 # defined. An alternative would be to do this whenever version is not
382 # specified but that would require that toolsets correctly handle the
383 # case when their default version is configured multiple times which
384 # should be checked for all existing toolsets first.
389 print "notice: [cmdline-cfg] toolset '%s' not previously configured; attempting to auto-configure now" % toolset_version
390 if version is not None:
391 using(toolset, version)
399 print "notice: [cmdline-cfg] toolset '%s' already configured" % toolset_version
401 # Make sure we get an appropriate property into the build request in
402 # case toolset has been specified using the "--toolset=..." command-line
404 if not t in sys.argv and not t in feature_toolsets:
407 print "notice: [cmdline-cfg] adding toolset=%s) to the build request." % t ;
408 extra_properties += "toolset=%s" % t
410 return extra_properties
414 # Returns 'true' if the given 'project' is equal to or is a (possibly indirect)
415 # child to any of the projects requested to be cleaned in this build system run.
416 # Returns 'false' otherwise. Expects the .project-targets list to have already
420 def should_clean_project(project):
422 if project in project_targets:
426 parent = get_manager().projects().attribute(project, "parent-module")
427 if parent and parent != "user-config":
428 return should_clean_project(parent)
432 ################################################################################
437 ################################################################################
441 sys.argv = bjam.variable("ARGV")
443 # FIXME: document this option.
444 if "--profiling" in sys.argv:
446 r = cProfile.runctx('main_real()', globals(), locals(), "stones.prof")
449 stats = pstats.Stats("stones.prof")
451 stats.sort_stats('time', 'calls')
452 stats.print_callers(20)
457 except ExceptionWithUserContext, e:
462 global debug_config, legacy_ignore_config, out_xml
464 debug_config = "--debug-configuration" in sys.argv
465 legacy_ignore_config = "--ignore_config" in sys.argv
466 out_xml = any(re.match("^--out-xml=(.*)$", a) for a in sys.argv)
470 global_build_dir = option.get("build-dir")
471 manager = Manager(engine, global_build_dir)
473 import b2.build.configure as configure
475 if "--version" in sys.argv:
480 # This module defines types and generator and what not,
481 # and depends on manager's existence
482 import b2.tools.builtin
484 b2.tools.common.init(manager)
486 load_configuration_files()
488 extra_properties = []
489 # Note that this causes --toolset options to be ignored if --ignore-config
491 if not legacy_ignore_config:
492 extra_properties = process_explicit_toolset_requests()
494 # We always load project in "." so that 'use-project' directives have any
495 # chance of being seen. Otherwise, we would not be able to refer to
496 # subprojects using target ids.
497 current_project = None
498 projects = get_manager().projects()
499 if projects.find(".", "."):
500 current_project = projects.target(projects.load("."))
502 # In case there are no toolsets currently defined makes the build run using
503 # the default toolset.
504 if not legacy_ignore_config and not feature.values("toolset"):
509 dtv = default_toolset_version
515 #else if [ os.name ] = MACOSX
517 # default-toolset = darwin ;
520 print "warning: No toolsets are configured."
521 print "warning: Configuring default toolset '%s'." % dt
522 print "warning: If the default is wrong, your build may not work correctly."
523 print "warning: Use the \"toolset=xxxxx\" option to override our guess."
524 print "warning: For more configuration options, please consult"
525 print "warning: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html"
529 # Parse command line for targets and properties. Note that this requires
530 # that all project files already be loaded.
531 (target_ids, properties) = build_request.from_command_line(sys.argv[1:] + extra_properties)
533 # Expand properties specified on the command line into multiple property
534 # sets consisting of all legal property combinations. Each expanded property
535 # set will be used for a single build run. E.g. if multiple toolsets are
536 # specified then requested targets will be built with each of them.
538 expanded = build_request.expand_no_defaults(properties)
540 expanded = [property_set.empty()]
542 # Check that we actually found something to build.
543 if not current_project and not target_ids:
544 get_manager().errors()("no Jamfile in current directory found, and no target references specified.")
548 # Flags indicating that this build system run has been started in order to
549 # clean existing instead of create new targets. Note that these are not the
550 # final flag values as they may get changed later on due to some special
551 # targets being specified on the command line.
552 clean = "--clean" in sys.argv
553 cleanall = "--clean-all" in sys.argv
555 # List of explicitly requested files to build. Any target references read
556 # from the command line parameter not recognized as one of the targets
557 # defined in the loaded Jamfiles will be interpreted as an explicitly
558 # requested file to build. If any such files are explicitly requested then
559 # only those files and the targets they depend on will be built and they
560 # will be searched for among targets that would have been built had there
561 # been no explicitly requested files.
562 explicitly_requested_files = []
564 # List of Boost Build meta-targets, virtual-targets and actual Jam targets
565 # constructed in this build system run.
570 explicitly_requested_files = []
572 # Process each target specified on the command-line and convert it into
573 # internal Boost Build target objects. Detect special clean target. If no
574 # main Boost Build targets were explictly requested use the current project
576 for id in target_ids:
582 t = current_project.find(id, no_error=1)
587 print "notice: could not find main target '%s'" % id
588 print "notice: assuming it's a name of file to create " ;
589 explicitly_requested_files.append(id)
594 targets = [projects.target(projects.module_name("."))]
596 # FIXME: put this BACK.
598 ## if [ option.get dump-generators : : true ]
604 # We wish to put config.log in the build directory corresponding
605 # to Jamroot, so that the location does not differ depending on
606 # directory where we do build. The amount of indirection necessary
608 first_project = targets[0].project()
609 first_project_root_location = first_project.get('project-root')
610 first_project_root_module = manager.projects().load(first_project_root_location)
611 first_project_root = manager.projects().target(first_project_root_module)
612 first_build_build_dir = first_project_root.build_dir()
613 configure.set_log_file(os.path.join(first_build_build_dir, "config.log"))
617 global results_of_main_targets
619 # Now that we have a set of targets to build and a set of property sets to
620 # build the targets with, we can start the main build process by using each
621 # property set to generate virtual targets from all of our listed targets
622 # and any of their dependants.
624 manager.set_command_line_free_features(property_set.create(p.free()))
629 if not isinstance(t, ProjectTarget):
630 results_of_main_targets.extend(g.targets())
631 virtual_targets.extend(g.targets())
632 except ExceptionWithUserContext, e:
637 # Convert collected virtual targets into actual raw Jam targets.
638 for t in virtual_targets:
639 actual_targets.append(t.actualize())
643 ## # If XML data output has been requested prepare additional rules and targets
644 ## # so we can hook into Jam to collect build data while its building and have
645 ## # it trigger the final XML report generation after all the planned targets
646 ## # have been built.
649 ## # Get a qualified virtual target name.
650 ## rule full-target-name ( target )
652 ## local name = [ $(target).name ] ;
653 ## local project = [ $(target).project ] ;
654 ## local project-path = [ $(project).get location ] ;
655 ## return $(project-path)//$(name) ;
658 ## # Generate an XML file containing build statistics for each constituent.
660 ## rule out-xml ( xml-file : constituents * )
662 ## # Prepare valid XML header and footer with some basic info.
665 ## local jam = [ version.jam ] ;
666 ## local os = [ modules.peek : OS OSPLAT JAMUNAME ] "" ;
667 ## local timestamp = [ modules.peek : JAMDATE ] ;
668 ## local cwd = [ PWD ] ;
669 ## local command = $(.sys.argv) ;
670 ## local bb-version = [ version.boost-build ] ;
671 ## .header on $(xml-file) =
672 ## "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
673 ## "$(nl)<build format=\"1.0\" version=\"$(bb-version)\">"
674 ## "$(nl) <jam version=\"$(jam:J=.)\" />"
675 ## "$(nl) <os name=\"$(os[1])\" platform=\"$(os[2])\"><![CDATA[$(os[3-]:J= )]]></os>"
676 ## "$(nl) <timestamp><![CDATA[$(timestamp)]]></timestamp>"
677 ## "$(nl) <directory><![CDATA[$(cwd)]]></directory>"
678 ## "$(nl) <command><![CDATA[\"$(command:J=\" \")\"]]></command>"
680 ## .footer on $(xml-file) =
683 ## # Generate the target dependency graph.
684 ## .contents on $(xml-file) +=
685 ## "$(nl) <targets>" ;
686 ## for local t in [ virtual-target.all-targets ]
688 ## local action = [ $(t).action ] ;
690 ## # If a target has no action, it has no dependencies.
692 ## local name = [ full-target-name $(t) ] ;
693 ## local sources = [ $(action).sources ] ;
694 ## local dependencies ;
695 ## for local s in $(sources)
697 ## dependencies += [ full-target-name $(s) ] ;
700 ## local path = [ $(t).path ] ;
701 ## local jam-target = [ $(t).actual-name ] ;
703 ## .contents on $(xml-file) +=
705 ## "$(nl) <name><![CDATA[$(name)]]></name>"
706 ## "$(nl) <dependencies>"
707 ## "$(nl) <dependency><![CDATA[$(dependencies)]]></dependency>"
708 ## "$(nl) </dependencies>"
709 ## "$(nl) <path><![CDATA[$(path)]]></path>"
710 ## "$(nl) <jam-target><![CDATA[$(jam-target)]]></jam-target>"
715 ## .contents on $(xml-file) +=
716 ## "$(nl) </targets>" ;
718 ## # Build $(xml-file) after $(constituents). Do so even if a
719 ## # constituent action fails and regenerate the xml on every bjam run.
720 ## INCLUDES $(xml-file) : $(constituents) ;
721 ## ALWAYS $(xml-file) ;
722 ## __ACTION_RULE__ on $(xml-file) = build-system.out-xml.generate-action ;
723 ## out-xml.generate $(xml-file) ;
726 ## # The actual build actions are here; if we did this work in the actions
727 ## # clause we would have to form a valid command line containing the
728 ## # result of @(...) below (the name of the XML file).
730 ## rule out-xml.generate-action ( args * : xml-file
731 ## : command status start end user system : output ? )
734 ## [ on $(xml-file) return $(.header) $(.contents) $(.footer) ] ;
735 ## local f = @($(xml-file):E=$(contents)) ;
738 ## # Nothing to do here; the *real* actions happen in
739 ## # out-xml.generate-action.
740 ## actions quietly out-xml.generate { }
742 ## # Define the out-xml file target, which depends on all the targets so
743 ## # that it runs the collection after the targets have run.
744 ## out-xml $(.out-xml) : $(actual-targets) ;
746 ## # Set up a global __ACTION_RULE__ that records all the available
747 ## # statistics about each actual target in a variable "on" the --out-xml
750 ## rule out-xml.collect ( xml-file : target : command status start end user
751 ## system : output ? )
755 ## # Open the action with some basic info.
756 ## .contents on $(xml-file) +=
757 ## "$(nl) <action status=\"$(status)\" start=\"$(start)\" end=\"$(end)\" user=\"$(user)\" system=\"$(system)\">" ;
759 ## # If we have an action object we can print out more detailed info.
760 ## local action = [ on $(target) return $(.action) ] ;
763 ## local action-name = [ $(action).action-name ] ;
764 ## local action-sources = [ $(action).sources ] ;
765 ## local action-props = [ $(action).properties ] ;
767 ## # The qualified name of the action which we created the target.
768 ## .contents on $(xml-file) +=
769 ## "$(nl) <name><![CDATA[$(action-name)]]></name>" ;
771 ## # The sources that made up the target.
772 ## .contents on $(xml-file) +=
773 ## "$(nl) <sources>" ;
774 ## for local source in $(action-sources)
776 ## local source-actual = [ $(source).actual-name ] ;
777 ## .contents on $(xml-file) +=
778 ## "$(nl) <source><![CDATA[$(source-actual)]]></source>" ;
780 ## .contents on $(xml-file) +=
781 ## "$(nl) </sources>" ;
783 ## # The properties that define the conditions under which the
784 ## # target was built.
785 ## .contents on $(xml-file) +=
786 ## "$(nl) <properties>" ;
787 ## for local prop in [ $(action-props).raw ]
789 ## local prop-name = [ MATCH ^<(.*)>$ : $(prop:G) ] ;
790 ## .contents on $(xml-file) +=
791 ## "$(nl) <property name=\"$(prop-name)\"><![CDATA[$(prop:G=)]]></property>" ;
793 ## .contents on $(xml-file) +=
794 ## "$(nl) </properties>" ;
797 ## local locate = [ on $(target) return $(LOCATE) ] ;
799 ## .contents on $(xml-file) +=
800 ## "$(nl) <jam-target><![CDATA[$(target)]]></jam-target>"
801 ## "$(nl) <path><![CDATA[$(target:G=:R=$(locate))]]></path>"
802 ## "$(nl) <command><![CDATA[$(command)]]></command>"
803 ## "$(nl) <output><![CDATA[$(output)]]></output>" ;
804 ## .contents on $(xml-file) +=
805 ## "$(nl) </action>" ;
808 ## # When no __ACTION_RULE__ is set "on" a target, the search falls back to
809 ## # the global module.
812 ## __ACTION_RULE__ = build-system.out-xml.collect
813 ## [ modules.peek build-system : .out-xml ] ;
819 ## out-xml.generate-action
821 ## build-system.out-xml.collect
822 ## build-system.out-xml.generate-action
826 j = option.get("jobs")
828 bjam.call("set-variable", PARALLELISM, j)
830 k = option.get("keep-going", "true", "true")
831 if k in ["on", "yes", "true"]:
832 bjam.call("set-variable", "KEEP_GOING", "1")
833 elif k in ["off", "no", "false"]:
834 bjam.call("set-variable", "KEEP_GOING", "0")
836 print "error: Invalid value for the --keep-going option"
839 # The 'all' pseudo target is not strictly needed expect in the case when we
840 # use it below but people often assume they always have this target
841 # available and do not declare it themselves before use which may cause
842 # build failures with an error message about not being able to build the
844 bjam.call("NOTFILE", "all")
846 # And now that all the actual raw Jam targets and all the dependencies
847 # between them have been prepared all that is left is to tell Jam to update
849 if explicitly_requested_files:
850 # Note that this case can not be joined with the regular one when only
851 # exact Boost Build targets are requested as here we do not build those
852 # requested targets but only use them to construct the dependency tree
853 # needed to build the explicitly requested files.
854 # FIXME: add $(.out-xml)
855 bjam.call("UPDATE", ["<e>%s" % x for x in explicitly_requested_files])
857 bjam.call("UPDATE", "clean-all")
859 manager.engine().set_update_action("common.Clean", "clean",
860 actual_clean_targets(targets))
861 bjam.call("UPDATE", "clean")
864 #configure.print-configure-checks-summary ;
867 for h in pre_build_hook:
870 bjam.call("DEPENDS", "all", actual_targets)
871 ok = bjam.call("UPDATE_NOW", "all") # FIXME: add out-xml
874 # Prevent automatic update of the 'all' target, now that
875 # we have explicitly updated what we wanted.
878 if manager.errors().count() == 0: