I wonder why there isn’t any “debug” flag in the makefile.
I’d like to build using -O0 instead of -O3 when I need to debug my plugin.
Usually, a make install DEBUG=true is enough.
How do you debug in Rack instead? I don’t want to change manually the compile.mk into the Rack folder. Once I pull new changes, it will replace edits and such.
I think @Vortico has mentioned he doesn’t do a ton of gbd debugging in Rack (and neither do I). It seems like a fine idea for you to modify the relevant parts of the makefile as you suggest. If do the same for my plugins - I turn off the asserts in a normal build, and only turn them on with a command line option for local debugging.
Yes, but it could be nice if the whole can be add to the main repo (for me and for anyone will use it), else every time I pull the branch, the .mk will be overwritten…
I do have my own plugins repo on multiple machines. I don’t edit Rack often, so the changes are mostly ‘set it and forget it’; also, different machines need different patch sets – e.g., Mac uses lldb, Windows gdb.
When I share my work, I make sure that it is compatible with unmodified Rack; besides, another developer may have their own set of mods that match their workflow. If I want to share my mods, I can send a patch file that can applied in part or in whole.
As for the edit you suggest: it requires some attention on my part to make sure Rack + each plugin folder is cleaned and completely rebuilt when switching from debug to release and back. I would prefer a solution that uses a separate build directory for debug, but it hasn’t bothered me enough to write that patch.
Why would you need Rack rebuilded in debug/release mode? That build is unique. Just the plugin must be rebuilded. And a smart “clean” before to switch build mode is enough, I think.