All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Schier <nicolas@fjasle.eu>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"
Date: Tue, 29 Aug 2023 08:16:52 +0200	[thread overview]
Message-ID: <ZO2NVLipjlzIh0YS@bergen.fjasle.eu> (raw)
In-Reply-To: <87ttsjlmho.fsf@mail.lhotse>

[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]

On Mon 28 Aug 2023 16:17:07 GMT, Michael Ellerman wrote:
> Masahiro Yamada <masahiroy@kernel.org> writes:
> > On Sat, Aug 26, 2023 at 4:55 AM Kees Cook <keescook@chromium.org> wrote:
> >>
> >> Hi,
> >>
> >> This is my series to show *.config targets in the "help" target so these
> >> various topics can be more easily discoverd.
> >>
> >> v2:
> >>  - split .fragment from .config to hide "internal" fragments
> >
> > Please do not do this churn.
> 
> That was my idea :}
> 
> > Like Randy, I did not get "why" part quiet well,
> > but if you are eager about this,
> > you can show help message only when the following
> > ("# Help:" prefix for example) is found in the first line.
> >
> > # Help: blah blah
> > # other comment
> 
> I did think of that, but wasn't sure how to do it in make.

Something like this should do it:

	@grep -Hnm1 -e '^# Help:' $(foreach f, $(sort $(notdir $(call configfiles,*.config))), $(firstword $(call configfiles,$(f)))) | \
	 while read loc dummy helptext; do \
		tmp="$${loc%:#}"; file="$${tmp%:*}"; line="$${tmp##*:}"; \
		[ "$${line}" = "1" ] && \
		  printf "  %-25s - %s\\n" "$${file##*/}" "$${helptext}"; \
	 done

but this neither beautiful nor elegant it likes to be improved.

Kind regards,
Nicolas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Schier <nicolas@fjasle.eu>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"
Date: Tue, 29 Aug 2023 08:16:52 +0200	[thread overview]
Message-ID: <ZO2NVLipjlzIh0YS@bergen.fjasle.eu> (raw)
In-Reply-To: <87ttsjlmho.fsf@mail.lhotse>


[-- Attachment #1.1: Type: text/plain, Size: 1284 bytes --]

On Mon 28 Aug 2023 16:17:07 GMT, Michael Ellerman wrote:
> Masahiro Yamada <masahiroy@kernel.org> writes:
> > On Sat, Aug 26, 2023 at 4:55 AM Kees Cook <keescook@chromium.org> wrote:
> >>
> >> Hi,
> >>
> >> This is my series to show *.config targets in the "help" target so these
> >> various topics can be more easily discoverd.
> >>
> >> v2:
> >>  - split .fragment from .config to hide "internal" fragments
> >
> > Please do not do this churn.
> 
> That was my idea :}
> 
> > Like Randy, I did not get "why" part quiet well,
> > but if you are eager about this,
> > you can show help message only when the following
> > ("# Help:" prefix for example) is found in the first line.
> >
> > # Help: blah blah
> > # other comment
> 
> I did think of that, but wasn't sure how to do it in make.

Something like this should do it:

	@grep -Hnm1 -e '^# Help:' $(foreach f, $(sort $(notdir $(call configfiles,*.config))), $(firstword $(call configfiles,$(f)))) | \
	 while read loc dummy helptext; do \
		tmp="$${loc%:#}"; file="$${tmp%:*}"; line="$${tmp##*:}"; \
		[ "$${line}" = "1" ] && \
		  printf "  %-25s - %s\\n" "$${file##*/}" "$${helptext}"; \
	 done

but this neither beautiful nor elegant it likes to be improved.

Kind regards,
Nicolas

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Schier <nicolas@fjasle.eu>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-s390@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>,
	Kees Cook <keescook@chromium.org>,
	linux-kbuild@vger.kernel.org,
	Masahiro Yamada <masahiroy@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org, linux-riscv@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"
Date: Tue, 29 Aug 2023 08:16:52 +0200	[thread overview]
Message-ID: <ZO2NVLipjlzIh0YS@bergen.fjasle.eu> (raw)
In-Reply-To: <87ttsjlmho.fsf@mail.lhotse>

[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]

On Mon 28 Aug 2023 16:17:07 GMT, Michael Ellerman wrote:
> Masahiro Yamada <masahiroy@kernel.org> writes:
> > On Sat, Aug 26, 2023 at 4:55 AM Kees Cook <keescook@chromium.org> wrote:
> >>
> >> Hi,
> >>
> >> This is my series to show *.config targets in the "help" target so these
> >> various topics can be more easily discoverd.
> >>
> >> v2:
> >>  - split .fragment from .config to hide "internal" fragments
> >
> > Please do not do this churn.
> 
> That was my idea :}
> 
> > Like Randy, I did not get "why" part quiet well,
> > but if you are eager about this,
> > you can show help message only when the following
> > ("# Help:" prefix for example) is found in the first line.
> >
> > # Help: blah blah
> > # other comment
> 
> I did think of that, but wasn't sure how to do it in make.

Something like this should do it:

	@grep -Hnm1 -e '^# Help:' $(foreach f, $(sort $(notdir $(call configfiles,*.config))), $(firstword $(call configfiles,$(f)))) | \
	 while read loc dummy helptext; do \
		tmp="$${loc%:#}"; file="$${tmp%:*}"; line="$${tmp##*:}"; \
		[ "$${line}" = "1" ] && \
		  printf "  %-25s - %s\\n" "$${file##*/}" "$${helptext}"; \
	 done

but this neither beautiful nor elegant it likes to be improved.

Kind regards,
Nicolas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Schier <nicolas@fjasle.eu>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"
Date: Tue, 29 Aug 2023 08:16:52 +0200	[thread overview]
Message-ID: <ZO2NVLipjlzIh0YS@bergen.fjasle.eu> (raw)
In-Reply-To: <87ttsjlmho.fsf@mail.lhotse>


[-- Attachment #1.1: Type: text/plain, Size: 1284 bytes --]

On Mon 28 Aug 2023 16:17:07 GMT, Michael Ellerman wrote:
> Masahiro Yamada <masahiroy@kernel.org> writes:
> > On Sat, Aug 26, 2023 at 4:55 AM Kees Cook <keescook@chromium.org> wrote:
> >>
> >> Hi,
> >>
> >> This is my series to show *.config targets in the "help" target so these
> >> various topics can be more easily discoverd.
> >>
> >> v2:
> >>  - split .fragment from .config to hide "internal" fragments
> >
> > Please do not do this churn.
> 
> That was my idea :}
> 
> > Like Randy, I did not get "why" part quiet well,
> > but if you are eager about this,
> > you can show help message only when the following
> > ("# Help:" prefix for example) is found in the first line.
> >
> > # Help: blah blah
> > # other comment
> 
> I did think of that, but wasn't sure how to do it in make.

Something like this should do it:

	@grep -Hnm1 -e '^# Help:' $(foreach f, $(sort $(notdir $(call configfiles,*.config))), $(firstword $(call configfiles,$(f)))) | \
	 while read loc dummy helptext; do \
		tmp="$${loc%:#}"; file="$${tmp%:*}"; line="$${tmp##*:}"; \
		[ "$${line}" = "1" ] && \
		  printf "  %-25s - %s\\n" "$${file##*/}" "$${helptext}"; \
	 done

but this neither beautiful nor elegant it likes to be improved.

Kind regards,
Nicolas

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-08-29  6:25 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 19:47 [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help" Kees Cook
2023-08-25 19:47 ` Kees Cook
2023-08-25 19:47 ` Kees Cook
2023-08-25 19:47 ` Kees Cook
2023-08-25 19:47 ` [PATCH v2 1/2] " Kees Cook
2023-08-25 19:47   ` Kees Cook
2023-08-25 19:47   ` Kees Cook
2023-08-25 19:47   ` Kees Cook
2023-08-25 19:47 ` [PATCH v2 2/2] kbuild: Split internal config targets from .config into .fragment Kees Cook
2023-08-25 19:47   ` Kees Cook
2023-08-25 19:47   ` Kees Cook
2023-08-25 19:47   ` Kees Cook
2023-08-28  1:03 ` [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help" Masahiro Yamada
2023-08-28  1:03   ` Masahiro Yamada
2023-08-28  1:03   ` Masahiro Yamada
2023-08-28  1:03   ` Masahiro Yamada
2023-08-28  6:17   ` Michael Ellerman
2023-08-28  6:17     ` Michael Ellerman
2023-08-28  6:17     ` Michael Ellerman
2023-08-28  6:17     ` Michael Ellerman
2023-08-29  6:16     ` Nicolas Schier [this message]
2023-08-29  6:16       ` Nicolas Schier
2023-08-29  6:16       ` Nicolas Schier
2023-08-29  6:16       ` Nicolas Schier
2023-08-29 14:57       ` Masahiro Yamada
2023-08-29 14:57         ` Masahiro Yamada
2023-08-29 14:57         ` Masahiro Yamada
2023-08-29 14:57         ` Masahiro Yamada
2023-08-29 20:07         ` Nicolas Schier
2023-08-29 20:07           ` Nicolas Schier
2023-08-29 20:07           ` Nicolas Schier
2023-08-29 20:07           ` Nicolas Schier
2023-08-31  0:03         ` Kees Cook
2023-08-31  0:03           ` Kees Cook
2023-08-31  0:03           ` Kees Cook
2023-08-31  0:03           ` Kees Cook
2023-08-31 15:45           ` Masahiro Yamada
2023-08-31 15:45             ` Masahiro Yamada
2023-08-31 15:45             ` Masahiro Yamada
2023-08-31 15:45             ` Masahiro Yamada

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=ZO2NVLipjlzIh0YS@bergen.fjasle.eu \
    --to=nicolas@fjasle.eu \
    --cc=christophe.leroy@csgroup.eu \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=masahiroy@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=rdunlap@infradead.org \
    --cc=x86@kernel.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.