{"id":20424649,"url":"https://github.com/bahmanm/bmakelib","last_synced_at":"2025-04-12T18:44:52.679Z","repository":{"id":185843792,"uuid":"674175708","full_name":"bahmanm/bmakelib","owner":"bahmanm","description":"A minimalist standard library for writing Makefiles.","archived":false,"fork":false,"pushed_at":"2024-11-17T18:03:52.000Z","size":179,"stargazers_count":16,"open_issues_count":16,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T13:03:29.413Z","etag":null,"topics":["bash","gnumake","make","makefile","shell-scripting"],"latest_commit_sha":null,"homepage":"https://matrix.to/#/#.mk:matrix.org","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bahmanm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"bahmanm","ko_fi":"bahmanm","liberapay":"bahmanm"}},"created_at":"2023-08-03T10:07:48.000Z","updated_at":"2024-11-17T18:02:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7f1bb45-f560-4d6c-84dc-43a18f3248dc","html_url":"https://github.com/bahmanm/bmakelib","commit_stats":null,"previous_names":["bahmanm/blibmake","bahmanm/bmakelib"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmanm%2Fbmakelib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmanm%2Fbmakelib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmanm%2Fbmakelib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmanm%2Fbmakelib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bahmanm","download_url":"https://codeload.github.com/bahmanm/bmakelib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248617250,"owners_count":21134190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","gnumake","make","makefile","shell-scripting"],"created_at":"2024-11-15T07:10:31.402Z","updated_at":"2025-04-12T18:44:52.657Z","avatar_url":"https://github.com/bahmanm.png","language":"Shell","readme":"# bmakelib \n[![CircleCI](https://dl.circleci.com/status-badge/img/circleci/UMKeFZ8ns9T9vi5aquTfVT/7xEbdNjRYsdqW8yXCjZD9v/tree/main.svg?style=svg\u0026circle-token=CCIPRJ_H6RDDH8tmi86oJU42UaqJf_e7f27baf05915c0ae68d428ee8a6ddb4f3062e31)](https://dl.circleci.com/status-badge/redirect/circleci/UMKeFZ8ns9T9vi5aquTfVT/7xEbdNjRYsdqW8yXCjZD9v/tree/main)\n![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/bahmanm/bmakelib/total?style=flat\u0026logo=github\u0026logoColor=white\u0026color=0e80c0)\n[![Docker Pulls](https://img.shields.io/docker/pulls/bdockerimg/bmakelib?style=flat\u0026logo=docker\u0026logoColor=white\u0026label=pulls\u0026color=%230e80c0)](https://hub.docker.com/r/bdockerimg/bmakelib)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/m/bahmanm/bmakelib?style=flat\u0026logo=github\u0026label=commits)\n[![Matrix](https://img.shields.io/matrix/.mk%3Amatrix.org?server_fqdn=matrix.org\u0026style=flat\u0026logo=matrix\u0026color=%230e80c0)](https://matrix.to/#/#github-bahmanm-bmakelib:matrix.org)\n\nThe minimalist Make standard library you'd always wished for!\n\n\u003cimg alt=\"bmakelib logo\" src=\"https://imgur.com/lt9nwW3.png\" style=\"height: 200px; width: 200px; vertical-align: top\" /\u003e\n\nbmakelib is essentially a collection of useful targets, recipes and variables you can use to augment\nyour Makefiles.\n\nThe aim is *not* to simplify writing Makefiles but rather help you write *cleaner* and *easier to read\nand maintain* Makefiles.\n\n## An Example\n\nMakefile:\n\n```Makefile\ninclude bmakelib/bmakelib.mk\n\nmy-target : bmakelib.error-if-blank( VAR1 )\nmy-target :\n\t@echo ✅ VAR1 value is $(VAR1)\n```\n\nShell:\n\n```text\n$ make my-target\n*** Provide value for 'VAR1'.  Stop.\n\n$ make VAR1=foo my-target\n✅ VAR1 value is foo\n```\n\n# 1. Features and Options\n\n### ⭐ [`error-if-blank`](doc/error-if-blank.md)\n### ⭐ [`default-if-blank`](doc/default-if-blank.md)\n### ⭐ [`enum`](doc/enum.md)\n### ⭐ [`shell`](doc/shell.md)\n### ⭐ [`dict`](doc/dict.md)\n### ⭐ [`timed`](doc/timed.md)\n### ⭐ [`logged`](doc/logged.md)\n### ⭐ [bmakelib.mk](doc/bmakelib.md)\n\n# 2. How To Install\n\n## 2.1 Prerequisites\n\nAlthough not an installation dependency, bmakelib relies on **Gnu Make 4.4+** which was released\nback in 2022.\n\nTo check the version which is currently installed, simply `make -v` in a terminal.  The output should\nlook like below.\n\n```\n$ make -v\nGNU Make 4.4.1\n...\n```\n\n💡 Installing Gnu Make is quite easy.  In fact as easy as:\n\n```\n$ wget https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz\n$ tar xzf make-4.4.1.tar.gz\n$ cd make-4.4.1\n$ ./configure --prefix=/usr/local\n$ make install\n```\n\n## 2.2 Installing bmakelib\n\n### RPM-based Linux Distro\n\nSimply grab the prepackaged RPM from the [release page](https://github.com/bahmanm/bmakelib/releases/latest)\nand install it using your faourite method.  For example:\n\n```text\n$ wget https://github.com/bahmanm/bmakelib/releases/download/v0.6.0/bmakelib-0.6.0-1.1.noarch.rpm\n$ rpm -i bmakelib-0.6.0-1.1.noarch.rpm\n```\n\n### DEB-based Linux Distro\n\nSimply grab the prepackaged DEB from the [release page](https://github.com/bahmanm/bmakelib/releases/latest)\nand install it using your faourite method.  For example:\n\n```text\n$ wget https://github.com/bahmanm/bmakelib/releases/download/v0.6.0/bmakelib_0.6.0-1_all.deb\n$ dpkg -i bmakelib_0.6.0-1_all.deb\n```\n\n### Homebrew (MacOS and Linux)\n\nAssuming you have Homebrew configured, simply install bmakelib as below:\n```\n$ brew update\n$ brew tap bahmanm/bmakelib\n$ brew install bmakelib\n```\n\n### Installing From Source\n\nGrab the source archive from the [release page](https://github.com/bahmanm/bmakelib/releases/latest):\n\n```\n$ wget https://github.com/bahmanm/bmakelib/releases/download/v0.6.0/bmakelib-0.6.0.tar.gz\n$ tar zxf bmakelib-0.6.0.tar.gz\n$ cd bmakelib-0.6.0\n$ sudo PREFIX=/usr/local make install \n```\n\n# 3. How To Use\n\nbmakelib tries to introduce as little clutter as possible to Makefiles and be easy to use.   \nThat is, all you need to start using bmakelib is adding a single line somewhere in your Makefile:\n\n```Makefile\ninclude bmakelib/bmakelib.mk\n```\n\n## 3.1 Make `include` path\n\n💡 *You can safely skip this section if you have installed bmakelib using the prepackaged artefacts or\nyou have installed it in a standard location (such as `/usr/local` or `/usr`.)*\n\nIn case you installed bmakelib in a non-standard location, you either need to `include` bmakelib using\nfull path or pass the installation directory to make via `--include-dir` option.\n\nFor example, assuming you installed bmakelib to `/my-collection/bmakelib`:\n\n### Option #1\n\nMakefile:\n\n```Makefile\ninclude bmakelib/bmakelib.mk\n\nmy-target :\n    ...\n```\n\nShell:\n\n```\n$ make --include-dir /my-collection/bmakelib my-target\n```\n\n### Option #2\n\nMakefile:\n\n```Makefile\ninclude /my-collection/bmakelib/include/bmakelib.mk\n\nmy-target :\n    ...\n```\n\nShell:\n\n```\n$ make my-target\n```\n","funding_links":["https://github.com/sponsors/bahmanm","https://ko-fi.com/bahmanm","https://liberapay.com/bahmanm"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmanm%2Fbmakelib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbahmanm%2Fbmakelib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmanm%2Fbmakelib/lists"}