-
Notifications
You must be signed in to change notification settings - Fork 555
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
Configure improvements #4316
Configure improvements #4316
Conversation
This fixes the following warning: $ autoconf configure.ac:306: warning: AC_OUTPUT should be used without arguments. configure.ac:306: You should run autoupdate. Environment: $ grep '^NAME' /etc/os-release NAME="Artix Linux" $ pacman -Q autoconf autoconf 2.71-1 Though keep `AC_PREREQ` at 2.68 (released on 2010-09-23[1]), as version 2.71 (which autoupdate automatically bumps to) is rather recent (released on 2021-01-28[2]) and the changes do not appear to require a version bump, as on `AC_INIT` it only adds some quotes, and the rest of the changes are consistent with the autoconf 2.68 manual. From Section 18.4, Obsolete Macros[3]: > — Macro: AC_OUTPUT ([file]..., [extra-cmds], [init-cmds]) > > The use of AC_OUTPUT with arguments is deprecated. This obsoleted > interface is equivalent to: > > AC_CONFIG_FILES(file...) > AC_CONFIG_COMMANDS([default], > extra-cmds, init-cmds) > AC_OUTPUT > > See AC_CONFIG_FILES, AC_CONFIG_COMMANDS, and AC_OUTPUT. Note: The usage of the above format has been present since the inception of configure.ac, on commit 1379851 ("Baseline firejail 0.9.28"). Misc: This is a continuation of netblue30#4293. [1] https://lists.gnu.org/archive/html/info-gnu/2010-09/msg00013.html [2] https://lists.gnu.org/archive/html/autoconf/2021-01/msg00126.html [3] https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Obsolete-Macros.html#index-AC_005fOUTPUT-2058
For simplicity and increased portability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
echo " Always enforce filters: $HAVE_FORCE_NONEWPRIVS" | ||
echo | ||
if test "$HAVE_LTS" = -DHAVE_LTS; then | ||
cat <<\EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDK what the backslash does on a HERE-document, but what about using -
and indented body?
if test "$HAVE_LTS" = -DHAVE_LTS; then
cat <<-EOF
*********************************************************
* Warning: Long-term support (LTS) was enabled! *
* Most compile-time options have bean rewritten! *
*********************************************************
EOF
fi
@reinerh reviewed 1 hour ago:
Yes, I use it "defensively" when there is no expansion needed, to ensure that Example: $ cat <<\EOF
Hello from $SHELL
EOF
Hello from $SHELL
$ cat <<EOF
Hello from $SHELL
EOF
Hello from /bin/bash I'd say it's similar to using single quotes instead of double quotes for Interestingly, the POSIX spec only mentions "quoting"[1]:
But apparently the backslash also counts as quoting (besides single and double
I use this form because from what I remember reading a long time ago, this is I just looked at $ git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
$ grep -F 'cat <<' configure
cat <<_ACEOF
cat <<\_ACEOF
cat <<\_ACEOF
cat <<\_ACEOF
cat <<_ASUNAME
$ @rusty-snake 1 hour ago:
See above.
Avoiding all indentation that is not intended to be printed appears to be the usage() {
cat <<EOF
Usage: $(basename "$0") [-a] [-f] FILE
Do foo with FILE.
OPTIONS
-a Include all
-f Force
EOF
} I'm not really sure if this is also done because of portability, but I could see
To keep the code readable/within a reasonable line length, etc.
For example, to avoid dealing with potential indentation issues between shells [1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04 |
Let's grab it, looks fine! |
For increased consistency and readability. This restores the spaces removed on commit bf81cd6 ("configure.ac: run autoupdate to fix autoconf warning") / PR netblue30#4316. Command used to check for the lack of whitespace: grep ',[^ ]' configure.ac
$ git log --reverse --pretty='%s%n%n%b%n-----%n' master..HEAD
configure.ac: run autoupdate to fix autoconf warning
This fixes the following warning:
Environment:
Though keep
AC_PREREQ
at 2.68 (released on 2010-09-23[1]), as version2.71 (which autoupdate automatically bumps to) is rather recent
(released on 2021-01-28[2]) and the changes do not appear to require a
version bump, as on
AC_INIT
it only adds some quotes, and the rest ofthe changes are consistent with the autoconf 2.68 manual. From Section
18.4, Obsolete Macros[3]:
Note: The usage of the above format has been present since the inception
of configure.ac, on commit 1379851 ("Baseline firejail 0.9.28").
Misc: This is a continuation of #4293.
[1] https://lists.gnu.org/archive/html/info-gnu/2010-09/msg00013.html
[2] https://lists.gnu.org/archive/html/autoconf/2021-01/msg00126.html
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Obsolete-Macros.html#index-AC_005fOUTPUT-2058
configure*: use cat instead of many echoes
For simplicity and increased portability.