summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKlemens Nanni <klemens@posteo.de>2021-12-07 20:41:23 +0100
committerKlemens Nanni <klemens@posteo.de>2021-12-07 20:41:26 +0100
commit5f6cc74be8c5520d01802a332308a204e653f3b2 (patch)
tree24c6fdb7ae4fb0aadeee2543e3e0560d698f9330 /tests
parent3039b7c0e90abe29acae97d749c283fb8bd60607 (diff)
downloadpatchelf-5f6cc74be8c5520d01802a332308a204e653f3b2.tar.gz
Avoid GNU seq(1)
MacOS, FreeBSD and Linux using GNU have it, but at least OpenBSD does not (the non-compatible BSD equivalent jot(1) exists, though). Counting up is easy enough to do in POSIX sh(1). Looks like this after GNU make(1)'s escaping and produces the same big-dynstr.c file: ``` cat main.c > big-dynstr.c i=1; while [ $i -le 2000 ]; do echo "void f$i(void) { };"; i=$(($i + 1)); done >> big-dynstr.c ``` This is the last bit required to build and pass all tests on OpenBSD without local patches/dependencies.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2c3d0bf..404f159 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -83,7 +83,7 @@ main_scoped_LDFLAGS = $(LDFLAGS_local)
big-dynstr.c: main.c
cat $< > big-dynstr.c
- for i in $$(seq 1 2000); do echo "void f$$i(void) { };"; done >> big-dynstr.c
+ i=1; while [ $$i -le 2000 ]; do echo "void f$$i(void) { };"; i=$$(($$i + 1)); done >> big-dynstr.c
nodist_big_dynstr_SOURCES = big-dynstr.c
big_dynstr_LDADD = -lfoo $(AM_LDADD)