Common Variables for Yocto Recipes

When writing Yocto recipes there are some common variables that can be used, espcially in the do_install() section

An example of this would be:

do_install() {
  install -d ${D}${bindir}
  install -m 0644 ${S}/my_program ${D}${bindir}
}

These variables are defined in the file:
poky/meta/conf/bitbake.conf
with some of the more useful ones listed below

VariableValue
bindir/usr/bin
sbindir/usr/sbin
libdir/usr/lib
sysconfdir/etc
servicedir/srv
sharedstatedir/com
localstatedir/var
datadir/usr/share
infodir/usr/info
mandir/usr/man
docdir/usr/doc
systemd_unitdir/usr/lib/systemd
systemd_system_unitdir/usr/lib/systemd/system
systemd_user_unitdir/usr/lib/systemd/user
includedir/usr/include