* [PATCH 0/4] Add generator notes to generated files
@ 2015-10-27 15:30 Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 1/4] version.h: Make it clear where the files was generated Nicholas Mc Guire
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Nicholas Mc Guire @ 2015-10-27 15:30 UTC (permalink / raw
To: Michal Marek; +Cc: Yann E. MORIN, linux-kbuild, linux-kernel, Nicholas Mc Guire
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/4] version.h: Make it clear where the files was generated
2015-10-27 15:30 [PATCH 0/4] Add generator notes to generated files Nicholas Mc Guire
@ 2015-10-27 15:30 ` Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 2/4] utsrelease.h: Make it clear where files are generated Nicholas Mc Guire
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Nicholas Mc Guire @ 2015-10-27 15:30 UTC (permalink / raw
To: Michal Marek; +Cc: Yann E. MORIN, linux-kbuild, linux-kernel, Nicholas Mc Guire
Add a comment string in include/generated/uapi/linux/version.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 1fdd906..8823501 100644
--- a/Makefile
+++ b/Makefile
@@ -1021,7 +1021,8 @@ define filechk_utsrelease.h
endef
define filechk_version.h
- (echo \#define LINUX_VERSION_CODE $(shell \
+ (echo '/* Generated by top level Makefile */'; \
+ echo \#define LINUX_VERSION_CODE $(shell \
expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
endef
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] utsrelease.h: Make it clear where files are generated
2015-10-27 15:30 [PATCH 0/4] Add generator notes to generated files Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 1/4] version.h: Make it clear where the files was generated Nicholas Mc Guire
@ 2015-10-27 15:30 ` Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 3/4] mkcompile_h: add the generator location to compile.h Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 4/4] Mark files generated by confdata.c Nicholas Mc Guire
3 siblings, 0 replies; 8+ messages in thread
From: Nicholas Mc Guire @ 2015-10-27 15:30 UTC (permalink / raw
To: Michal Marek; +Cc: Yann E. MORIN, linux-kbuild, linux-kernel, Nicholas Mc Guire
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/4] mkcompile_h: add the generator location to compile.h
2015-10-27 15:30 [PATCH 0/4] Add generator notes to generated files Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 1/4] version.h: Make it clear where the files was generated Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 2/4] utsrelease.h: Make it clear where files are generated Nicholas Mc Guire
@ 2015-10-27 15:30 ` Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 4/4] Mark files generated by confdata.c Nicholas Mc Guire
3 siblings, 0 replies; 8+ messages in thread
From: Nicholas Mc Guire @ 2015-10-27 15:30 UTC (permalink / raw
To: Michal Marek; +Cc: Yann E. MORIN, linux-kbuild, linux-kernel, Nicholas Mc Guire
Make it clear what script is generating compile.h
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)
scripts/mkcompile_h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 6fdc97e..16987f1 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -66,7 +66,7 @@ UTS_TRUNCATE="cut -b -$UTS_LEN"
# Generate a temporary compile.h
-( echo /\* This file is auto generated, version $VERSION \*/
+( echo /\* This file is auto generated by scripts/mkcompile_h, version $VERSION \*/
if [ -n "$CONFIG_FLAGS" ] ; then echo "/* $CONFIG_FLAGS */"; fi
echo \#define UTS_MACHINE \"$ARCH\"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] Mark files generated by confdata.c
2015-10-27 15:30 [PATCH 0/4] Add generator notes to generated files Nicholas Mc Guire
` (2 preceding siblings ...)
2015-10-27 15:30 ` [PATCH 3/4] mkcompile_h: add the generator location to compile.h Nicholas Mc Guire
@ 2015-10-27 15:30 ` Nicholas Mc Guire
2015-10-27 21:16 ` Michal Marek
3 siblings, 1 reply; 8+ messages in thread
From: Nicholas Mc Guire @ 2015-10-27 15:30 UTC (permalink / raw
To: Michal Marek; +Cc: Yann E. MORIN, linux-kbuild, linux-kernel, Nicholas Mc Guire
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] Mark files generated by confdata.c
2015-10-27 15:30 ` [PATCH 4/4] Mark files generated by confdata.c Nicholas Mc Guire
@ 2015-10-27 21:16 ` Michal Marek
2015-10-28 8:00 ` Nicholas Mc Guire
0 siblings, 1 reply; 8+ messages in thread
From: Michal Marek @ 2015-10-27 21:16 UTC (permalink / raw
To: Nicholas Mc Guire; +Cc: Yann E. MORIN, linux-kbuild, linux-kernel
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] Mark files generated by confdata.c
2015-10-27 21:16 ` Michal Marek
@ 2015-10-28 8:00 ` Nicholas Mc Guire
2015-10-28 8:03 ` Michal Marek
0 siblings, 1 reply; 8+ messages in thread
From: Nicholas Mc Guire @ 2015-10-28 8:00 UTC (permalink / raw
To: Michal Marek; +Cc: Nicholas Mc Guire, Yann E. MORIN, linux-kbuild, linux-kernel
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] Mark files generated by confdata.c
2015-10-28 8:00 ` Nicholas Mc Guire
@ 2015-10-28 8:03 ` Michal Marek
0 siblings, 0 replies; 8+ messages in thread
From: Michal Marek @ 2015-10-28 8:03 UTC (permalink / raw
To: Nicholas Mc Guire
Cc: Nicholas Mc Guire, Yann E. MORIN, linux-kbuild, linux-kernel
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-10-28 8:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-27 15:30 [PATCH 0/4] Add generator notes to generated files Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 1/4] version.h: Make it clear where the files was generated Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 2/4] utsrelease.h: Make it clear where files are generated Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 3/4] mkcompile_h: add the generator location to compile.h Nicholas Mc Guire
2015-10-27 15:30 ` [PATCH 4/4] Mark files generated by confdata.c Nicholas Mc Guire
2015-10-27 21:16 ` Michal Marek
2015-10-28 8:00 ` Nicholas Mc Guire
2015-10-28 8:03 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).