Skip to content

Commit 2c1ead9

Browse files
committed
chore: makefile: updated the 'clean' target to support local builds.
The new `util/build.sh` script and embedded test suite in this repo warrant some updates to the `clean` target.
1 parent af5f671 commit 2c1ead9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build
1+
out/

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
SUBSYS?=http
2-
DESTDIR?=build/src
2+
DESTDIR?=out/src
33

44
TEMPLATE_SOURCES=$(wildcard src/subsys/*.tt2)
55
TEMPLATE_TARGETS=$(subst _subsys_,_$(SUBSYS)_, $(patsubst src/subsys/%.tt2, $(DESTDIR)/%, $(TEMPLATE_SOURCES)))
66
API_TEMPLATE_SOURCES=$(wildcard src/subsys/api/*.tt2)
77
API_TEMPLATE_TARGETS=$(subst _subsys_,_$(SUBSYS)_, $(patsubst src/subsys/%.tt2, $(DESTDIR)/%, $(API_TEMPLATE_SOURCES)))
88
MINI_TT2=util/mini-tt2.pl
99

10-
.PHONY: all
10+
.PHONY: all clean
11+
1112
all: $(DESTDIR)/api $(TEMPLATE_TARGETS) $(API_TEMPLATE_TARGETS)
1213
find src/$(SUBSYS) -type f -name '*.tt2' -exec $(MINI_TT2) -d $(DESTDIR) -s $(SUBSYS) '{}' ';'
1314
$(shell cp src/$(SUBSYS)/*.{h,c} $(DESTDIR))
@@ -30,6 +31,5 @@ $(DESTDIR)/%: src/subsys/%.tt2
3031
$(DESTDIR)/api:
3132
mkdir -p $(DESTDIR)/api
3233

33-
.PHONY: clean
3434
clean:
35-
rm -rf build
35+
rm -rf out buildroot work t/servroot*

0 commit comments

Comments
 (0)