The make plugin

The make plugin is useful when building make-based parts. Make-based projects will typically include a Makefile that drives the build.

This plugin runs ‘make’ followed by ‘make install’, except when the artifacts keyword is used with core18 or core.

If your project uses Automake, take a look at the autotools plugin. For examples, search GitHub for projects already using the plugin.

This plugin uses the common plugin keywords as well as those for “sources”. For more information, see Snapcraft parts metadata.

Its features and syntax are dependent on which base is being used, as outlined below:

This is a snapcraft plugin. See Snapcraft plugins and Supported plugins for further details on how plugins are used.

base: core20

  • make-parameters (list of strings)
    Pass the given parameters to the make command.

Use Snapcraft’s override-build functionality to implement the equivalent makefile, artifacts and make-install-var functionality available to core18 and core snaps.

Requires Snapcraft version 4.0+.

base: core18 | core

  • artifacts (list)
    Link/copy the given files from the make output to the snap installation directory. If specified, the make install step will be skipped.

  • makefile (string)
    Use the given file as the makefile.

  • make-parameters (list of strings)
    Pass the given parameters to the make command.

  • make-install-var (string; default: DESTDIR)
    Use this variable to redirect the installation into the snap.

Requires Snapcraft version 3.x.

Last updated a month ago. Help improve this document in the forum.