[erlang-questions] Flymake & include_lib
Anders Nygren
anders.nygren@REDACTED
Thu May 29 18:26:12 CEST 2008
On Thu, May 29, 2008 at 10:08 AM, mog <mog-lists@REDACTED> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> You could do what i do in my eflymake script
> main([File_Name]) ->
> compile:file(File_Name, [{i, "../include"}, warn_obsolete_guard,
> warn_unused_import, warn_shadow_vars, warn_export_vars,
> strong_validation, report]).
>
> As that will get the include correctly if you build correctly anywhere
> you do the
> app/
> src/
> include/
>
> format. hope that helps
Or to go one step further
main([File_Name]) ->
Incls = [{i,Dir} || Dir <- filelib:wildcard("../../*/include")],
compile:file(File_Name, Incls++[warn_obsolete_guard,
warn_unused_import,
warn_shadow_vars,
warn_export_vars,
strong_validation,
report]).
in case you have a structure like
lib/
app1/
src/
include/
app2/
src/
include/
And have includes between applications
/Anders
>
> Mog
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFIPsbReq+tARrxhnsRAh9BAJ9Z1XOWppV3Yy6IMSPXX79xTAaj5gCeN/Kh
> 1FCCp6kHFP120fTs4N8Nm8I=
> =Z3fx
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list