Skip to content

Commit 5f6cc74

Browse files
committed
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.
1 parent 3039b7c commit 5f6cc74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ main_scoped_LDFLAGS = $(LDFLAGS_local)
8383

8484
big-dynstr.c: main.c
8585
cat $< > big-dynstr.c
86-
for i in $$(seq 1 2000); do echo "void f$$i(void) { };"; done >> big-dynstr.c
86+
i=1; while [ $$i -le 2000 ]; do echo "void f$$i(void) { };"; i=$$(($$i + 1)); done >> big-dynstr.c
8787

8888
nodist_big_dynstr_SOURCES = big-dynstr.c
8989
big_dynstr_LDADD = -lfoo $(AM_LDADD)

0 commit comments

Comments
 (0)