facebookarchive / pfff

Tools for code analysis, visualizations, or style-preserving source transformation.
http://github.com/facebook/pfff/wiki/Main
Other
2.44k stars 205 forks source link

parse_cpp require environment variable PFFF_HOME #89

Closed vmauge closed 10 years ago

vmauge commented 10 years ago

By default the cpp parse failed trying to open an non existing file

$./pfff -parse_cpp .
Using /home/pad/pfff//data/cpp_stdlib/macros.h macro file
exn Unix_error: No such file or directory stat /home/pad/pfff//data/cpp_stdlib/macros.h

Fatal error: exception Unix.Unix_error(20, "stat", "/home/pad/pfff//data/cpp_stdlib/macros.h")

The issue can be fixed exporting PFFF_HOME to source directory or $(DESTDIR)$(SHAREDIR). For example :

export PFFF_HOME=~/src/pfff

This environment variable should be documented In addition lang_cpp/parsing/flag_parsing_cpp.ml should use as a default value the installation path instead of an hard coded value.

aryx commented 10 years ago

should be more clear now. Thx for reporting.