The following make
targets are available by default. To use them you
have to be in ~/.config/emacs
in a shell. They are implemented in
borg.mk
, which is part of the borg
package.
To show the commands that are run, use V=1 make ...
. Otherwise only
their output is shown.
This target prints information about most of the following targets.
This is the default target, unless the user sets .DEFAULT_GOAL
.
This target prints information about all of the following targets.
This target removes all byte-code and native files of all drones and config files.
To ensure a clean build, this target should always be run before
build
, so you might want to add a default target that does just
that. To do so, add this to ~/.config/emacs/etc/borg/config.mk
:
.DEFAULT_GOAL := all all: clean build
This target removes all byte-code files using find
. The clean
target on the other hand uses the lisp function borg--batch-clean
.
Byte-code isn’t always compatible between Emacs releases and this
target makes it possible to recover from such an incompatibility.
This target byte-compiles Borg and Compat first, followed by all
other drones in alphabetic order. After that it also byte-compiles
the user init files, like init-build
does.
This target byte-compiles and natively compiles Borg and Compat
first, followed by all other drones in alphabetic order. After that
it also byte-compiles the user init files, like init-build
does.
These targets act on most drones but exclude those for which the Git
variable submodule.DRONE.build-step
is set. The assumption is that
those are the drones that take longer to build.
This target cleans and builds most drones.
It also cleans and builds the init files as described for build
.
This target removes all byte-code and native files of most drones It also remove the byte-code files of the config files.
This target builds most drones and the config files
It also builds the init files as described for build
.
This target removes all byte-code and native files belonging to the drone named DRONE.
This target byte-compiles the drone named DRONE.
lib/DRONE
is an alias for this target; or rather DIR/DRONE
, where
DIR
is directory containing the drone submodules.
This target byte-compiles and natively-compiles the drone named DRONE.
This target removes byte-code files for init files.
This target tangles (creates) init.el
from init.org
. You obviously
don’t have to use such a file, if you don’t want to.
This target byte-compiles the init files specified by the make
variable INIT_FILES
; or if that is unspecified init.el
and LOGIN.el
(where LOGIN
is the value of the variable user-real-login-name
).
If an init file does not exist, then that is silently ignored.
If you publish your ~/.config/emacs
repository but would like to
keep some settings private, then you can do so by putting them in a
file ~/.config/emacs/LOGIN.el
. The downside of this approach is
that you will have to somehow synchronize that file between your
machines without checking it into Git.
This target bootstraps borg
itself.
This target attempts to bootstrap all drones. To do so it runs git
submodule init
, make clone-modules
, make checkout-modules
and make
build
.
If an error occurs during one of these steps, then you can just run the target that failed (and the subsequent targets) again to process the remaining drones. Doing so does not discard any local changes, such as uncommitted changes, new commits, or the effect of manually checking out some other commit.
If a drone cannot be cloned from any of the known remotes, then you
can temporarily ignore it using git submodule deinit lib/DRONE
.
If you have run make clone-modules
and/or make checkout-modules
manually, then make sure to finish by running make build
again too.
This target attempts to clone all modules that were initialized by
git submodule init
and which the user did not explicitly deactivate
afterwards, either by de-initializing it again (git submodule deinit
lib/DRONE
) or by setting submodule.DRONE.active
to false
.
This may fail, for example, if the URL of the remote repository has changed. If that happens, you can update the URL, and then run this command again. Already cloned modules are skipped on reruns.
Alternatively drones can be cloned individual using lib/borg/borg.sh
clone DRONE
.
This target attempts to checkout commits recorded for all modules,
which were successfully cloned by make clone-modules
, while also
trying to check out the recorded commit.
It is safe to rerun this target. Doing so does not discard any local changes, such as uncommitted changes, new commits, or the effect of manually checking out some other commit.
Alternatively drones can be checked out individual using
lib/borg/borg.sh checkout DRONE
.