-
Notifications
You must be signed in to change notification settings - Fork 80
simplified doc/Jamfile.v2 #336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,57 +1,23 @@ | ||
| import generate ; | ||
| import path ; | ||
| import property-set ; | ||
| import virtual-target ; | ||
| # Copyright 2026 Joaquin M Lopez Munoz | ||
| # 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) | ||
|
|
||
| path-constant HERE : . ; | ||
| make html_ : build_antora.sh : @run-script ; | ||
|
|
||
| make html/index.html : build_antora.sh : @run-script ; | ||
| generate files-to-install : html/index.html : <generating-rule>@delayed-glob ; | ||
| install install | ||
| : files-to-install | ||
| : <location>html | ||
| <install-source-root>html/unordered | ||
| ; | ||
| explicit html/index.html files-to-install ; | ||
|
|
||
| # this runs the antora script | ||
| actions run-script | ||
| { | ||
| bash $(>) | ||
| } | ||
|
|
||
| # this globs after its sources are created | ||
| rule delayed-glob ( project name : property-set : sources * ) | ||
| { | ||
| for local src in $(sources) | ||
| { | ||
| # the next line causes the source to be generated immediately | ||
| # and not later (which it normally would) | ||
| UPDATE_NOW [ $(src).actualize ] ; | ||
| } | ||
|
|
||
| # we need to construct the path to the globbed directory; | ||
| # this path would be <current-project>/antora | ||
| local root = [ path.root html [ $(project).location ] ] ; | ||
| local files ; | ||
| make cleanup_node_modules_ : html_ : @cleanup-node-modules ; | ||
|
|
||
| # actual globbing happens here | ||
| for local file in [ path.glob-tree $(root) : * ] | ||
| { | ||
| # we have to skip directories, because our match expression accepts anything | ||
| if [ CHECK_IF_FILE $(file) ] | ||
| { | ||
| # we construct a list of targets to copy | ||
| files += [ virtual-target.from-file $(file:D=) : $(file:D) : $(project) ] ; | ||
| } | ||
| } | ||
|
|
||
| # we prepend empty usage requirements to the result | ||
| return [ property-set.empty ] $(files) ; | ||
| actions cleanup-node-modules | ||
| { | ||
| bash -c "rm -rf node_modules" | ||
| } | ||
|
|
||
| ############################################################################### | ||
| alias boostdoc ; | ||
| explicit boostdoc ; | ||
| alias boostrelease : install ; | ||
| explicit boostrelease ; | ||
| alias boostrelease : html_ ; | ||
| explicit boostrelease ; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bash -cshouldn't be necessary here. It is needed inrun-scriptbecause otherwise building from the doc directory would invokebuild_antora.sh(and not the relative path to that script), which will fail.rmis a shell command, so it doesn't need another shell wrapper. On the other hand,node_modulesis incorrect, as it only works if b2 is invoked from the doc directory. Replace with this: