{"id":16410384,"url":"https://github.com/ctrlcctrlv/bsdmakefile","last_synced_at":"2026-02-10T13:35:30.274Z","repository":{"id":148743114,"uuid":"581918342","full_name":"ctrlcctrlv/BSDmakefile","owner":"ctrlcctrlv","description":"GNUmakefile which makes guaranteeting BSD (and macOS presumably) support easy on GNU/Linux","archived":false,"fork":false,"pushed_at":"2022-12-24T21:43:32.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T04:28:43.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/ctrlcctrlv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2022-12-24T21:30:57.000Z","updated_at":"2022-12-24T21:31:06.000Z","dependencies_parsed_at":"2023-06-08T13:00:47.341Z","dependency_job_id":null,"html_url":"https://github.com/ctrlcctrlv/BSDmakefile","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ctrlcctrlv/BSDmakefile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlcctrlv%2FBSDmakefile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlcctrlv%2FBSDmakefile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlcctrlv%2FBSDmakefile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlcctrlv%2FBSDmakefile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctrlcctrlv","download_url":"https://codeload.github.com/ctrlcctrlv/BSDmakefile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlcctrlv%2FBSDmakefile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29300983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T12:55:56.056Z","status":"ssl_error","status_checked_at":"2026-02-10T12:55:55.692Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-11T06:24:09.917Z","updated_at":"2026-02-10T13:35:30.254Z","avatar_url":"https://github.com/ctrlcctrlv.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BSDmakefile v1.0\n\nMakes testing Makefile is (Free|Open)BSDmake compatible easier on GNU/Linux\n\n## How to use this in your own projects\n\n* Copy `GNUmakefile` and the directory `mk` to your project directory.\n* Copy `Makefile.EXAMPLE` to your project directory as `Makefile`.\n\n## Benefits\n\n`GNUmakefile` is a file that is only understood by GNU Make. So, when `make` is run, if you are on GNU/Linux, (or using `gmake` on another system,) it will attempt to run all common commands through Busybox to make sure your `Makefile` works with stripped down non-GNU coreutils.\n\nHowever, when run on a system with only `bsdmake` (`bmake` on GNU/Linux), the file is totally ignored and `busybox` is not used.\n\n## Writing the `Makefile`\n\nAll of your recipes must be written as:\n\n```make\nmyrecipe:\n\t$(DOBEFORE) \u0026\u0026 (\\\n\t\t# …\n\t)\n\n# …\n\n.include \u003cmk/before.mk\u003e\n```\n\nFurthermore, it is highly recommended to enforce:\n\n```make\nSHELL=/bin/sh\n```\n\nAt the top of the `Makefile`. This ensures compatibility with POSIX shells,\nsuch as those in use by default on *BSD.\n\n## Accessing BSD-compatible coreutils\n\nBy default `sed` and `awk` will use generic versions, with their paths at `$SED` and `$AWK`, either through Busybox or through the system coreutils as appropriate. You can add any program `busybox` supports by editing the `all` recipe in `GNUmakefile`, and adding more `$(MAKE) test_busybox_has` lines. E.g., to add `cat` as `$CAT`, add the line:\n\n```make\nall:\n\t# …\n\t$(eval export $(shell $(MAKE) WHAT=cat test_busybox_has))\n\t# …\n```\n\n## Full project example\n\nI got this idea while working on [yeslogic/glyph-names№3](https://github.com/yeslogic/glyph-names/pull/3) and added `BSDmakefile` to that project in [yeslogic/glyph-names№2](https://github.com/yeslogic/glyph-names/pull/2).\n\n## LICENSE\n\n```plain\n###############################################################################\n#-       BSDmakefile © 2022 Fredrick R. Brennan \u003ccopypaste@kittens.ph\u003e       -#\n###############################################################################\n#- Permission  is  hereby granted, free of charge, to any person obtaining  a #\n#- copy of this software and associated documentation files (the \"Software\"), #\n#- to  deal in the Software without restriction, including without limitation #\n#- the  rights to use, copy, modify, merge, publish, distribute,  sublicense, #\n#- and/or  sell  copies  of the Software, and to permit persons to  whom  the #\n#- Software is furnished to do so, subject to the following conditions:       #\n#-                                                                            #\n#- The above copyright notice and this permission notice shall be included in #\n#- all copies or substantial portions of the Software.                        #\n#-                                                                            #\n#- THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #\n#- IMPLIED,  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  MERCHANTABILITY, #\n#- FITNESS  FOR  A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT  SHALL #\n#- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #\n#- LIABILITY,  WHETHER  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,  ARISING #\n#- FROM,  OUT  OF  OR  IN CONNECTION WITH THE SOFTWARE OR THE  USE  OR  OTHER #\n#- DEALINGS IN THE SOFTWARE.                                                  #\n###############################################################################\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrlcctrlv%2Fbsdmakefile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctrlcctrlv%2Fbsdmakefile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrlcctrlv%2Fbsdmakefile/lists"}