From: Evan Gates <evan.gates@gmail.com>
To: xenomai@xenomai.org
Subject: [PATCH v3] meson: allow use of installed uapi headers
Date: Mon, 7 Mar 2022 10:31:46 -0800 [thread overview]
Message-ID: <20220307183146.24784-1-evan.gates@gmail.com> (raw)
In-Reply-To: <20220304190205.24489-1-egates@cardinalpeak.com>
Commit c70a9d9d536aefcf6574328aaac0fcc86f9ab0f7 added a test for
$UAPI/include/uapi/evl that was meant to ensure the given $UAPI path was
correct. That test meant that $UAPI had to point to a linux-evl source
directory and could not point to installed headers in e.g. /usr/include.
The script had previously allowed the use of installed headers, using
the existence of $UAPI/Kbuild as an heuristic to decide whether $UAPI
pointed to linux-evl source or to installed headers.
Rewrite the script to check for the existence of all three required
directories in either location. This allows the use of installed
headers again.
Fixes: c70a9d9 (build: tighten consistency check for uapi)
Signed-off-by: Evan Gates <evan.gates@gmail.com>
---
Changes in v3:
- Add Signed-off-by trailer
Changes in v2:
- Switch back to Kbuild heuristic in order to check/set the correct path
for the asm directory
- Add the missing directory back to the error message
- Actually test with both setups, not sure how I messed that up last time
meson/setup-uapi.sh | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/meson/setup-uapi.sh b/meson/setup-uapi.sh
index 1b43c02..f27a07e 100644
--- a/meson/setup-uapi.sh
+++ b/meson/setup-uapi.sh
@@ -1,19 +1,19 @@
#! /bin/sh
-if test \! -d $UAPI/include/uapi/evl; then
- echo "meson: path given to -Duapi does not look right ($UAPI/include/uapi/evl is missing)"
- exit 1
+if test -r $UAPI/Kbuild; then
+ set \
+ $UAPI/arch/$ARCH/include/uapi/asm \
+ $UAPI/include/uapi/asm-generic \
+ $UAPI/include/uapi/evl
+else
+ set $UAPI/asm $UAPI/asm-generic $UAPI/evl
fi
-mkdir -p $O_UAPI
-rm -f $O_UAPI/asm $O_UAPI/asm-generic $O_UAPI/evl
+for d do
+ test -d $d && continue
+ echo "meson: path given to -Duapi does not look right ($d is missing)"
+ exit 1
+done
-if test -r $UAPI/Kbuild; then
- ln -s $UAPI/arch/$ARCH/include/uapi/asm $O_UAPI/asm
- ln -s $UAPI/include/uapi/asm-generic $O_UAPI/asm-generic
- ln -s $UAPI/include/uapi/evl $O_UAPI/evl
-elif test \! -L $O_UAPI/asm; then
- ln -s $UAPI/asm $O_UAPI/asm
- ln -s $UAPI/asm-generic $O_UAPI/asm-generic
- ln -s $UAPI/evl $O_UAPI/evl
-fi
+mkdir -p $O_UAPI
+for d do ln -sf $d $O_UAPI/; done
--
2.35.1
next prev parent reply other threads:[~2022-03-07 18:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 23:34 [PATCH] meson: allow use of installed uapi headers Evan Gates
2022-03-04 18:28 ` Philippe Gerum
2022-03-04 18:35 ` Evan Gates
2022-03-04 19:02 ` [PATCH v2] " Evan Gates
2022-03-05 10:11 ` Philippe Gerum
2022-03-07 18:31 ` Evan Gates [this message]
2022-03-10 9:50 ` [PATCH v3] " Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220307183146.24784-1-evan.gates@gmail.com \
--to=evan.gates@gmail.com \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.