{"id":19614978,"url":"https://github.com/hand-of-doom/gomake","last_synced_at":"2025-04-28T02:31:03.577Z","repository":{"id":62867607,"uuid":"562551799","full_name":"Hand-of-Doom/gomake","owner":"Hand-of-Doom","description":"Run golang code in Makefile and use all the features of bash \u0026 multiline targets support","archived":false,"fork":false,"pushed_at":"2022-12-30T12:46:57.000Z","size":5,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T05:11:29.181Z","etag":null,"topics":["code-generator","compiler","go","linux","makefile-generator","makefile-syntax"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hand-of-Doom.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}},"created_at":"2022-11-06T17:46:43.000Z","updated_at":"2023-01-29T09:20:22.000Z","dependencies_parsed_at":"2023-01-31T11:30:27.705Z","dependency_job_id":null,"html_url":"https://github.com/Hand-of-Doom/gomake","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hand-of-Doom%2Fgomake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hand-of-Doom%2Fgomake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hand-of-Doom%2Fgomake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hand-of-Doom%2Fgomake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hand-of-Doom","download_url":"https://codeload.github.com/Hand-of-Doom/gomake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251237877,"owners_count":21557359,"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":["code-generator","compiler","go","linux","makefile-generator","makefile-syntax"],"created_at":"2024-11-11T10:54:41.093Z","updated_at":"2025-04-28T02:31:03.302Z","avatar_url":"https://github.com/Hand-of-Doom.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GO in your Makefile\n\n## Installation\nLatest version\\\nYou must have go 1.19 installed\n```console\ngo install github.com/Hand-of-Doom/gomake@latest\n```\n\n## How to use\nCreate `Gomakefile` in /path/to/folder\\\nThen `cd /path/to/folder` and run `gomake`\n```console\n[foo@bar sample]$ pwd\n/home/foo/sample\n[foo@bar sample]$ ls\nGomakefile\n[foo@bar sample]$ cat Gomakefile\nsample:\n    echo \"Hello from bash!\"\n    out=go {\n        fmt.Println(\"Hello from go!\")\n    }\n    echo \"$out\"\n[foo@bar sample]$ gomake sample\ngo: creating new go.mod: module gomakegen\ngo: to add module requirements and sums:\n\tgo mod tidy\n./sampletarget\nHello from bash!\nHello from go!\n```\n\n## Using golang libraries\n```makefile\nsample:\n    go {\n        import \"github.com/google/uuid\"\n        fmt.Println(uuid.NewString())\n    }\n```\nThen run `gomake sample`\n\n## Full bash support\nYou can use all the features of bash since targets are bash scripts\\\ne.g. you can use multiline targets\n```makefile\nsample:\n    echo \"Hello, Gomake!\"\n    echo \"Next line\"\n    echo \"Next line\"\n```\n\n## How it works?\nIt's just Makefile preprocessor\\\nGomakefile builds into a Makefile so you keep using make\n\n## Problems\n### Is it slow? \nIt's definitely slower than make cause gomake builds each go statement every time\\\nI can work on optimization but for now this is not my primary goal\n### Is it Makefile compatible?\nNo. Gomakefile targets are bash scripts\\\nIt's not compatible with Makefile\\\nYou will need to rewrite your code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhand-of-doom%2Fgomake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhand-of-doom%2Fgomake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhand-of-doom%2Fgomake/lists"}