This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

using "run user program before"

I would like to use "run user program before" or some such to set a #define from one place in several builds
i.e. build #1 will pick the #define from 'x' build #2 will also pick the #define from 'x'
an example: ONE place to define whether want "debug' or "production" mode which will affect both the build of boot and app.

I do not know if I make myself crystal clear, but if not, do ask.

currently this is accomplished with sepaarte defines and too many mistakes happen.

BTW it would be absolutotally wondeful if the above also could affect a .bat file run in "run user program after"

Erik

Parents
  • so, I would like to in one global place in some form or fashion make it so that all 47 projects build in either debug mode or production mode

    So make that one global place a single header file, global to all projects. Or make it an argument to the makefile that controls a #define passed on directly to all batch / make files. Traditional Makefile setups would support this with a relatively simple invokation like

    make all EXTRA_CPPFLAGS="-DRELEASE"

    Or you could have a "setup_for_release.cmd" that sets an environment variable, which is queried by all build scripts. So by opening a shell and running, in there, first "setup_for_release.cmd" and then "build_everything_and_the_kitchen_sink.cmd", you get release builds of everything.

    Or better yet, don't make a distinction between debug and release builds in the first place. Or as they say in the aerospace field: "You fly what you debug."

Reply
  • so, I would like to in one global place in some form or fashion make it so that all 47 projects build in either debug mode or production mode

    So make that one global place a single header file, global to all projects. Or make it an argument to the makefile that controls a #define passed on directly to all batch / make files. Traditional Makefile setups would support this with a relatively simple invokation like

    make all EXTRA_CPPFLAGS="-DRELEASE"

    Or you could have a "setup_for_release.cmd" that sets an environment variable, which is queried by all build scripts. So by opening a shell and running, in there, first "setup_for_release.cmd" and then "build_everything_and_the_kitchen_sink.cmd", you get release builds of everything.

    Or better yet, don't make a distinction between debug and release builds in the first place. Or as they say in the aerospace field: "You fly what you debug."

Children