AtomBuild / atom-build-make

GNU Make plugin for atom-build
MIT License
13 stars 19 forks source link

Autotools with SUBDIRS #21

Open novns opened 8 years ago

novns commented 8 years ago

I got the "Matched file does not exist" error when failed source file is located in subdirectory specified in automake's SUBDIRS variable.

Example of output from make:

make  all-recursive
make[1]: Entering directory '/home/novns/tmp/testmake'
Making all in src
make[2]: Entering directory '/home/novns/tmp/testmake/src'
  CC       testmake.o
testmake.c: In function 'main':
testmake.c:3:5: error: unknown type name 'error'
     error is here!
     ^
novns commented 8 years ago

Exact error: Matched file does not exist: /home/novns/tmp/testmake/testmake.c

noseglid commented 8 years ago

Hmm not sure how to handle this. I don't think a regex can cope with this issue.

Possible (if merged) noseglid/atom-build#398 can help give the base for solving this. The matching function could do more intelligent parsing (e.g finding the Entering directory... and interpreting subsequent files from that directory).

oli-obk commented 8 years ago

It's definitely possible, here's an example using this exact output:

https://github.com/oli-obk/atom-build/blob/f935a0e95a3d9d50b0fa5a8c935574a1b42ce5a5/README.md#programmatic-build-commands-javascript

novns commented 7 years ago

As a temporary solution one can apply the bad and ugly fix to build/lib/error-matcher.js:

let file = 'src/' + match.file;

rpuntaie commented 6 years ago

Could one try the matched relative path with the root of every loaded project (=directory)? So one could add some sub-directories to the project view and then find the matched file.