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

Consider providing awkgram.tab.c and awkgram.tab.h with the source #204

Closed
absolutelynothinghere opened this issue Oct 26, 2023 · 5 comments

Comments

@absolutelynothinghere
Copy link

Awk depends on bison during compilation to create the files awkgram.tab.c and awkgram.tab.h, however bison depends on awk to compile, causing a circular dependency... I suggest providing the files awkgram.tab.c and awkgram.tab.h with the awk source, perhaps with a .bak suffix, so the user can compile awk without bison if he so chooses.

Thank you.

@plan9
Copy link
Collaborator

plan9 commented Oct 26, 2023

ah, i see, bison makefile requires awk. so is this to accommodate a build environment where both of those things are missing but eg. compilers available?

@absolutelynothinghere
Copy link
Author

a build environment where both of those things are missing but eg. compilers available?

Yes.

@plan9
Copy link
Collaborator

plan9 commented Oct 28, 2023

I would like to see a real-life example. in cross-compile environments, you don't usually end up missing eg. bison.

@arnoldrobbins
Copy link
Collaborator

Not to mention that any other yacc (e.g. Berkely Yacc) will also work for building awk. Or that a different awk, such as mawk or gawk, could be used for bootstrapping bison.

@plan9 plan9 closed this as completed Oct 29, 2023
@absolutelynothinghere
Copy link
Author

I would like to see a real-life example

Try bootstrapping any system without pre-compiled binaries of awk/yacc and see if you can break the circular dependency.

you don't usually end up missing eg. bison.

I thought that the "one true awk" would be portable across operating system and toolchains, and not another GNU tool. If that is not the case, then kindly state "this project depends on GNU Bison" in the readme and remove any mention of other yacc tools.

e.g. Berkely Yacc

Needs awk to compile. And speaking of byacc, it doesn't even compile your project without #201 which you also rejected.

Or that a different awk, such as mawk or gawk, could be used for bootstrapping bison.

So you're suggesting that I compile mawk/gawk, to compile bison, to... compile awk? This makes no sense.

It is impossible to "bootstrap bison" with mawk or gawk, because mawk also depends on yacc, and gawk depends on awk!

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

3 participants