chunkypixel / atari-dev-studio

Homebrew game creation for the Atari 8-bit consoles (VS Code Extension)
http://atariage.com/forums/topic/290365-atari-dev-studio-for-homebrew-development-release/
GNU General Public License v3.0
76 stars 8 forks source link

Makefile isn't sourced from workspace root, but from current source file's directory #43

Open NickVanderPyle opened 2 years ago

NickVanderPyle commented 2 years ago

When setting DASM default compiler to Make, the extension's action to compile the source code can't find my Makefile if it's in a parent directory. Can the extension reference the root workspace directory or walk the parent directories to workspace root until it finds a Makefile?

It appears that GetWorkspace uses the current source file's directory rather than the workspace root directory which causes FindTerminalMakeFileAsync to not consider VSCode's workspace root when looking for a Makefile.

I have a project where the Makefile is in the root, but the source files are in a subdirectory.

/
  /include
  /out
  /src
    project.asm
  Makefile

This isn't a breaking problem since the Makefile can be run from terminal, but the extension's behavior was unexpected.

chunkypixel commented 2 years ago

Hi Nick, The current Makefile process is a bit of a hack to get it going and will need a bit of work to sort out. I would rather look at implementing a proper project file process but that will again be a bit of work.

I'll take a look soon at how the existing process can be better implemented until I get the energy to do the later.