OTP Build System

Thomas Depierre

@Di4naO

What ?

  • Current system
  • Problems
  • Requirements
  • Contenders

Current System

  • Autoconf + Make
  • Features detection
  • Multi OS
  • --without
  • tests build
  • ...
===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 Autoconf               40        20795        14885         3225         2685
 Makefile               393        29942        14276         9810         5856
===============================================================================

Problems

  • Slow
  • No dependency handling
    • --without-wx
      • if wx not present everything work... but doc is built
      • if wx is present, all hell break loose
  • --without-XX —disable-XX=yes/no —enable-XX=yes/no

  • OpenSSL...
  • Feature detection DIY
  • Append-only/write-only
  • Tests are hard to run
  • Autoconf has no maintainer
  • ...

Requirements

  • Windows, Linux, MacOS, BSD(Free, Open), Solaris/Illumos
    • VxWork ?
    • Other BSD ?
  • Handle subprojects and dependencies
  • Maintained
  • Feature detection
  • Support bootstrap and tests
  • Can be kept in parallel of make for transition
  • Faster ?
  • Cross-compilation
  • ?????

Contenders

  • Autoconf/Make clean up
  • CMake
  • Premake/Xmake
  • Meson
  • Bazel/Buck/...
  • ...

Pro

  • Already got the code
  • Incremental improvements
  • No need to rewrite

Cons

  • See previous
  • Mostly hard to do
  • Poorest windows support
  • How long...

Autoconf/Make Cleanup

Pro

  • Maintained
  • Good enough user base
  • Ninja backend
  • Fast
  • Language seems approachable
  • Can run side to side (output to a build directory)
  • OS Support

Cons

  • Need to redo everything
  • Python dependency for build

Meson

Meson ?

  • Missing requirements ?
  • Reason to say no ?
  • Problems i forgot to talk about ?
  • Long term for erlang apps:
    • Meson module ?
    • Rebar3...

Pro

  • Maintained
  • Widely used
  • Multiple backends
  • Can probably run side to side
  • OS Support

Cons

  • Urgh language
  • Make
  • Medium Speed

CMake

Pro

  • Maintained
  • Widely used
  • Multiple backends
  • Can probably run side to side
  • OS Support

Cons

  • Urgh language
    • Lua really ?
  • Make
  • Medium Speed

Premake/XMake

Pro

  • Maintained
  • Good enough user base
  • Fast
  • Can run side to side (output to a build directory)
  • OS Support

Cons

  • Need to redo everything
  • Java dependency

Bazel/Buck/...