Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge.sh fails on macOS #16

Open
Rangi42 opened this issue Jul 3, 2024 · 1 comment
Open

merge.sh fails on macOS #16

Rangi42 opened this issue Jul 3, 2024 · 1 comment

Comments

@Rangi42
Copy link
Contributor

Rangi42 commented Jul 3, 2024

% make
mkdir -p build
./merge.sh header/libplum.h > build/libplum.h
./merge.sh: line 4: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
make: *** [build/libplum.h] Error 2

Can this feasibly use POSIX sh?

@aaaaaa123456789
Copy link
Owner

aaaaaa123456789 commented Jul 4, 2024

I don't know enough about shell scripting to be able to tell offhand — can it be done? merge.sh is a fairly short self-contained script; if you can rewrite it to use POSIX sh, go for it.

The goal of the script is simple: given one or more input files (as command-line arguments), concatenate them into one large output file, copying any files included by #include "foo" (but not #include <foo>) into the output the first time (and only the first time) the filename is encountered. Note that all #include "foo" statements are stripped by the copy process (the first time, the statement is replaced by the file; subsequent ones for the same file are just skipped).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants