Skip to content

Instantly share code, notes, and snippets.

@Alexhuszagh
Created November 30, 2017 15:32
Show Gist options
  • Save Alexhuszagh/a86c9f5cefcddc26742ac4a75833ff5f to your computer and use it in GitHub Desktop.
Save Alexhuszagh/a86c9f5cefcddc26742ac4a75833ff5f to your computer and use it in GitHub Desktop.
Dumb Preprocessor Defines
#!/bin/bash
# Use as `./dump_defines.sh $CC`, where CC is the C or C++
# compiler desired. There must be an arg1, or the script
# will quit.
if [ "$#" -ne 1 ]; then
echo "Use: ./dump_defines.sh \$CC."
echo "Must invoke with exactly 1 arg."
exit 1
fi
$1 -dM -E - < /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment