Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson: create dist archives suitable for building with configure, too #791

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

eli-schwartz
Copy link
Contributor

Run autogen.sh as a dist script while creating the tarball. Also update autogen.sh to detect when it is being run from meson dist, and use that as the srcdir.

The "which" utility is not guaranteed to be installed either, and if it
is, its behavior is not portable either. This means that when autoreconf
is installed, the `which` check will report a fatal error because the
which tool did not exist and the shell returned a nonzero status when
attempting to fork+exec. If it did exist, it might not be an
implementation of `which` that returns nonzero when commands do not
exist.

The general scripting suggestion is to use the "command -v" shell
builtin; this is required to exist in all POSIX 2008 compliant shells,
and is thus guaranteed to work everywhere.

For some in-depth discussions on the topic, see:
- https://mywiki.wooledge.org/BashFAQ/081
- https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then/85250#85250

Examples of open-source shells likely to be installed as /bin/sh on
Linux, which implement the 15-year-old standard: ash, bash, busybox,
dash, ksh, mksh and zsh.

Signed-off-by: Eli Schwartz <[email protected]>
autogen.sh Outdated Show resolved Hide resolved
Run autogen.sh as a dist script while creating the tarball. Also update
autogen.sh to detect when it is being run from `meson dist`, and use
that as the srcdir.

Signed-off-by: Eli Schwartz <[email protected]>
Copy link
Contributor

@dvrogozh dvrogozh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. @XinfengZhang : any objections to let this merged?

@XinfengZhang XinfengZhang merged commit a438699 into intel:master Feb 5, 2024
14 checks passed
@eli-schwartz eli-schwartz deleted the meson-dist branch April 3, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants