Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/3job/gmake2

Build a GMakefile at lightning speed!
https://github.com/3job/gmake2

buildtool buildtools cli command-line command-line-tool gmake gmake2 gmakefile go golang make makefile tools

Last synced: 3 days ago
JSON representation

Build a GMakefile at lightning speed!

Awesome Lists containing this project

README

        

# GMake2

This project is currently being reconstructed, please use the Release version instead of building it directly from the repo.



This image is from Gopher Konstructor


Build a GMakefile at lightning speed!



GitHub Workflow Status
FOSSA Status
MPL-2.0
Go Version
GitHub release (latest by date)



GitHub Issues
GitHub Repo stars
GitHub release (latest by date)
GitHub repo size
GitHub commit activity

[GMake2 Development Roadmap](https://github.com/3JoB/gmake2/issues/5)

This project is the follow-up maintenance of [go-gmake](https://github.com/fdxxw/gmake).

# Menu

- [GMake2](#gmake2)
- [Menu](#menu)
- [Installing](#installing)
- [Install from software source](#install-from-software-source)
- [Install from Github Releases](#install-from-github-releases)
- [Install from source code](#install-from-source-code)
- [Getting Started](#getting-started)
- [Features](#features)
- [Keywords](#keywords)
- [Reserved Keyword](#reserved-keyword)
- [Variables](#variables)
- [Examples](#examples)
- [Other information](#other-information)
- [License](#license)

# Installing

## Install from software source
This method is limited to systems using apt and dpkg for package management.

Please execute the following commands in the order they were written.
```sh
echo 'deb https://deb.lcag.org stable main' | sudo tee /etc/apt/sources.list.d/malonan.list

wget -qO - https://deb.lcag.org/public.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/malonan.gpg add -

sudo apt update && sudo apt install gmake2
```

Upgrade GMake2
```sh
apt update && apt upgrade
```

## Install from Github Releases
Download the latest version from github.

[Release](https://github.com/3JoB/gmake2/releases)

## Install from source code
You can build gmake2 directly using Go build, but the version subcommand will not work properly.

```sh
git clone https://github.com/3JoB/gmake2 && cd gmake2

# gmake2 installed
gmake2

# gmake2 is not installed
go build -ldflags "-s -w -X 'main.SoftBuildTime=owner' -X 'main.SoftCommit=owner' -X 'main.SoftVersion=owner' -X 'main.SoftVersionCode=owner'"
```

# Getting Started

Write the GMakefile.yml file in the current directory, the content is as follows

```yml
vars:
msg: Hello World

all: |
@echo {{.msg}}

mg: |
@echo What's up???
```

Then run `gmake2` on the current command line console, you can see the console print

```
Hello World
```

Or execute `gmake2 mg` to execute the specified command, and the console will print
```
What's up???
```
gmake2 automatically selects the all command when no command is specified.

# Features

## Keywords

Keywords moved to [Wiki](wiki/Keyword.md)

## Reserved Keyword
View in [Wiki](wiki/Reserved_Keyword.md)

## Variables
Variables moved to [Wiki](wiki/variables.md)

# Examples

GMakefile.yml

```yml
vars:
msg: Hello World
all: |
@echo {{.msg}}
# Modify the msg variable
@var msg Hello
@echo {{.msg}}
# Create a file
@touch from.txt
@mv from.txt to.txt
@cp to.txt from.txt
@rm from.txt
@rm to.txt
@mkdir from
@mv from to
@cp to from
@rm from
@rm to
@env GOOS linux
go build
```

```sh
gmake2
```

# Other information
- Due to unsigned and some high-risk operations, GMake2 may be blocked by some anti-virus software. If you have installed anti-virus software on your device, please manually set GMake2 to the whitelist.
- The binary released by GMake2 is compiled directly from the git library, the specific steps:
- 1_ Write the update
- 2_ Push to github
- 3_ Run the gmake2 command to compile the binary
- GMake2 only has the following binary distribution channels, and cannot guarantee that other channels are safe:
- [DEB Server](https://deb.lcag.org)
- [Chocolatey](https://lcag.org/gmake2.choco)
- [Github Release](https://lcag.org/gmake2.releases).

# License
This software is distributed under MPL-2.0 license. :)

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2F3JoB%2Fgmake2.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2F3JoB%2Fgmake2?ref=badge_large)