public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
a0130f53790e1add2c18c9cd05e36cb3e0c89fe8 blob 1172 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 
TARGET    := olang
SRC_DIR   := src
BUILD_DIR := build
CFLAGS    := -Werror -Wall -Wextra -Wmissing-declarations -pedantic -std=c11 -ggdb

SRCS      := $(wildcard $(SRC_DIR)/*.c)
HEADERS   := $(wildcard $(SRC_DIR)/*.h)
OBJS      := $(patsubst $(SRC_DIR)/%.c, $(BUILD_DIR)/%.o, $(SRCS))

.PHONY: all
all: $(TARGET)

$(TARGET): $(BUILD_DIR) $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o $(TARGET)

$(BUILD_DIR):
	@mkdir -p $@

.PHONY: linter
linter: $(SRCS) $(HEADERS)
	clang-format --dry-run --Werror $?
	$(MAKE) -C tests/unit/ linter

.PHONY: linter-fix
linter-fix: $(SRCS) $(HEADERS)
	clang-format -i $?
	$(MAKE) -C tests/integration/ linter-fix
	$(MAKE) -C tests/unit/ linter-fix

.PHONY: integration-test
integration-test:
	$(MAKE)
	$(MAKE) -C tests/integration/

.PHONY: unit-test
unit-test:
	$(MAKE)
	$(MAKE) -C tests/unit/

.PHONY: clean
clean:
	$(MAKE) -C tests/integration/ clean
	$(MAKE) -C tests/unit/ clean
	@rm -rf build/ $(TARGET)

.PHONY: check
check:
	$(MAKE)
	$(MAKE) -C tests/integration/
	$(MAKE) -C tests/unit/

.PHONY: docs
docs:
	$(MAKE) -C docs

.PHONY: docs-dist
docs-dist:
	$(MAKE) -C docs dist

$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
	$(CC) $(CFLAGS) -c $< -o $@
debug log:

solving a0130f5 ...
found a0130f5 in http://lists.johnnyrichard.com/olang/20240512143033.229961-2-carlos@maniero.me/
found cdfc8e1 in https://git.johnnyrichard.com/olang.git
preparing index
index prepared:
100644 cdfc8e1c03234fa7dee6336bee27bbf7ed6bb213	Makefile

applying [1/1] http://lists.johnnyrichard.com/olang/20240512143033.229961-2-carlos@maniero.me/
diff --git a/Makefile b/Makefile
index cdfc8e1..a0130f5 100644

Checking patch Makefile...
Applied patch Makefile cleanly.

index at:
100644 a0130f53790e1add2c18c9cd05e36cb3e0c89fe8	Makefile

Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox