commit 5fc87aedad86a8410a360ba718096e613ddf11f6
Author: Laslo Hunhold <[email protected]>
AuthorDate: Wed Jul 20 15:33:56 2022 +0200
Commit: Laslo Hunhold <[email protected]>
CommitDate: Wed Jul 20 15:33:56 2022 +0200
Use ar(1)'s s-flag instead of invoking ranlib(1)
Tom Schwindl kindly pointed out that ranlib(1) is legacy and not even
part of POSIX anymore, given ar(1) can do the same job with the s-flag
(which is an XSI-extension, but whatever).
I'm certain there is no case where a system does not have a convenient
ranlib(1)-wrapper-script, but it's always good to follow best practices.
Signed-off-by: Laslo Hunhold <[email protected]>
diff --git a/Makefile b/Makefile
index d53cf96..1eb9507 100644
--- a/Makefile
+++ b/Makefile
@@ -187,8 +187,7 @@ $(TEST):
$(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $<
libgrapheme.a: $(SRC:=.o)
- $(AR) -rc $@ $?
- $(RANLIB) $@
+ $(AR) -rcs $@ $?
libgrapheme.so: $(SRC:=.o)
$(CC) -o $@ -shared $(SRC:=.o)
diff --git a/config.mk b/config.mk
index 3408f44..5425da4 100644
--- a/config.mk
+++ b/config.mk
@@ -17,4 +17,3 @@ LDFLAGS = -s
# tools
CC = cc
AR = ar
-RANLIB = ranlib