make autostyle doesn't work when building outside the source tree
It looks like make autostyle
doesn't work correctly if building outside the source tree. (Here I'm building in a subdirectory of the source tree.)
$ make -k autostyle
abs_top_srcdir="/Users/tlyu/src/tor/build-norust/.." python3 ../scripts/maint/update_versions.py
Traceback (most recent call last):
File "../scripts/maint/update_versions.py", line 98, in <module>
with open("configure.ac") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'configure.ac'
make: *** [update-versions] Error 1
python3 scripts/maint/annotate_ifdef_directives.py ../src/lib/*/*.[ch] ../src/core/*/*.[ch] ../src/feature/*/*.[ch] ../src/app/*/*.[ch] ../src/test/*.[ch] ../src/test/*/*.[ch] ../src/tools/*.[ch]
/Users/tlyu/src/brew/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'scripts/maint/annotate_ifdef_directives.py': [Errno 2] No such file or directory
make: *** [autostyle-ifdefs] Error 2
python3 scripts/maint/rectify_include_paths.py
/Users/tlyu/src/brew/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'scripts/maint/rectify_include_paths.py': [Errno 2] No such file or directory
make: *** [rectify-includes] Error 2
make: Target `autostyle' not remade because of errors.