{"id":17084617,"url":"https://github.com/fleshgrinder/make-runner","last_synced_at":"2025-07-10T12:14:59.286Z","repository":{"id":145916780,"uuid":"184875922","full_name":"Fleshgrinder/make-runner","owner":"Fleshgrinder","description":"Minimal framework to transform GNU make to a task runner.","archived":false,"fork":false,"pushed_at":"2020-01-09T14:13:55.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T20:12:35.787Z","etag":null,"topics":["bash","gnu-make","make","makefile"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fleshgrinder.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-05-04T09:32:00.000Z","updated_at":"2022-11-03T13:52:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"98bfe8da-7748-4edf-b59e-70dbc643d56b","html_url":"https://github.com/Fleshgrinder/make-runner","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fleshgrinder%2Fmake-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fleshgrinder%2Fmake-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fleshgrinder%2Fmake-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fleshgrinder%2Fmake-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fleshgrinder","download_url":"https://codeload.github.com/Fleshgrinder/make-runner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245111928,"owners_count":20562511,"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","gnu-make","make","makefile"],"created_at":"2024-10-14T13:08:04.745Z","updated_at":"2025-03-23T13:49:27.965Z","avatar_url":"https://github.com/Fleshgrinder.png","language":"Shell","readme":"# make-runner\n\nTransform [GNU Make] into a simple task runner.\n\n* [Motivation](#motivation)\n  * [Portability](#portability)\n* [Installation](#installation)\n  * [Recommended Software](#recommended-software)\n* [Usage](#usage)\n  * [Writing Makefils](#writing-makefiles)\n* [License](#license)\n\n## Motivation\n\n[GNU Make] is a universal tool that is available virtually anywhere. It, \nhowever, also has a lot of peculiarities and its default configuration is \ntargeted towards building C projects. This makes perfect sense since it was \nmeant for this. By adjusting a few knobs it can be transformed into a general \npurpose task runner that is useful in conjunction with almost any kind of \nproject.\n\n\u003e At this point, I would like to point out another great project:\n\u003e [🤖 Just](https://github.com/casey/just)\n\u003e\n\u003e Just is written in Rust and comes along without the GNU make peculiarities.\n\u003e It was specifically developed as _just_ a task runner. The project is still\n\u003e young and not available everywhere but you might be starting a new project in\n\u003e environments you control. Check it out!\n\nGNU make is particularly great for running interactive commands. Something\nwhere even really great build tools like [Gradle](https://gradle.org/) fail to \ndeliver. Its perfect interoperability with shell scripting is also something \nthat simplifies fast automation of simple tasks, and all that without a lot of \noverhead.\n\n### Portability\n\nWriting scripts to automate common tasks is simple and fast, however, sharing\nthem between different users with different operating systems is not. We\nusually can ignore Windows because there are enough projects out there that\noffer them access to the GNU world, even provided by Microsoft itself. However,\nportability between Linux and Mac (or BSD in general) is a different story.\n\nA clear goal of this project is to provide abstractions that ensure portability\nbetween Linux and Mac.\n\n## Installation\n\nThis framework is meant to be installed inside your git repository and that you\ncommit its files to your repository. Execute the following command inside the\nroot of your project’s git repository:\n\n```sh\nbash -c \"$(curl -fsSL https://raw.githubusercontent.com/Fleshgrinder/make-runner/v0.1.0/bin/installer)\"\n```\n\nYou will find a `Makefile` in the root of your repository after the installer\nfinished and you are ready to go.\n\n### Recommended Software\n\nYou should install some programs in order to get the most out of your \n`make-runner` installation. In fact, every user of your repositories should \ninstall those programs because otherwise, it will be hard for you to write \nscripts, well, unless you run absolutely everything through Docker. While in \ngeneral, it’s recommendable to run as much as possible through Docker, not \neverything makes sense.\n\nScripts are included to simplify the bootstrapping of a new system. They are \navailable via the command `make bootstrap-system` which tries to detect the \noperating system and install the right software. Note that this command requires \nyou to use `sudo` on a Linux system.\n\nYou can also install everything manually or even before you run the installer by \nexecuting the bootstrap script that matches your system. Have a look at the \n`bin` directory and the `bootstrap-` scripts. You can execute any of them like \nthe installer. On a Mac you would execute the following command:\n\n```sh\nbash -c \"$(curl -fsSL https://raw.githubusercontent.com/Fleshgrinder/make-runner/v0.1.0/bin/bootstrap-mac)\"\n```\n\nWhat exactly is being installed depends on the system, but in general the\nfollowing software is recommended:\n\n* [curl](https://curl.haxx.se/)\n* [dos2unix](http://dos2unix.sourceforge.net/)\n* [git](https://git-scm.com/)\n* [GNU Awk](https://www.gnu.org/software/gawk/)\n* [GNU Bash](https://www.gnu.org/software/bash/)\n* [GNU Coreutils](https://www.gnu.org/software/coreutils/)\n* [GNU Findutils](https://www.gnu.org/software/findutils/)\n* [GNU Grep](https://www.gnu.org/software/grep/)\n* [GNU Make]\n* [GNU PG](https://www.gnupg.org/)\n* [GNU Readline](https://www.gnu.org/software/readline/)\n* [GNU Sed](https://www.gnu.org/software/sed/)\n* [GNU Tar](https://www.gnu.org/software/tar/)\n* [hub](https://hub.github.com/)\n* [jq](https://stedolan.github.io/jq/)\n\nYou undoubtedly noticed that most of the things from this list are GNU projects. \nThe idea is to ensure portability by standardizing on the default tools that \ncome along with most Linux distros and free software. Also, most of the help you \nwill find online is targeting GNU tools. Standardizing on them means that you \ncan reuse that information for your scripts.\n\n## Usage\n\nBe sure to read about the [recommended software](#recommended-software) before\nyou continue. Also make sure to install the recommended software on all systems\nyou target, otherwise you might run into compatibility and portability issues.\n\n\u003e A typical problem is Bash on Mac. Apple ships a very old version and users are\n\u003e not aware of that. Many Bash features will not be available with this ancient\n\u003e Bash version and fail with weird error messages.\n\nYou will find a few new files in your repository after the \n[installation](#installation), let’s go through them. \n[`resources/make`](resources/make) contains all files that make up the \n`make-runner` project and the most important file in there is \n[`bootstrap.mk`](resources/make/bootstrap.mk). It contains the logic that turns\n[GNU Make] into a simple task runner by applying various defaults. Take your\ntime and go through it. Everything inside it is properly documented and should\nnot leave any questions unanswered (open an issue if you think that anything is\nnot clear and requires a better explanation).\n\nThere is also the [`config.mk`](resources/make/config.mk) with a few defaults.\nThis file can be customized by you and is always loaded in the bootstrap \nprocess. It is the perfect place to collect global settings of your own project.\n\nNext up are the utilities that you find the [`utils`](resources/make/utils)\ndirectory. All scripts in that directory are available to you globally, meaning,\nyou can call them from your own Bash scripts without any special setup as long\nas you go through `make-runner`. Go through the various scripts and read their\ndocumentation.\n\n### Writing Makefiles\n\nWrite your Makefiles like you always do and simply include\n[`resources/make/bootstrap.mk`](resources/make/bootstrap.mk), however, always\ninclude it after all other includes. This ensures that the special `make help`\n(aka. `make goals`, `make targets`) goal can pick up all goals in its output.\n\nSpeaking of which, you can control which goals show up in `make help` by \nincluding a comment after the goal signature that starts with two hash signs,\ne.g.:\n\n```makefile\ninclude resources/make/bootstrap.mk\n\ngoal-that-shows-up-in-make-help: ## this text will be displayed next to it\n\t:\n\nthis-will-not-show-up: # :)\n\t:\n\n```\n\n## License\n\nThis is free and unencumbered software released into the public domain.\n\nFor more information, please refer to [UNLICENSE](./UNLICENSE.md).\n\n[GNU Make]: https://www.gnu.org/software/make/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffleshgrinder%2Fmake-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffleshgrinder%2Fmake-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffleshgrinder%2Fmake-runner/lists"}