Hi Maciej,
On Sat, Oct 19, 2024 at 04:54:06PM +0100, Maciej W. Rozycki wrote:
> On Wed, 12 Jun 2024, Maciej W. Rozycki wrote:
>
> > > Hence we decided to check for it in CI instead.
> > >
> > > Hope the trade-off sounds reasonable
> >
> > I have reviewed the thread referred and I note that a concern such as
> > mine has already been raised in response to which you have added the
> > `regenerate-opt-urls' make target (thanks!).
>
> So I have now tried to run this make target on a modification I made to
> options and all I got it is this:
>
> make: Entering directory '.../obj/gcc/gcc'
> .../src/gcc/gcc/regenerate-opt-urls.py .../obj/gcc/gcc/HTML/gcc-15.0.0
> .../src/gcc
> Traceback (most recent call last):
> File ".../src/gcc/gcc/regenerate-opt-urls.py", line 397, in <module>
> main(args)
> File ".../src/gcc/gcc/regenerate-opt-urls.py", line 378, in main
> optfile = OptFile(opt_path, rel_path)
> File ".../src/gcc/gcc/regenerate-opt-urls.py", line 203, in __init__
> assert rel_path.startswith('gcc')
> AssertionError
> make: *** [Makefile:3697: regenerate-opt-urls] Error 1
> make: Leaving directory '.../obj/gcc/gcc'
>
> The invocation was:
>
> $ make -C .../obj/gcc/gcc regenerate-opt-urls
>
> (I've edited the shared absolute path prefix for the source/build tree for
> brevity).
>
> I double-checked the GCC internals manual and all it says is:
>
> There files are generated from the '.opt' files and the generated
> HTML documentation by 'regenerate-opt-urls.py', and should be
> regenerated when adding new options, via manually invoking 'make
> regenerate-opt-urls'.
>
> So what is wrong here, how am I supposed to use it?
That is how you are supposed to use it.
Or instead of make -C do cd .../obj/gcc; make regenerate-opt-urls.
That assert triggering is odd. Could you add or change that into a
print(rel_path) so we can see what it really is?
Thanks,
Mark