Overview
Comment: | objfw-config: Clean up output of flags |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b85ae3cbc1bd6decaee966f39572e8c9 |
User & Date: | js on 2019-01-20 12:34:03 |
Other Links: | manifest | tags |
Context
2019-01-23
| ||
20:15 | objfw-config: Use . instead of source check-in: 13e580b7e6 user: js tags: trunk | |
2019-01-20
| ||
12:34 | objfw-config: Clean up output of flags check-in: b85ae3cbc1 user: js tags: trunk | |
12:13 | objfw-config: Change packages format and location check-in: 35779c332c user: js tags: trunk | |
Changes
Modified utils/objfw-config.in from [bb9b179125] to [3eef74228e].
︙ | ︙ | |||
74 75 76 77 78 79 80 | exit $1 } test -z "$1" && show_help 1 package_description() { if test "$1" != "1"; then | | | > > > > > > > > > > < | | | | | | | | | | | | | | | | | | | | | | | | | | < < | > | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | exit $1 } test -z "$1" && show_help 1 package_description() { if test "$1" != "1"; then echo "Unsupported package description version: $1" 1>&2 exit 1 fi } package_depends_on() { if ! test -f "$packagesdir/$1.oc"; then echo "No such package: $1" 1>&2 exit 1 fi set -e source "$packagesdir/$1.oc" set +e } parse_packages() { while test x"$1" != "x"; do case "$1" in --package) shift package_depends_on "$1" ;; esac shift done } parse_packages "$@" flag_printed="no" output_flag() { if test x"$flag_printed" = x"yes"; then printf " %s" "$1" else printf "%s" "$1" flag_printed="yes" fi } while test x"$1" != "x"; do case "$1" in --all) output_flag "$CFLAGS $CPPFLAGS $CXXFLAGS $OBJCFLAGS" output_flag "$LDFLAGS $LDFLAGS_REEXPORT $LDFLAGS_RPATH" output_flag "$LIBS" ;; --arc) output_flag "-fobjc-arc -fobjc-arc-exceptions" ;; --cflags) output_flag "$CFLAGS" ;; --cppflags) output_flag "$CPPFLAGS" ;; --cxxflags) output_flag "$CXXFLAGS" ;; --framework-libs) output_flag "$FRAMEWORK_LIBS" ;; --help) show_help 0 ;; --objc) output_flag "$OBJC" ;; --objcflags) output_flag "$OBJCFLAGS" ;; --libs) output_flag "$LIBS" ;; --lib-cflags) if test x"$LIB_MAJOR" = x"" -o x"$LIB_MINOR" = x""; then echo "LIB_MAJOR and LIB_MINOR need to be set!" \ 1>&2 exit 1 fi output_flag "$LIB_CFLAGS" ;; --lib-ldflags) if test x"$SHARED_LIB" = x"" -o x"$LIB_MAJOR" = x"" \ -o x"$LIB_MINOR" = x""; then printf "SHARED_LIB, LIB_MAJOR and " 2>&1 echo "LIB_MINOR need to be set!" 1>&2 exit 1 fi output_flag "$LIB_LDFLAGS" ;; --lib-prefix) if test x"$LIB_MAJOR" = x"" -o x"$LIB_MINOR" = x""; then echo "LIB_MAJOR and LIB_MINOR need to be set!" \ 1>&2 exit 1 fi output_flag "$LIB_PREFIX" ;; --lib-suffix) if test x"$LIB_MAJOR" = x"" -o x"$LIB_MINOR" = x""; then echo "LIB_MAJOR and LIB_MINOR need to be set!" \ 1>&2 exit 1 fi output_flag "$LIB_SUFFIX" ;; --ldflags) output_flag "$LDFLAGS" ;; --reexport) output_flag "$LDFLAGS_REEXPORT" ;; --rpath) output_flag "$LDFLAGS_RPATH" ;; --package) # Already included into the flags. shift ;; --packages-dir) output_flag "$packagesdir" ;; --plugin-cflags) output_flag "$PLUGIN_CFLAGS" ;; --plugin-ldflags) output_flag "$PLUGIN_LDFLAGS" ;; --plugin-suffix) output_flag "$PLUGIN_SUFFIX" ;; --prog-suffix) output_flag "$PROG_SUFFIX" ;; --static-libs) output_flag "$STATIC_LIBS" ;; --version) output_flag "$VERSION" ;; *) echo "Invalid option: $1" 1>&2 exit 1 ;; esac shift done test x"$flag_printed" = x"yes" && echo exit 0 |