forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/ninja: use existing ninja to build ninja
Add methods to skip the building and execution of Ninja by python in order to allow Make to execute Ninja after the configure script. This allows the user to build Ninja only once if they already have an older version of Ninja built. It also allows the user to test the jobserver functionality by having Ninja built twice (clean then compile). Signed-off-by: Michael Pratt <[email protected]> Link: openwrt#16693 Signed-off-by: Robert Marko <[email protected]>
- Loading branch information
Showing
3 changed files
with
34 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- a/configure.py | ||
+++ b/configure.py | ||
@@ -201,6 +201,8 @@ parser = OptionParser() | ||
profilers = ['gmon', 'pprof'] | ||
parser.add_option('--bootstrap', action='store_true', | ||
help='bootstrap a ninja binary from nothing') | ||
+parser.add_option('--no-rebuild', action='store_true', | ||
+ help='let user execute ninja after build.ninja generation') | ||
parser.add_option('--verbose', action='store_true', | ||
help='enable verbose build') | ||
parser.add_option('--platform', | ||
@@ -693,7 +695,11 @@ n.build('all', 'phony', all_targets) | ||
n.close() | ||
print('wrote %s.' % BUILD_FILENAME) | ||
|
||
-if options.bootstrap: | ||
+if options.bootstrap and options.no_rebuild: | ||
+ print('bootstrap complete. execute ninja in this directory...') | ||
+ print(os.getcwd()) | ||
+ | ||
+elif options.bootstrap: | ||
print('bootstrap complete. rebuilding...') | ||
|
||
rebuild_args = [] |
This file contains 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