Rechercher

PythonReactSEOPDF
OpenClaw

makefile-build

Write Makefiles for any project type. Use when setting up build automation, defining multi-target builds, managing dependencies between tasks, creating project task runners, or using Make for non-C projects (Go, Python, Docker, Node.js). Also covers Just and Task as modern alternatives.

gitgoodordietrying0 installations selon la source☆ 0 Étoiles du dépôt

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

SkillHub CLI

skillhub install gitgoodordietrying/makefile-build

Examinez la source et la compatibilité, puis suivez les étapes d’installation.

Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.

Voir la source ↗Guides

Instructions

Makefile & Build

Write Makefiles for project automation across any language. Covers targets, dependencies, variables, pattern rules, phony targets, and using Make for Go, Python, Docker, and Node.js projects. Includes Just and Task as modern alternatives.

When to Use

  • Automating build, test, lint, deploy commands
  • Defining dependencies between tasks (build before test)
  • Creating a project-level task runner (consistent across team)
  • Replacing long CLI commands with short memorable targets
  • Managing multi-step build processes
  • Any project that needs a make build && make test && make deploy workflow

Makefile Basics

Structure
# target: prerequisites
#     recipe (MUST be indented with TAB, not spaces)

build: src/main.go
	go build -o bin/app src/main.go

test: build
	go test ./...

clean:
	rm -rf bin/

# First target is the default (runs with bare `make`)
Variables
# Simple assignment
CC = gcc
CFLAGS = -Wall -O2

# Deferred assignment (expanded when used)
FILES = $(wildcard src/*.go)

# Immediate assignment (expanded when defined)
VERSION := $(shell git describe --tags --always)

# Conditional assignment (only if not already set)
PORT ?= 8080

# Use variables
build:
	$(CC) $(CFLAGS) -o app main.c
	@echo "Version: $(VERSION)"
Automatic variables
# $@ = target name
# $< = first prerequisite
# $^ = all prerequisites
# $* = stem (pattern match)
# $(@D) = directory of target
# $(@F) = filename of target

bin/app: src/main.go src/util.go
	go build -o $@ $^
# $@ = bin/app
# $^ = src/main.go src/util.go
# $< = src/main.go

# Pattern rule
%.o: %.c
	$(CC) -c -o $@ $<
# For foo.o: $@ = foo.o, $< = foo.c, $* = foo
Phony targets (not files)
# Without .PHONY, if a file named "clean" exists, `make clean` does nothing
.PHONY: build test clean lint fmt help

build:
	go build -o bin/app ./cmd/app

test:
	go test ./...

clean:
	rm -rf bin/ dist/

# List all targets
help:
	@grep -E '^[a-...

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/gitgoodordietrying/makefile-build
Version
—
Commit
60a71a6433e92eb6f20455df16503d9f04e868f6
Source de classification
rules
Statut
active
Visibilité
public

Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.

Contenu extrait

SKILL.md
# Makefile & Build

Write Makefiles for project automation across any language. Covers targets, dependencies, variables, pattern rules, phony targets, and using Make for Go, Python, Docker, and Node.js projects. Includes Just and Task as modern alternatives.

## When to Use

- Automating build, test, lint, deploy commands
- Defining dependencies between tasks (build before test)
- Creating a project-level task runner (consistent across team)
- Replacing long CLI commands with short memorable targets
- Managing multi-step build processes
- Any project that needs a `make build && make test && make deploy` workflow

## Makefile Basics

### Structure

```makefile
# target: prerequisites
#     recipe (MUST be indented with TAB, not spaces)

build: src/main.go
	go build -o bin/app src/main.go

test: build
	go test ./...

clean:
	rm -rf bin/

# First target is the default (runs with bare `make`)
```

### Variables

```makefile
# Simple assignment
CC = gcc
CFLAGS = -Wall -O2

# Deferred assignment (expanded when used)
FILES = $(wildcard src/*.go)

# Immediate assignment (expanded when defined)
VERSION := $(shell git describe --tags --always)

# Conditional assignment (only if not already set)
PORT ?= 8080

# Use variables
build:
	$(CC) $(CFLAGS) -o app main.c
	@echo "Version: $(VERSION)"
```

### Automatic variables

```makefile
# $@ = target name
# $< = first prerequisite
# $^ = all prerequisites
# $* = stem (pattern match)
# $(@D) = directory of target
# $(@F) = filename of target

bin/app: src/main.go src/util.go
	go build -o $@ $^
# $@ = bin/app
# $^ = src/main.go src/util.go
# $< = src/main.go

# Pattern rule
%.o: %.c
	$(CC) -c -o $@ $<
# For foo.o: $@ = foo.o, $< = foo.c, $* = foo
```

### Phony targets (not files)

```makefile
# Without .PHONY, if a file named "clean" exists, `make clean` does nothing
.PHONY: build test clean lint fmt help

build:
	go build -o bin/app ./cmd/app

test:
	go test ./...

clean:
	rm -rf bin/ dist/

# List all targets
help:
	@grep -E '^[a-...

Skills associés

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

parakeet-stt

carlulsoe

Local speech-to-text with NVIDIA Parakeet TDT 0.6B v3 (ONNX on CPU). 30x faster than Whisper, 25 languages, auto-detection, OpenAI-compatible API. Use when transcribing audio files, converting speech to text, o...

OpenClaw

feishu-process-feedback

carlzhao007

飞书消息自动处理与进度反馈技能。安装后后台运行,监听飞书任务消息并自动创建独立进程处理。 在处理前后发送实时进度反馈(任务确认、进度百分比、完成通知)。 支持任务类型识别、智能解析、错误重试、并发控制、状态持久化...