aboutsummaryrefslogtreecommitdiff
path: root/extra/nawk/build
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2021-09-07 23:30:52 +0300
committerCem Keylan <cem@ckyln.com>2021-09-07 23:30:52 +0300
commit11dd6aab7cb9da79fd590b74092c6cb50a4104a2 (patch)
tree9e274200b6f3bd9347d0da9c886f8af7f8edc9b8 /extra/nawk/build
parent40005d61761bed3f3479373ec1ceaf8aa32d578b (diff)
downloadrepository-11dd6aab7cb9da79fd590b74092c6cb50a4104a2.tar.gz
nawk: use ninja build system
Diffstat (limited to 'extra/nawk/build')
-rwxr-xr-xextra/nawk/build17
1 files changed, 9 insertions, 8 deletions
diff --git a/extra/nawk/build b/extra/nawk/build
index a5c7444d..f66d9693 100755
--- a/extra/nawk/build
+++ b/extra/nawk/build
@@ -1,11 +1,12 @@
#!/bin/sh -e
-yacc -o awkgram.tab.c -H awkgram.tab.h awkgram.y
+printf 'cflags = %s\nldflags = %s\ncc = %s\nyacc = %s\ndestdir = %s\n' \
+ "$CFLAGS -Wall -pedantic -Wcast-qual -O2" \
+ "$LDFLAGS -static" \
+ "${CC:-cc}" \
+ "${YACC:-yacc}" \
+ "$1" |
+cat - ninja.in > build.ninja
-make CFLAGS="$CFLAGS -static"
-clinst -Dm755 "a.out" "$1/usr/bin/nawk"
-ln -s /usr/bin/nawk "$1/usr/bin/awk"
-
-mv awk.1 nawk.1
-clman -d "$1" nawk.1
-ln -s nawk.1 "$1/usr/share/man/man1/awk.1"
+ninja
+ninja install