Back to Chezmoi

Building and installing with `make`

assets/chezmoi.io/docs/developer-guide/using-make.md

2.70.21.1 KB
Original Source

Building and installing with make

chezmoi can be built with GNU make, assuming you have the Go toolchain installed.

Running make will build a chezmoi binary in the current directory for the host OS and architecture. To embed version information in the binary and control installation the following variables are available:

VariableExamplePurpose
$VERSIONv2.0.0Set version
$COMMIT3895680a...Set the git commit at which the code was built
$DATE2019-11-23T18:29:25ZThe time of the build
$BUILT_BYhomebrewThe packaging system performing the build
$PREFIX/usrInstallation prefix
$DESTDIRinstall-rootFake installation root

Running make install will install the chezmoi binary in ${DESTDIR}${PREFIX}/bin.