Search code examples
variablesmakefilecommandgnu-makesymbols

What does @+SKIP_ENV=true mean in this Makefile?


I'm tinkering with this project where Step 6 requires me to run a command like make db-prepare-artix7. This command corresponds to this section of the Makefile. I am confused by the @+SKIP_ENV=true in the recipe. What is @+SKIP_ENV here, and what does it do? Couldn't find anywhere referring to SKIP_ENV.

Thanks!


Solution

  • Explaining every part:

    • The @ means the command will not be echoed by Make during recipe execution
    • The + means the command will be executed even during dry runs: make --dry-run ...
    • The SKIP_ENV=true is sh(ell) syntax for setting the environment variable SKIP_ENV to the string true for the duration of the command that follows
      • In your case the source ... command
      • The effect of SKIP_ENV depends on the command - dig deeper to find out