Programatically using IDE Build dependent code

How may times has working code had to be changed after a new build is released(?)

Is it possible to programatically access a system defined variable to allow alternative code to run for different builds?

Of course it is. For instance, this is common in many libraries that were initially written before 1.0 came out:

#if ARDUINO >= 100
  #include <Arduino.h>
  #include <WProgram.h>

“100” stands for 1.0.0, you get the idea.

Extremely useful. Thank you for that!

Where can I find information on other defined system variables?