mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
build: added NINJA env to customize ninja binary
Fixes: https://github.com/nodejs/node/issues/44286 PR-URL: https://github.com/nodejs/node/pull/44293 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
parent
e5fb452a44
commit
fd07bab7ae
2 changed files with 12 additions and 2 deletions
5
Makefile
5
Makefile
|
@ -115,6 +115,7 @@ $(NODE_EXE) $(NODE_G_EXE): config.gypi out/Makefile
|
|||
ln -fs out/${build_type}/$(NODE_EXE) $@; fi
|
||||
else
|
||||
ifeq ($(BUILD_WITH), ninja)
|
||||
NINJA ?= ninja
|
||||
ifeq ($(V),1)
|
||||
NINJA_ARGS := $(NINJA_ARGS) -v
|
||||
endif
|
||||
|
@ -124,11 +125,11 @@ else
|
|||
NINJA_ARGS := $(NINJA_ARGS) $(filter -j%,$(MAKEFLAGS))
|
||||
endif
|
||||
$(NODE_EXE): config.gypi out/Release/build.ninja
|
||||
ninja -C out/Release $(NINJA_ARGS)
|
||||
$(NINJA) -C out/Release $(NINJA_ARGS)
|
||||
if [ ! -r $@ ] || [ ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi
|
||||
|
||||
$(NODE_G_EXE): config.gypi out/Debug/build.ninja
|
||||
ninja -C out/Debug $(NINJA_ARGS)
|
||||
$(NINJA) -C out/Debug $(NINJA_ARGS)
|
||||
if [ ! -r $@ ] || [ ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
|
||||
else
|
||||
$(NODE_EXE) $(NODE_G_EXE):
|
||||
|
|
|
@ -40,4 +40,13 @@ To create a debug build rather than a release build:
|
|||
./configure --ninja --debug && make
|
||||
```
|
||||
|
||||
## Customizing `ninja` path
|
||||
|
||||
On some systems (such as RHEL7 and below), the Ninja binary might be installed
|
||||
with a different name. For these systems use the `NINJA` env var:
|
||||
|
||||
```bash
|
||||
./configure --ninja && NINJA="ninja-build" make
|
||||
```
|
||||
|
||||
[Ninja]: https://ninja-build.org/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue