title: Get define/const value from header to shell?
body: <p>Suppose one has some header, the if normally writing some C program one would include with <code>-I/path/header.h</code>. It has bunch of <code>#defines</code> some of them being "compound" like <code>#define SOMECONST SOME_PREPROC_FUNC(3)</code> and also some enums.</p>
  
  <p>What could be the good way to get the value of <code>SOME_CONST</code> and <code>SOME_ENUM</code> to shell in hopefully one line? Without writing compiling custom executable. Pseudo thingie that would not work, but hopefully illustrates this:</p>
  
  <pre><code>./$(cc '#include &lt;header&gt;\n#include &lt;stdio&gt;\nvoid main () {printf("%d\n", $const_or_enum_name);}' -I/path/header.h)
  </code></pre>
  
  <p>Or maybe using some other tool?</p>