Question regarding configure build type and extra-source-files

here it is stated that “the package’s extra-source-files are available to the configure script when it is executed”.

I interpret this as that the configure script can read from these files. Is this correct? If so, how would the configure script access them?
Quick testing revealed that they are not located in the script working directory or its sub-directories (not that it have any). None of the paths passed as parameters to the script is related to the extra source files (in fact I don’t think those directories would be created unless the cabal project is installed).

Is the manual misleading?

Isn’t the cwd of the configure script the package directory itself?

No, i tested that. The working directory is the same directory as the .buildinfo file, which is not the package directory. The script’s working directory is actually empty when it is first called.

You’re right, indeed this is misleading in the manual. I think it is true when Setup.hs configure is called directly. But when we run a cabal build in v2, we change the build directory, so it instead looks like dist-newstyle/build/x86_64-osx/ghc-9.4.5/custom-test- In such a case the extra-source-files are still available, but you have to go up a large number of directories, and should not, in general, depend on how many one has to go up. I think this does not tend to come up for end-users, since configure type builds are typically only used with autoconf scripts, which do not make use of this.

A PR to cleanup the manual would be welcome.