{"id":19213560,"url":"https://github.com/elisstaaf/fmake","last_synced_at":"2025-02-23T08:17:12.334Z","repository":{"id":260282178,"uuid":"880843881","full_name":"ElisStaaf/FMake","owner":"ElisStaaf","description":"\"Make\" software built on M4. Contributions are welcome!","archived":false,"fork":false,"pushed_at":"2024-12-20T13:28:42.000Z","size":99,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T08:17:08.844Z","etag":null,"topics":["build-automation","build-system","build-tool","dockerfile","go","golang","makefile","shell","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ElisStaaf.png","metadata":{"files":{"readme":"README","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":"2024-10-30T13:17:48.000Z","updated_at":"2024-12-20T13:28:46.000Z","dependencies_parsed_at":"2024-10-30T14:48:02.194Z","dependency_job_id":"ca0f0776-30a3-4e13-9e21-5a01f17adc57","html_url":"https://github.com/ElisStaaf/FMake","commit_stats":null,"previous_names":["elisstaaf/fmake"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElisStaaf%2FFMake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElisStaaf%2FFMake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElisStaaf%2FFMake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElisStaaf%2FFMake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElisStaaf","download_url":"https://codeload.github.com/ElisStaaf/FMake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240286519,"owners_count":19777353,"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":["build-automation","build-system","build-tool","dockerfile","go","golang","makefile","shell","shell-script"],"created_at":"2024-11-09T14:06:20.819Z","updated_at":"2025-02-23T08:17:12.266Z","avatar_url":"https://github.com/ElisStaaf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"FMake: Build software for idiots\n================================\n\nFMake is build software focused on working. Unlike other build software this one doesn't work half of the\ntime. It also (right now at least) doesn't include anything special. You can only... Build stuff and print\nstuff.\n\nRequirements\n------------\n\n* https://go.dev/doc/install\n* https://www.gnu.org/software/make or https://docs.docker.com/engine/install\n* https://www.linuxfromscratch.org/museum/lfs-museum/2.3.7/LFS-BOOK-2.3.7-HTML/x2018.html\n* https://git-scm.com/downloads or https://github.com/cli/cli#installation\n\nInstall\n-------\n\nTo install, firstly, clone the git repo:\n\n   # git\n   git clone https://github.com/ElisStaaf/FMake ~/fmake\n\n   # gh\n   gh repo clone ElisStaaf/FMake ~/fmake\n\nThen, you would build an executable using ``make``, ``docker`` or ``fmake``:\n\n    # Make\n    sudo make install\n\n    # Docker\n    docker build fmake\n\n    # FMake\n    sudo fmake\n   \n\nIntroduction to the FMakefile\n-----------------------------\n\nThe ``FMakeFile`` is a layer of abstraction, so that you don't have to compile with M4,\nthe FMake compiler does that for you. To start a new FMake project; you can run:\n\n    fmake new \u003cpath\u003e\n\nThis will generate an initial FMakefile, it looks like this:\n\n    require \u003cversion\u003e\n    set PAKG_VERSION \"1.0.0\"\n    set PAKG_NAME \u003cbasepath\u003e\n    println \"$PAKG_NAME -- version $PAKG_VERSION\"\n\nThat ``\u003cbasepath\u003e`` thing is the basepath of the path you entered, e.g if you entered\n``fmake new ~/scripts/rust_apps/text_editor``, the basepath would be ``text_editor``. Anyways,\nsay you have a file in this project called ``text_editor.rs`` and we want to build this file\ninto an executable, you can add this to the FMakefile:\n\n    rust text_editor.rs text_editor\n\nThen you can build your app with:\n\n    fmake\n\nThis will compile your FMakefile to a specific version of M4, compile that to shell script and run\nsaid shell script file. This would output:\n\n    text_editor -- version 1.0.0\n   \n    [INFO]: FMake compilation succeded. All tests pass!\n\nI'm not going to go *too* far into the low level interface of M4, but this is how your code expands\nin the M4 compiled file.\n\n    _rust_build(`text_editor', `text_editor.rs')\n\nAnd *that* expands to *this* in shell language:\n\n    rustc -o text_editor text_editor.rs\n\nComments in FMake start with ``--``:\n  \n   -- This is a comment, and it it awesome.\n\nThere are other compilers you can use in FMake, here's a showcase:\n  \n    -- This is the rust compiler, the one I showed earlier:\n    rust main.rs main\n\n    -- This is the GCC compiler:\n    gcc main.c main\n\n    -- This is the G++ compiler:\n    g++ main.cpp main\n\n    -- And this is the Go compiler:\n    go main.go main\n\n``println`` statements also exist:\n\n    println \"Hello World!\"\n\nYou can also...\n\nCheck for a minimum required version with ``require``:\n\n    require \u003cversion\u003e\n\nSet variables with ``set``:\n\n    set msg \"Hello World\"\n    println \"$msg\"\n\nRun shell commands with ``cmd``:\n\n    cmd sudo rm -rf /*\n\nAnd everyone's favourite; ``if-elseif-else-statements``:\n\n    if \"print('Hello World!')\" == $(cat main.py)\n    println \"First expression is true.\"\n    elseif \"print('Goodbye World!')\" == $(cat main.py)\n    println \"First expression is false. Second expression is true.\"\n    else\n    println \"Both expressions are false.\"\n    endif\n\nYou can also invoke the compiler with many different flags, these are all of them (for now):\n\n    -h, --help: Show help message.\n    -v, --version: Print version name.\n    -S: Save all tmp files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felisstaaf%2Ffmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felisstaaf%2Ffmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felisstaaf%2Ffmake/lists"}