Next: , Previous: , Up: Top   [Contents][Index]


7 Make targets

The following make targets are available by default. To use them you have to be in ~/.emacs.d in a shell. They are implemented in borg.mk, which is part of the borg package.

Help targets

Command: help

This target prints information about most of the following targets.

This is the default target, unless the user sets .DEFAULT_GOAL.

Command: helpall

This target prints information about all of the following targets.

Batch targets

Command: clean

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 ~/.emacs.d/etc/borg/config.mk:

.DEFAULT_GOAL := all
all: clean build
Command: clean-force

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.

Command: build

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 build-init does.

Command: native

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 build-init does.

Quick batch targets

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.

Command: quick

This target cleans and builds most drones.

It also cleans and builds the init files as described as for build.

Command: quick-clean

This target removes all byte-code and native files of most drones It also remove the byte-code files of the config files.

Command: quick-build

This target builds most drones and the config files

It also builds the init files as described as for build.

Drone targets

Command: clean/DRONE

This target removes all byte-code and native files belonging to the drone named DRONE.

Command: build/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.

Command: native/DRONE

This target byte-compiles and natively-compiles the drone named DRONE.

Init file targets

Command: init-clean

This target removes byte-code files for init files.

Command: init-tangle

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.

Command: init-build

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 ~/.emacs.d repository but would like to keep some settings private, then you can do so by putting them in a file ~/.emacs.d/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.

Bootstrap targets

Command: bootstrap-borg

This target bootstraps borg itself.

Command: bootstrap

This target attempts to bootstrap the drones. To do so it runs git submodule init, borg.sh (which see), and make build.

If an error occurs during the borg.sh phase, then you can just run that command again to process the remaining drones. The drones that have already been bootstrapped or that have previously failed will be skipped. If a drone cannot be cloned from any of the known remotes, then you should temporarily remove it using git submodule deinit lib/DRONE. When done with borg.sh also manually run make build again.


Next: , Previous: , Up: Top   [Contents][Index]