Няма описание

rexim 82d3ae57dd Fix access to command line arguments преди 5 години
.github 6c16cc942a Run nobuild2 on CI преди 5 години
examples e457dacb39 ERROR -> ERRO преди 5 години
tools b69640cd3b Fix warnings преди 5 години
.gitignore 61dc17340c Ready. Set. Go! преди 5 години
ChangeLog.md 6fcbdb3e34 FOREACH_VARGS_TYPE -> FOREACH_VARGS_CSTR преди 5 години
LICENSE 61dc17340c Ready. Set. Go! преди 5 години
README.md b47984486a (#5) Introduce PIPE(...) macro draft преди 5 години
nobuild.c b60084eef4 (#16) Introduce tools that could be useful for testing examples преди 5 години
nobuild.h 452b98d88e Add TODO(#20) преди 5 години
nobuild2.c b69640cd3b Fix warnings преди 5 години
nobuild2.h 82d3ae57dd Fix access to command line arguments преди 5 години

README.md

nobuild

Header only library for writing build recipes in C.

Main idea

The idea is that you should not need anything but a C compiler to build a C project. No make, no cmake, no shell, no cmd, no PowerShell etc. Only C compiler. So with the C compiler you bootstrap your build system and then you use the build system to build everything else.

Try it out right here:

$ cc ./nobuild.c -o nobuild
$ ./nobuild

Explore nobuild.c file and the examples folder to learn more.

How to use the library in your own project

Keep in mind that nobuild.h is an stb-style header-only library. That means that just including it does not include the implementations of the functions. You have to define NOBUILD_IMPLEMENTATION macro before the include. See our nobuild.c for an example.

  1. Copy nobuild.h to your project
  2. Create nobuild.c in your project with the build recipe. See our nobuild.c for an example.
  3. Bootstrap the nobuild executable:
    • $ cc nobuild.c -o nobuild on POSIX systems
    • $ cl.exe nobuild.c on Windows with MSVC
  4. Run the build: $ ./nobuild

API Conventions

  • Functions from nobuild.h that start with nobuild__ (double underscore) are private to the library and should not be relied upon. They can be changed in any release without a warning.