@@ -10,10 +10,11 @@ VERSION="0.1" show_help() { echo "$0: Available arguments are:" echo + echo " --all Outputs all flags + libs" echo " --cflags Outputs the required CFLAGS" echo " --cppflags Outputs the required CPPFLAGS" echo " --cxxflags Outputs the required CXXFLAGS" echo " --objcflags Outputs the required OBJCFLAGS" echo " --libs Outputs the required LIBS" @@ -24,10 +25,17 @@ test -z "$1" && show_help while test ! -z "$1"; do case "$1" in + --all) + echo "$CFLAGS" + echo "$CPPFLAGS" + echo "$CXXFLAGS" + echo "$OBJCFLAGS" + echo "$LIBS" + ;; --cflags) echo "$CFLAGS" ;; --cppflags) echo "$CPPFLAGS" @@ -43,12 +51,12 @@ ;; --version) echo "$VERSION" ;; *) - echo "Invalid option: $1" + echo "Invalid option: $1" >/dev/stderr exit 1 ;; esac shift done