Hello, Akim!
> which agrees with this behavior. The question is then: did the author
> think about file_name=dir_part/base_part? (And BTW, why the heck is
> there this `tab' part?)
To avoid overriding calc.c if it's a separate source file.
> /tmp % ls src *tab* -l nostromo Err 1
> -rw-r--r-- 1 akim lrde 27517 oct 2 17:38 y.tab.c
>
> src:
> total 4
> -rw-r--r-- 1 akim lrde 3335 oct 2 16:31 calc.y
I.e., the output goes to the current directory!
> | In any case, the makefiles should specify the output file explicitly
> | instead of relying on weird defaults.
>
> This is not possible simply with Yacc/Bison which (can) generates many
> files (*.output, *.h...).
But automake doesn't need all those files - it only needs the parcer.
> | This is not _that_ ugly as it seems - with Automake you want to put
> | sources where they belong - to the source directory.
>
> The difference source/build you are referring to is based on Automake
> concepts. They have no sense at all for tools such as bison or gcc
> etc. They have input and output. I do not want them to try to grasp
> source/build. I want them to behave uniformly: output *here*.
I realize that.
It's unfortunate that the native mode of Bison behaves in a less uniform
way than the yacc mode. I agree with your point. Bison maintainters may
want to fix it along with the documentation.
Regards,
Pavel Roskin