Overview
Comment: | objfw-config: Add support for packages
This allows libraries using ObjFW to store their flags in a file and |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
9911d605027695294c78c203a41cf63a |
User & Date: | js on 2019-01-12 19:46:11 |
Other Links: | manifest | tags |
Context
2019-01-13
| ||
23:39 | objfw-compile: Add support for --package check-in: 6a9cca294d user: js tags: trunk | |
2019-01-12
| ||
19:46 | objfw-config: Add support for packages check-in: 9911d60502 user: js tags: trunk | |
2019-01-07
| ||
22:59 | Partially fix sockets on Nintendo 3DS/Wii check-in: ab89c47f42 user: js tags: trunk | |
Changes
Modified utils/objfw-config.in from [99ed5dfce7] to [e66fb4b258].
︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Public License, either version 2 or 3, which can be found in the file # LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this # file. # prefix="@prefix@" exec_prefix="@exec_prefix@" libdir="@libdir@" CFLAGS="" CPPFLAGS="@OBJFW_CPPFLAGS@ -I@includedir@" CXXFLAGS="" OBJC="@OBJC@" OBJCFLAGS="@OBJFW_OBJCFLAGS@" LIB_CFLAGS="@LIB_CFLAGS@" | > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Public License, either version 2 or 3, which can be found in the file # LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this # file. # prefix="@prefix@" exec_prefix="@exec_prefix@" datarootdir="@datarootdir@" datadir="@datadir@" libdir="@libdir@" CFLAGS="" CPPFLAGS="@OBJFW_CPPFLAGS@ -I@includedir@" CXXFLAGS="" OBJC="@OBJC@" OBJCFLAGS="@OBJFW_OBJCFLAGS@" LIB_CFLAGS="@LIB_CFLAGS@" |
︙ | ︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | --libs Outputs the required LIBS --lib-cflags Outputs CFLAGS for building a library --lib-ldflags Outputs LDFLAGS for building a library --lib-prefix Outputs the prefix for libraries --lib-suffix Outputs the suffix for libraries --objc Outputs the OBJC used to compile ObjFW --objcflags Outputs the required OBJCFLAGS --plugin-cflags Outputs CFLAGS for building a plugin --plugin-ldflags Outputs LDFLAGS for building a plugin --plugin-suffix Outputs the suffix for plugins --prog-suffix Outputs the suffix for binaries --reexport Outputs LDFLAGS to reexport ObjFW --rpath Outputs LDFLAGS for using rpath --static-libs Outputs the required LIBS to link ObjFW statically --version Outputs the installed version __EOF__ exit $1 } test -z "$1" && show_help 1 while test -n "$1"; do case "$1" in --all) printf "%s %s %s " "$CFLAGS" "$CPPFLAGS" "$CXXFLAGS" printf "%s %s " "$OBJCFLAGS" "$LDFLAGS" printf "%s %s " "$LDFLAGS_REEXPORT" "$LDFLAGS_RPATH" printf "%s" "$LIBS" | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 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 | --libs Outputs the required LIBS --lib-cflags Outputs CFLAGS for building a library --lib-ldflags Outputs LDFLAGS for building a library --lib-prefix Outputs the prefix for libraries --lib-suffix Outputs the suffix for libraries --objc Outputs the OBJC used to compile ObjFW --objcflags Outputs the required OBJCFLAGS --package Additionally outputs the flags for the specified package --packages-dir Outputs the directory where flags for packages are stored --plugin-cflags Outputs CFLAGS for building a plugin --plugin-ldflags Outputs LDFLAGS for building a plugin --plugin-suffix Outputs the suffix for plugins --prog-suffix Outputs the suffix for binaries --reexport Outputs LDFLAGS to reexport ObjFW --rpath Outputs LDFLAGS for using rpath --static-libs Outputs the required LIBS to link ObjFW statically --version Outputs the installed version __EOF__ exit $1 } test -z "$1" && show_help 1 package_version() { if test "$1" != "1"; then echo "Unsupported package version: $1" exit 1 fi } include_package() { if ! test -f "$datadir/objfw/packages/$1"; then echo "No such package: $1" exit 1 fi source "$datadir/objfw/packages/$1" } add_package_flags() { while test -n "$1"; do case "$1" in --package) shift include_package "$1" ;; esac shift done } add_package_flags "$@" while test -n "$1"; do case "$1" in --all) printf "%s %s %s " "$CFLAGS" "$CPPFLAGS" "$CXXFLAGS" printf "%s %s " "$OBJCFLAGS" "$LDFLAGS" printf "%s %s " "$LDFLAGS_REEXPORT" "$LDFLAGS_RPATH" printf "%s" "$LIBS" |
︙ | ︙ | |||
150 151 152 153 154 155 156 157 158 159 160 161 162 163 | ;; --reexport) printf "%s" "$LDFLAGS_REEXPORT" ;; --rpath) printf "%s" "$LDFLAGS_RPATH" ;; --plugin-cflags) printf "%s" "$PLUGIN_CFLAGS" ;; --plugin-ldflags) printf "%s" "$PLUGIN_LDFLAGS" ;; --plugin-suffix) | > > > > > > > | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | ;; --reexport) printf "%s" "$LDFLAGS_REEXPORT" ;; --rpath) printf "%s" "$LDFLAGS_RPATH" ;; --package) # Already included into the flags. shift ;; --packages-dir) printf "%s" "$datadir/objfw/packages" ;; --plugin-cflags) printf "%s" "$PLUGIN_CFLAGS" ;; --plugin-ldflags) printf "%s" "$PLUGIN_LDFLAGS" ;; --plugin-suffix) |
︙ | ︙ |