{"id":18844,"library":"tcbuilder","title":"tcbuilder - Bash-based Build System","description":"tcbuilder (also known as 'bb') is a Bash-based build system that generates automated Makefiles from user-defined bash variables. The current version is 1.0.4, released with an irregular cadence. It is designed for projects that already use Bash and Make, offering a lightweight alternative to full-featured build systems. Key differentiators include its simple variable-based configuration, no external dependencies beyond Bash and Make, and the ability to handle multi-group builds with per-source flags. It requires Node.js >= 20 for the npm package but the core build generator is purely bash scripts.","status":"active","version":"1.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/umutfahriozkan/tcbuild","tags":["javascript","typescript"],"install":[{"cmd":"npm install tcbuilder","lang":"bash","label":"npm"},{"cmd":"yarn add tcbuilder","lang":"bash","label":"yarn"},{"cmd":"pnpm add tcbuilder","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Generated Makefiles require GNU Make to execute.","package":"make","optional":false},{"reason":"The package itself is a bash script that generates Makefiles.","package":"bash","optional":false}],"imports":[{"note":"The package is a CLI tool, not a library. Use npx or install globally.","wrong":"const tcbuilder = require('tcbuilder')","symbol":"tcbuilder","correct":"npx tcbuilder [options]"},{"note":"The main usage is via a shebang line in a build variables file.","wrong":"npm install tcbuilder && require('tcbuilder')","symbol":"shebang usage","correct":"#! ./bb/bb"},{"note":"Install via git submodule for concurrent versioning alongside project.","wrong":"npm install tcbuilder","symbol":"Git submodule","correct":"git submodule add --depth 1 https://github.com/umtozkn/bb.git"}],"quickstart":{"code":"# Install tcbuilder globally or use npx\nnpm install -g tcbuilder\n\n# Create a build variables file (e.g., build.vars.sh)\n#! /usr/bin/bb\n# Enable silent output\nall_silent=\"true\"\n# Define groups\ngroups=\"app\"\napp_description=\"Build the application\"\napp_build_dir=\"build\"\napp_sources=\"src/main.c src/utils.c\"\n# Final executable\napp_final_executable=\"myapp\"\n\n# Make the file executable and run it to generate Makefile\nchmod +x build.vars.sh\n./build.vars.sh > Makefile\n\n# Build the project using make\nmake\n","lang":"bash","description":"Demonstrates creating a build variables file with shebang, defining groups and sources, generating a Makefile, and running make."},"warnings":[{"fix":"Use unique group names like 'app', 'lib', etc.","message":"The 'groups' variable cannot contain 'all' or 'default' as values.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Set ..._build_dir to a non-empty path.","message":"The build directory must never be empty; always specify a build path.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Adjust the first line according to your installation method.","message":"Shebang line must point to the correct bb binary location (./bb/bb for submodule, /usr/bin/bb for system install).","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Use group-specific '..._final_executable' to avoid ambiguity.","message":"The 'default_final_executable' may be overridden by group-specific variables; behavior might change in future versions.","severity":"deprecated","affected_versions":"1.0.4"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run the build variables file (e.g., ./build.vars.sh > Makefile) before executing make.","cause":"Forgot to generate the Makefile from the build variables file.","error":"make: *** No targets specified and no makefile found.  Stop."},{"fix":"Install bb as a git submodule into the ./bb/ directory or adjust the shebang to /usr/bin/bb if globally installed.","cause":"Shebang points to a non-existent bb binary (submodule not installed or wrong path).","error":"line 1: ./bb/bb: No such file or directory"},{"fix":"Ensure group names are unique and do not use 'all' or 'default'.","cause":"Multiple groups with the same target name or conflicting rules in the generated Makefile.","error":"make: warning: overriding commands for target `all'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}