Build tool
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Martin Dørum df2beb2650 Merge branch 'feature/new-parser' vor 3 Jahren
cmd fix command-line kvargs vor 3 Jahren
lib printing changes vor 3 Jahren
test new parser tests vor 3 Jahren
.gitignore refactor a bit vor 3 Jahren
Makefile change how child processes work vor 3 Jahren
README.md readme vor 3 Jahren
build.bx change how child processes work vor 3 Jahren

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