* [Xenomai-core] [PATCH] consistent xeno-config output
@ 2008-01-28 10:10 Jan Kiszka
2008-01-28 10:21 ` Gilles Chanteperdrix
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2008-01-28 10:10 UTC (permalink / raw)
To: Xenomai-core
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
I received some complaint that xeno-config [--verbose] does not match
xeno-config --posix-ldflags. Here is a fix.
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
[-- Attachment #2: consistify-xeno-config-output.patch --]
[-- Type: text/x-patch, Size: 2725 bytes --]
Index: xenomai/scripts/xeno-config.in
===================================================================
--- xenomai/scripts/xeno-config.in (Revision 3451)
+++ xenomai/scripts/xeno-config.in (Arbeitskopie)
@@ -23,6 +23,23 @@ XENO_LIBRARY_DIR="${staging}${libdir}"
unset prefix exec_prefix libdir datadir datarootdir pkgdatadir includedir
+posix_ldflags ()
+{
+ if test \! -r $XENO_POSIX_WRAPPERS; then
+ echo "POSIX support is not available" >&2
+ exit 1
+ fi
+ if test "$XENO_POSIX_FAST_WRAPPING" = "yes"; then
+ echo -n "-Wl,@$XENO_POSIX_WRAPPERS $XENO_POSIX_LDFLAGS"
+ else
+ wrappers=`cat $XENO_POSIX_WRAPPERS | \
+ while read wrap_option symbol; do \
+ echo -n "-Wl,$wrap_option,$symbol " ; \
+ done`
+ echo -n "$wrappers $XENO_POSIX_LDFLAGS"
+ fi
+}
+
usage ()
{
cat <<EOF
@@ -46,15 +63,15 @@ EOF
verbose ()
{
echo xeno-config --verbose
- echo " " --version="\"${XENO_VERSION}\""
- echo " " --cc="\"$XENO_CC\""
- echo " " --arch="\"$XENO_TARGET_ARCH\""
- echo " " --prefix="\"$XENO_PREFIX\""
- echo " " --xeno-cflags="\"$XENO_BASE_CFLAGS\""
- echo " " --xeno-ldflags="\"$XENO_BASE_LDFLAGS\""
- echo " " --posix-cflags="\"$XENO_POSIX_CFLAGS\""
- echo " " --posix-ldflags="\"$XENO_POSIX_LDFLAGS\""
- echo " " --library-dir="\"$XENO_LIBRARY_DIR\""
+ echo " --version=\"${XENO_VERSION}\""
+ echo " --cc=\"$XENO_CC\""
+ echo " --arch=\"$XENO_TARGET_ARCH\""
+ echo " --prefix=\"$XENO_PREFIX\""
+ echo " --xeno-cflags=\"$XENO_BASE_CFLAGS\""
+ echo " --xeno-ldflags=\"$XENO_BASE_LDFLAGS\""
+ echo " --posix-cflags=\"$XENO_POSIX_CFLAGS\""
+ echo " --posix-ldflags=\"`posix_ldflags`\""
+ echo " --library-dir=\"$XENO_LIBRARY_DIR\""
}
if test $# -eq 0; then
@@ -90,19 +107,7 @@ while test $# -gt 0; do
echo $XENO_POSIX_CFLAGS
;;
--posix-ldflags)
- if test \! -r $XENO_POSIX_WRAPPERS; then
- echo "POSIX support is not available" >&2
- exit 1
- fi
- if test "$XENO_POSIX_FAST_WRAPPING" = "yes"; then
- echo "-Wl,@$XENO_POSIX_WRAPPERS $XENO_POSIX_LDFLAGS"
- else
- wrappers=`cat $XENO_POSIX_WRAPPERS | \
- while read wrap_option symbol; do \
- echo -n "-Wl,$wrap_option,$symbol " ; \
- done`
- echo "$wrappers $XENO_POSIX_LDFLAGS"
- fi
+ echo `posix_ldflags`
;;
--lib*-dir|--libdir|--user-libdir)
echo $XENO_LIBRARY_DIR
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Xenomai-core] [PATCH] consistent xeno-config output
2008-01-28 10:10 [Xenomai-core] [PATCH] consistent xeno-config output Jan Kiszka
@ 2008-01-28 10:21 ` Gilles Chanteperdrix
2008-01-28 10:28 ` Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2008-01-28 10:21 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai-core
On Jan 28, 2008 11:10 AM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
> I received some complaint that xeno-config [--verbose] does not match
> xeno-config --posix-ldflags. Here is a fix.
Useless use of cat detected ! When parsing posix.wrappers, we could
redirect input from posix.wrappers instead of using cat.
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Xenomai-core] [PATCH] consistent xeno-config output
2008-01-28 10:21 ` Gilles Chanteperdrix
@ 2008-01-28 10:28 ` Jan Kiszka
2008-01-28 10:41 ` Gilles Chanteperdrix
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2008-01-28 10:28 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: Xenomai-core
[-- Attachment #1: Type: text/plain, Size: 473 bytes --]
Gilles Chanteperdrix wrote:
> On Jan 28, 2008 11:10 AM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
>> I received some complaint that xeno-config [--verbose] does not match
>> xeno-config --posix-ldflags. Here is a fix.
>
> Useless use of cat detected ! When parsing posix.wrappers, we could
> redirect input from posix.wrappers instead of using cat.
>
OK. Is this one better?
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
[-- Attachment #2: consistify-xeno-config-output-v2.patch --]
[-- Type: text/x-patch, Size: 2805 bytes --]
---
scripts/xeno-config.in | 48 ++++++++++++++++++++++++++----------------------
1 file changed, 26 insertions(+), 22 deletions(-)
Index: b/scripts/xeno-config.in
===================================================================
--- a/scripts/xeno-config.in
+++ b/scripts/xeno-config.in
@@ -23,6 +23,22 @@ XENO_LIBRARY_DIR="${staging}${libdir}"
unset prefix exec_prefix libdir datadir datarootdir pkgdatadir includedir
+posix_ldflags ()
+{
+ if test \! -r $XENO_POSIX_WRAPPERS; then
+ echo "POSIX support is not available" >&2
+ exit 1
+ fi
+ if test "$XENO_POSIX_FAST_WRAPPING" = "yes"; then
+ echo -n "-Wl,@$XENO_POSIX_WRAPPERS $XENO_POSIX_LDFLAGS"
+ else
+ wrappers=`while read wrap_option symbol; do \
+ echo -n "-Wl,$wrap_option,$symbol " ; \
+ done < $XENO_POSIX_WRAPPERS`
+ echo -n "$wrappers $XENO_POSIX_LDFLAGS"
+ fi
+}
+
usage ()
{
cat <<EOF
@@ -46,15 +62,15 @@ EOF
verbose ()
{
echo xeno-config --verbose
- echo " " --version="\"${XENO_VERSION}\""
- echo " " --cc="\"$XENO_CC\""
- echo " " --arch="\"$XENO_TARGET_ARCH\""
- echo " " --prefix="\"$XENO_PREFIX\""
- echo " " --xeno-cflags="\"$XENO_BASE_CFLAGS\""
- echo " " --xeno-ldflags="\"$XENO_BASE_LDFLAGS\""
- echo " " --posix-cflags="\"$XENO_POSIX_CFLAGS\""
- echo " " --posix-ldflags="\"$XENO_POSIX_LDFLAGS\""
- echo " " --library-dir="\"$XENO_LIBRARY_DIR\""
+ echo " --version=\"${XENO_VERSION}\""
+ echo " --cc=\"$XENO_CC\""
+ echo " --arch=\"$XENO_TARGET_ARCH\""
+ echo " --prefix=\"$XENO_PREFIX\""
+ echo " --xeno-cflags=\"$XENO_BASE_CFLAGS\""
+ echo " --xeno-ldflags=\"$XENO_BASE_LDFLAGS\""
+ echo " --posix-cflags=\"$XENO_POSIX_CFLAGS\""
+ echo " --posix-ldflags=\"`posix_ldflags`\""
+ echo " --library-dir=\"$XENO_LIBRARY_DIR\""
}
if test $# -eq 0; then
@@ -90,19 +106,7 @@ while test $# -gt 0; do
echo $XENO_POSIX_CFLAGS
;;
--posix-ldflags)
- if test \! -r $XENO_POSIX_WRAPPERS; then
- echo "POSIX support is not available" >&2
- exit 1
- fi
- if test "$XENO_POSIX_FAST_WRAPPING" = "yes"; then
- echo "-Wl,@$XENO_POSIX_WRAPPERS $XENO_POSIX_LDFLAGS"
- else
- wrappers=`cat $XENO_POSIX_WRAPPERS | \
- while read wrap_option symbol; do \
- echo -n "-Wl,$wrap_option,$symbol " ; \
- done`
- echo "$wrappers $XENO_POSIX_LDFLAGS"
- fi
+ echo `posix_ldflags`
;;
--lib*-dir|--libdir|--user-libdir)
echo $XENO_LIBRARY_DIR
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Xenomai-core] [PATCH] consistent xeno-config output
2008-01-28 10:28 ` Jan Kiszka
@ 2008-01-28 10:41 ` Gilles Chanteperdrix
2008-01-28 11:29 ` Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2008-01-28 10:41 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai-core
On Jan 28, 2008 11:28 AM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
> Gilles Chanteperdrix wrote:
> > On Jan 28, 2008 11:10 AM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
> >> I received some complaint that xeno-config [--verbose] does not match
> >> xeno-config --posix-ldflags. Here is a fix.
> >
> > Useless use of cat detected ! When parsing posix.wrappers, we could
> > redirect input from posix.wrappers instead of using cat.
> >
>
> OK. Is this one better?
I would say there is still a useless use of backticks, why use:
echo `posix_ldflags`
instead of simply:
posix_ldflags
echo
?
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Xenomai-core] [PATCH] consistent xeno-config output
2008-01-28 10:41 ` Gilles Chanteperdrix
@ 2008-01-28 11:29 ` Jan Kiszka
2008-02-04 12:42 ` Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2008-01-28 11:29 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: Xenomai-core
[-- Attachment #1: Type: text/plain, Size: 747 bytes --]
Gilles Chanteperdrix wrote:
> On Jan 28, 2008 11:28 AM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
>> Gilles Chanteperdrix wrote:
>>> On Jan 28, 2008 11:10 AM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
>>>> I received some complaint that xeno-config [--verbose] does not match
>>>> xeno-config --posix-ldflags. Here is a fix.
>>> Useless use of cat detected ! When parsing posix.wrappers, we could
>>> redirect input from posix.wrappers instead of using cat.
>>>
>> OK. Is this one better?
>
> I would say there is still a useless use of backticks, why use:
> echo `posix_ldflags`
> instead of simply:
> posix_ldflags
> echo
>
> ?
So shall it be. :)
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
[-- Attachment #2: consistify-xeno-config-output-v3.patch --]
[-- Type: text/x-patch, Size: 3231 bytes --]
---
ChangeLog | 4 ++++
scripts/xeno-config.in | 49 +++++++++++++++++++++++++++----------------------
2 files changed, 31 insertions(+), 22 deletions(-)
Index: b/scripts/xeno-config.in
===================================================================
--- a/scripts/xeno-config.in
+++ b/scripts/xeno-config.in
@@ -23,6 +23,22 @@ XENO_LIBRARY_DIR="${staging}${libdir}"
unset prefix exec_prefix libdir datadir datarootdir pkgdatadir includedir
+posix_ldflags ()
+{
+ if test \! -r $XENO_POSIX_WRAPPERS; then
+ echo "POSIX support is not available" >&2
+ exit 1
+ fi
+ if test "$XENO_POSIX_FAST_WRAPPING" = "yes"; then
+ echo -n "-Wl,@$XENO_POSIX_WRAPPERS $XENO_POSIX_LDFLAGS"
+ else
+ wrappers=`while read wrap_option symbol; do \
+ echo -n "-Wl,$wrap_option,$symbol " ; \
+ done < $XENO_POSIX_WRAPPERS`
+ echo -n "$wrappers $XENO_POSIX_LDFLAGS"
+ fi
+}
+
usage ()
{
cat <<EOF
@@ -46,15 +62,15 @@ EOF
verbose ()
{
echo xeno-config --verbose
- echo " " --version="\"${XENO_VERSION}\""
- echo " " --cc="\"$XENO_CC\""
- echo " " --arch="\"$XENO_TARGET_ARCH\""
- echo " " --prefix="\"$XENO_PREFIX\""
- echo " " --xeno-cflags="\"$XENO_BASE_CFLAGS\""
- echo " " --xeno-ldflags="\"$XENO_BASE_LDFLAGS\""
- echo " " --posix-cflags="\"$XENO_POSIX_CFLAGS\""
- echo " " --posix-ldflags="\"$XENO_POSIX_LDFLAGS\""
- echo " " --library-dir="\"$XENO_LIBRARY_DIR\""
+ echo " --version=\"${XENO_VERSION}\""
+ echo " --cc=\"$XENO_CC\""
+ echo " --arch=\"$XENO_TARGET_ARCH\""
+ echo " --prefix=\"$XENO_PREFIX\""
+ echo " --xeno-cflags=\"$XENO_BASE_CFLAGS\""
+ echo " --xeno-ldflags=\"$XENO_BASE_LDFLAGS\""
+ echo " --posix-cflags=\"$XENO_POSIX_CFLAGS\""
+ echo " --posix-ldflags=\"`posix_ldflags`\""
+ echo " --library-dir=\"$XENO_LIBRARY_DIR\""
}
if test $# -eq 0; then
@@ -90,19 +106,8 @@ while test $# -gt 0; do
echo $XENO_POSIX_CFLAGS
;;
--posix-ldflags)
- if test \! -r $XENO_POSIX_WRAPPERS; then
- echo "POSIX support is not available" >&2
- exit 1
- fi
- if test "$XENO_POSIX_FAST_WRAPPING" = "yes"; then
- echo "-Wl,@$XENO_POSIX_WRAPPERS $XENO_POSIX_LDFLAGS"
- else
- wrappers=`cat $XENO_POSIX_WRAPPERS | \
- while read wrap_option symbol; do \
- echo -n "-Wl,$wrap_option,$symbol " ; \
- done`
- echo "$wrappers $XENO_POSIX_LDFLAGS"
- fi
+ posix_ldflags
+ echo
;;
--lib*-dir|--libdir|--user-libdir)
echo $XENO_LIBRARY_DIR
Index: b/ChangeLog
===================================================================
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-26 Jan Kiszka <jan.kiszka@domain.hid>
+
+ * scripts/xeno-config.in: Ensure consistent output of posix-ldflags.
+
2008-01-27 Jan Kiszka <jan.kiszka@domain.hid>
* ksrc/arch/x86/hal-common.c: Fix race when starting the cleanup
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Xenomai-core] [PATCH] consistent xeno-config output
2008-01-28 11:29 ` Jan Kiszka
@ 2008-02-04 12:42 ` Jan Kiszka
2008-02-04 13:13 ` Gilles Chanteperdrix
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2008-02-04 12:42 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: Xenomai-core
Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
>> On Jan 28, 2008 11:28 AM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
>>> Gilles Chanteperdrix wrote:
>>>> On Jan 28, 2008 11:10 AM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
>>>>> I received some complaint that xeno-config [--verbose] does not match
>>>>> xeno-config --posix-ldflags. Here is a fix.
>>>> Useless use of cat detected ! When parsing posix.wrappers, we could
>>>> redirect input from posix.wrappers instead of using cat.
>>>>
>>> OK. Is this one better?
>> I would say there is still a useless use of backticks, why use:
>> echo `posix_ldflags`
>> instead of simply:
>> posix_ldflags
>> echo
>>
>> ?
>
> So shall it be. :)
>
I'm going to commit the last version to trunk and 2.4.x. OK?
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] [PATCH] consistent xeno-config output
2008-02-04 12:42 ` Jan Kiszka
@ 2008-02-04 13:13 ` Gilles Chanteperdrix
0 siblings, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2008-02-04 13:13 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai-core
On Mon, Feb 4, 2008 at 1:42 PM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
> Jan Kiszka wrote:
> > Gilles Chanteperdrix wrote:
> >> On Jan 28, 2008 11:28 AM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
> >>> Gilles Chanteperdrix wrote:
> >>>> On Jan 28, 2008 11:10 AM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
> >>>>> I received some complaint that xeno-config [--verbose] does not match
> >>>>> xeno-config --posix-ldflags. Here is a fix.
> >>>> Useless use of cat detected ! When parsing posix.wrappers, we could
> >>>> redirect input from posix.wrappers instead of using cat.
> >>>>
> >>> OK. Is this one better?
> >> I would say there is still a useless use of backticks, why use:
> >> echo `posix_ldflags`
> >> instead of simply:
> >> posix_ldflags
> >> echo
> >>
> >> ?
> >
> > So shall it be. :)
> >
>
> I'm going to commit the last version to trunk and 2.4.x. OK?
Ok for me.
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-02-04 13:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-28 10:10 [Xenomai-core] [PATCH] consistent xeno-config output Jan Kiszka
2008-01-28 10:21 ` Gilles Chanteperdrix
2008-01-28 10:28 ` Jan Kiszka
2008-01-28 10:41 ` Gilles Chanteperdrix
2008-01-28 11:29 ` Jan Kiszka
2008-02-04 12:42 ` Jan Kiszka
2008-02-04 13:13 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.