Build tool
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
Martin Dørum df2beb2650 Merge branch 'feature/new-parser' před 3 roky
cmd fix command-line kvargs před 3 roky
lib printing changes před 3 roky
test new parser tests před 3 roky
.gitignore refactor a bit před 3 roky
Makefile change how child processes work před 3 roky
README.md readme před 3 roky
build.bx change how child processes work před 3 roky

README.md

Boxberry: A build system which scales down

Boxberry is a build system which aims to be usable for tiny projects, all the way down to single source files.

Not all projects need a big Makefile or a huge CMakeLists.txt. However, almost all projects grow to the size where they need some library, or some compiler flag, maybe an optimization option. Boxberry aims to make the path from running cc file.c to running cc -lpthread file.c to cc file.c $(pkg-config --libs --cflags libfoo) -lpthread as easy as possible.

  • Source files are automatically discovered (by default).
  • Dependencies can be specified in the source file: //#bx pkgs := libfoo
  • Linker and compiler flags can be specified in the source file: //#bx ldlibs := -lpthread ldflags := -fsanitize=address cflags := -fsanitize=address
  • A source file is automatically recompiled if it has changed, or if any included header files have changed.
  • If your project grows, you can put global configs in a build.bx file. Each directory can have a build.bx file, and each directory inherits the configuration of its parent.
  • Files can be specified instead of discovered automatically by setting the files variable in a build.bx file.

Building

This project can be built by running either make or box. The only dependency is pthreads.

TODO

  • Add --print-compile-commands
  • Consider changing the config file format name from BBB to BB
  • Support different build configurations (requires conditionals in the parser)
  • Re-work the command-line interface
  • Save build configuration in the output dir
  • Support one “main” build.bx file which specifies things like the target name
  • Support creating shared/static libraries too, not just binaries
  • Implement recursive mkdir in C++ instead of shelling out to mkdir
  • Support subprojects
  • Look into saving the result of $(CC) -MM to make recompiles faster when little has changed