13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# 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@"
LIB_LDFLAGS="@LIB_LDFLAGS@"
|
<
<
>
|
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@"
libdir="@libdir@"
packagesdir="$libdir/objfw-config"
CFLAGS=""
CPPFLAGS="@OBJFW_CPPFLAGS@ -I@includedir@"
CXXFLAGS=""
OBJC="@OBJC@"
OBJCFLAGS="@OBJFW_OBJCFLAGS@"
LIB_CFLAGS="@LIB_CFLAGS@"
LIB_LDFLAGS="@LIB_LDFLAGS@"
|
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
|
--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 x"$1" != "x"; do
case "$1" in
--package)
shift
include_package "$1"
;;
esac
shift
done
}
add_package_flags "$@"
while test x"$1" != "x"; do
case "$1" in
--all)
printf "%s %s %s " "$CFLAGS" "$CPPFLAGS" "$CXXFLAGS"
printf "%s %s " "$OBJCFLAGS" "$LDFLAGS"
printf "%s %s " "$LDFLAGS_REEXPORT" "$LDFLAGS_RPATH"
|
|
|
|
|
>
|
>
|
|
<
|
|
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
|
--version Outputs the installed version
__EOF__
exit $1
}
test -z "$1" && show_help 1
package_description() {
if test "$1" != "1"; then
echo "Unsupported package description version: $1"
exit 1
fi
}
package_depends_on() {
if ! test -f "$packagesdir/$1.oc"; then
echo "No such package: $1"
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 "$@"
while test x"$1" != "x"; do
case "$1" in
--all)
printf "%s %s %s " "$CFLAGS" "$CPPFLAGS" "$CXXFLAGS"
printf "%s %s " "$OBJCFLAGS" "$LDFLAGS"
printf "%s %s " "$LDFLAGS_REEXPORT" "$LDFLAGS_RPATH"
|
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
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"
;;
|
|
|
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
printf "%s" "$LDFLAGS_RPATH"
;;
--package)
# Already included into the flags.
shift
;;
--packages-dir)
printf "%s" "$packagesdir"
;;
--plugin-cflags)
printf "%s" "$PLUGIN_CFLAGS"
;;
--plugin-ldflags)
printf "%s" "$PLUGIN_LDFLAGS"
;;
|