From a48c026a313841936fcbafbcd7205dd3f7ea616f Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Mon, 27 May 2019 11:23:58 +0200 Subject: [PATCH] use CPPFLAGS with the preprocessor d'oh --- README.md | 2 +- sh/pre | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7a94089..1c8a3f8 100644 --- a/README.md +++ b/README.md @@ -372,7 +372,7 @@ $ ### [pre](/sh/pre) -(bash/zsh) dumps all the #defines that `$CC $CFLAGS $LDFLAGS` would result in. +(bash/zsh) dumps all the #defines that `$CC $CPPFLAGS $CFLAGS $LDFLAGS` would result in. ``` $ pre | shuf | head -10 diff --git a/sh/pre b/sh/pre index 85da5d5..16c4079 100755 --- a/sh/pre +++ b/sh/pre @@ -1,6 +1,6 @@ #!/usr/bin/env bash if [ -n "${ZSH_VERSION:-}" ]; then - $CC -dM -E - $=CFLAGS $=LDFLAGS < /dev/null + $CC -dM -E - $=CPPFLAGS $=CFLAGS $=LDFLAGS < /dev/null else - $CC -dM -E - $CFLAGS $LDFLAGS < /dev/null + $CC -dM -E - $CPPFLAGS $CFLAGS $LDFLAGS < /dev/null fi