Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1256874 > unrolled thread

[PATCH 0/4] Add generator notes to generated files

Started byNicholas Mc Guire <hofrat@osadl.org>
First post2015-10-27 17:00 +0100
Last post2015-10-27 17:00 +0100
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/4] Add generator notes to generated files Nicholas Mc Guire <hofrat@osadl.org> - 2015-10-27 17:00 +0100
    [PATCH 4/4] Mark files generated by confdata.c Nicholas Mc Guire <hofrat@osadl.org> - 2015-10-27 17:00 +0100
      Re: [PATCH 4/4] Mark files generated by confdata.c Michal Marek <mmarek@suse.com> - 2015-10-27 22:20 +0100
        Re: [PATCH 4/4] Mark files generated by confdata.c Michal Marek <mmarek@suse.com> - 2015-10-28 09:10 +0100
        Re: [PATCH 4/4] Mark files generated by confdata.c Nicholas Mc Guire <der.herr@hofr.at> - 2015-10-28 09:10 +0100
    [PATCH 2/4] utsrelease.h: Make it clear where files are generated Nicholas Mc Guire <hofrat@osadl.org> - 2015-10-27 17:00 +0100

#1256874 — [PATCH 0/4] Add generator notes to generated files

FromNicholas Mc Guire <hofrat@osadl.org>
Date2015-10-27 17:00 +0100
Subject[PATCH 0/4] Add generator notes to generated files
Message-ID<qoePg-70a-3@gated-at.bofh.it>
Generated files have a number of sources and it is not always easy to track
down where a file is generated. Simplify this by simply putting the
generator into the top of the file as comment.                                  

This set adds generator notes to:
include/generated/uapi/linux/version.h
include/generated/utsrelease.h
include/generated/compile.h
include/generated/autoconf.h
include/config/tristate.conf
include/config/auto.conf

thx!
hofrat
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1256876 — [PATCH 4/4] Mark files generated by confdata.c

FromNicholas Mc Guire <hofrat@osadl.org>
Date2015-10-27 17:00 +0100
Subject[PATCH 4/4] Mark files generated by confdata.c
Message-ID<qoePg-70a-25@gated-at.bofh.it>
In reply to#1256874
scripts/kconfig/confdata.c generates a number of files - indicate the 
location of the generator in the file heading to ease reading the sources.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
This is no actual code change - compile-testing should thus do
checkpatch.pl will fuss about "WARNING: quoted string split across lines"
but it seems this is fine in this case given the initial code.

Compile tested with x86_64_defconfig

Patch is against 4.3-rc6 (localversion-next is  -next-20151022)

 scripts/kconfig/confdata.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 0b7dc2f..6a2be59 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -651,7 +651,8 @@ conf_write_heading(FILE *fp, struct conf_printer *printer, void *printer_arg)
 
 	snprintf(buf, sizeof(buf),
 	    "\n"
-	    "Automatically generated file; DO NOT EDIT.\n"
+	    "Automatically generated by scripts/kconfig/confdata.c:"
+	    " DO NOT EDIT.\n"
 	    "%s\n",
 	    rootmenu.prompt->text);
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1257258 — Re: [PATCH 4/4] Mark files generated by confdata.c

FromMichal Marek <mmarek@suse.com>
Date2015-10-27 22:20 +0100
SubjectRe: [PATCH 4/4] Mark files generated by confdata.c
Message-ID<qojOX-1Qn-51@gated-at.bofh.it>
In reply to#1256876
Dne 27.10.2015 v 16:30 Nicholas Mc Guire napsal(a):
> scripts/kconfig/confdata.c generates a number of files - indicate the 
> location of the generator in the file heading to ease reading the sources.
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
> This is no actual code change - compile-testing should thus do
> checkpatch.pl will fuss about "WARNING: quoted string split across lines"
> but it seems this is fine in this case given the initial code.
> 
> Compile tested with x86_64_defconfig
> 
> Patch is against 4.3-rc6 (localversion-next is  -next-20151022)
> 
>  scripts/kconfig/confdata.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index 0b7dc2f..6a2be59 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -651,7 +651,8 @@ conf_write_heading(FILE *fp, struct conf_printer *printer, void *printer_arg)
>  
>  	snprintf(buf, sizeof(buf),
>  	    "\n"
> -	    "Automatically generated file; DO NOT EDIT.\n"
> +	    "Automatically generated by scripts/kconfig/confdata.c:"
> +	    " DO NOT EDIT.\n"

You cannot run the C source to regenerate the file, so how about
"generated by kconfig"?

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1257751 — Re: [PATCH 4/4] Mark files generated by confdata.c

FromMichal Marek <mmarek@suse.com>
Date2015-10-28 09:10 +0100
SubjectRe: [PATCH 4/4] Mark files generated by confdata.c
Message-ID<qotXX-8vm-5@gated-at.bofh.it>
In reply to#1257258
Dne 28.10.2015 v 09:00 Nicholas Mc Guire napsal(a):
> On Tue, Oct 27, 2015 at 10:16:11PM +0100, Michal Marek wrote:
>> You cannot run the C source to regenerate the file, so how about
>> "generated by kconfig"?
>>
> Yup that makes more sense - and it would still point the reader into the
> right direction - will go check the other cases as well.

The other three patches looked OK to me at first glance.

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1257768 — Re: [PATCH 4/4] Mark files generated by confdata.c

FromNicholas Mc Guire <der.herr@hofr.at>
Date2015-10-28 09:10 +0100
SubjectRe: [PATCH 4/4] Mark files generated by confdata.c
Message-ID<qotXX-8vm-7@gated-at.bofh.it>
In reply to#1257258
On Tue, Oct 27, 2015 at 10:16:11PM +0100, Michal Marek wrote:
> Dne 27.10.2015 v 16:30 Nicholas Mc Guire napsal(a):
> > scripts/kconfig/confdata.c generates a number of files - indicate the 
> > location of the generator in the file heading to ease reading the sources.
> > 
> > Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> > ---
> > This is no actual code change - compile-testing should thus do
> > checkpatch.pl will fuss about "WARNING: quoted string split across lines"
> > but it seems this is fine in this case given the initial code.
> > 
> > Compile tested with x86_64_defconfig
> > 
> > Patch is against 4.3-rc6 (localversion-next is  -next-20151022)
> > 
> >  scripts/kconfig/confdata.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> > index 0b7dc2f..6a2be59 100644
> > --- a/scripts/kconfig/confdata.c
> > +++ b/scripts/kconfig/confdata.c
> > @@ -651,7 +651,8 @@ conf_write_heading(FILE *fp, struct conf_printer *printer, void *printer_arg)
> >  
> >  	snprintf(buf, sizeof(buf),
> >  	    "\n"
> > -	    "Automatically generated file; DO NOT EDIT.\n"
> > +	    "Automatically generated by scripts/kconfig/confdata.c:"
> > +	    " DO NOT EDIT.\n"
> 
> You cannot run the C source to regenerate the file, so how about
> "generated by kconfig"?
>
Yup that makes more sense - and it would still point the reader into the
right direction - will go check the other cases as well.

thx!
hofrat 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1256877 — [PATCH 2/4] utsrelease.h: Make it clear where files are generated

FromNicholas Mc Guire <hofrat@osadl.org>
Date2015-10-27 17:00 +0100
Subject[PATCH 2/4] utsrelease.h: Make it clear where files are generated
Message-ID<qoePg-70a-27@gated-at.bofh.it>
In reply to#1256874
Add a comment string in include/utsrelease.h that it was generated by the
top level Makefile.
 
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
This is no actual code change - compile-testing should thus do

Compile tested with x86_64_defconfig

Patch is against 4.3-rc6 (localversion-next is  -next-20151022)

 Makefile |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 8823501..e433a01 100644
--- a/Makefile
+++ b/Makefile
@@ -1017,7 +1017,8 @@ define filechk_utsrelease.h
 	  echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2;    \
 	  exit 1;                                                         \
 	fi;                                                               \
-	(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";)
+	(echo '/* Generated by top level Makefile */';                    \
+	echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";)
 endef
 
 define filechk_version.h
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web