summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2024-10-16 07:07:31 -0400
committerJonathan Bradley <jcb@pikum.xyz>2024-10-16 07:07:31 -0400
commit12042ad970c1312bf7901ca9694d1137962676d1 (patch)
treefa4f552769d8dc1564dfeb12fff98518950783a9 /Makefile
parent1ac46b846f57cd97e289325e3ad8fd59f8e48208 (diff)
single-header creation refactor
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 553c6bc..1fe6142 100644
--- a/Makefile
+++ b/Makefile
@@ -68,14 +68,19 @@ build: pkmacros
build: pkmem-types
build: pkmem
build: pkstr
- @sed "1d; s/@@PK_VERSION@@/$(VERSION)/g; s/@@YEAR@@/`date -u +%%Y`/g;" pk.h.in > tmp
- cat tmp \
+ cat pk.h.in \
pkmacros.h \
pkmem-types.h \
pkmem.h \
pkstr.h \
> pk.h
- rm tmp
+ sed -i -r \
+ -e "s/@@PK_VERSION@@/$(VERSION)/g" \
+ -e "s/@@YEAR@@/`date -u +%Y`/g" \
+ -e "/deleteme/d" \
+ -e "/vim:/d" \
+ pk.h
+
test-pkmacros: test/pkmacros.o
$(CC) -g -O0 -std=c2x $(CFLAGS) -o test/$@ $^ $(LDFLAGS)