Created
November 30, 2017 15:32
-
-
Save Alexhuszagh/a86c9f5cefcddc26742ac4a75833ff5f to your computer and use it in GitHub Desktop.
Dumb Preprocessor Defines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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