Skip to content

Commit

Permalink
Merge pull request #9635 from 9999years/document-makefile-variables
Browse files Browse the repository at this point in the history
Document more `Makefile` variables
  • Loading branch information
edolstra committed Dec 20, 2023
2 parents e3cdad4 + 6f49303 commit 16a7776
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions doc/manual/src/contributing/hacking.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,24 @@ You can also build Nix for one of the [supported platforms](#platforms).

## Makefile variables

You may need `profiledir=$out/etc/profile.d` and `sysconfdir=$out/etc` to run
`make install`.

You may want to set `MAKEFLAGS="-e -j $NIX_BUILD_CORES"` to allow environment
variables to override `Makefile` variables.

- `ENABLE_BUILD=yes` to enable building the C++ code.
- `ENABLE_DOC_GEN=yes` to enable building the documentation (manual, man pages, etc.).

The docs can take a while to build, so you may want to disable this for local development.
- `ENABLE_FUNCTIONAL_TESTS=yes` to enable building the functional tests.
- `ENABLE_UNIT_TESTS=yes` to enable building the unit tests.
- `OPTIMIZE=1` to enable optimizations.

The docs can take a while to build, so you may want to disable this for local development.
- `libraries=libutil programs=` to only build a specific library (this will
fail in the linking phase if you don't have the other libraries built, but is
useful for checking types).
- `libraries= programs=nix` to only build a specific program (this will not, in
general, work, because the programs need the libraries).

## Building Nix

Expand Down

0 comments on commit 16a7776

Please sign in to comment.