onetrueawk/awk

Consider providing `awkgram.tab.c` and `awkgram.tab.h` with the source

absolutelynothinghere opened this issue · 5 comments

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 commented

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?

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

Yes.

plan9 commented

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

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.

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!