Yann Liu <yangliu@...> writes:
> Hi Marco Bardelli,
> This is what I put in .dir-local.el at the root of the project.
> (setq project-am-localvars-include-path '("include/" "config/")
The "format" to use in .dir-locals.el is quitely strange and not so
documented, but you can't use any function in it, but only a list of
cons, associating mode to variables.
Usually i use:
((c-mode . ((project-am-localvars-include-path . ("/usr/include/gtk-2.0"
You can put `nil' instead `c-mode' to affect any modes, but is not so
usefull. I use absolute path also for project-local dirs, but could be
useless if you have correctly set'ed up the Automake hierarchy.
> Here is the output after running "ede-adebug-project".
> ] Name: "src"
> ] Class: #'project-am-makefile
> ] expanded : nil
> ] :name "src"
> ] :version "1.0"
> ] :directory "/PATH/TO/source/"
> ] dirinode 1442100
> ] :file "/PATH/TO/source/Makefile.am"
> ] rootproject : nil
> ] subproj : nil
> ] :targets #<list o' stuff: 12 entries>
> ] locate-obj #unbound
> ] :tool-cache #unbound
> ] :mailinglist ""
> ] :web-site-url ""
> ] :web-site-directory ""
> ] :web-site-file ""
> ] :ftp-site ""
> ] :ftp-upload-site ""
> ] :configurations #<list o' stuff: 2 entries>
> ] :configuration-default "debug"
> ] :local-variables : nil
> ] configureoutputfiles : nil
Thinking at this output, seems your project are not any subproject
(<subdir>/Makefile.am) and also any Makefile listed in AC_CONFIG_FILES
Which if in yours C files you use:
You don't need any particular settings to find symbols in header.h from
C files that include it.
Differently if you use #include <header.h>, locate in "include/",
probably you have to setup some "-Iinclude/" CFLAGS in Makefile.am to build,
and in this case you have to instruct EDE to search for headers in
"-I<dirs>". In this case you have to setup the local var `project-am-localvars-include-path'
> But the symbol map is still not updated.
I use the `project-am-localvars-include-path' in .dir-locals.el
to include external-project dirs like /usr/include/glib-2.0 or gtk-2.0,
and for local dirs simply i set a correct `include_HEADERS' variable in
Makefile.am. In this way i say to EDE that headers (in include_HEADERS)
are members of my project and which symbols in these files are found.