lkml.org 
[lkml]   [2003]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[BK PATCH] build: config vs. everything else
I've long wondered why make {anything}config followed by building anything
else would rebuild a number of mostly unrelated things in scripts. So,
I dug into it (oh, what an ugly web...)

The Story:
The rules for config (and %config) depend on "scripts" which will build
basically everything in scripts. However, there are two problems with this.
First, *config only NEEDS fixdep. Second, the complete build environment is
not setup at config time, so the compiler settings are not consistant. To
illustrate the point, compare scripts/.empty.o.cmd after a "make config" and
"make image" (zImage, whatever)

The "bk send" is attached. Below is the diff. Excuse the "@/bin/true"...
It's the fastest way to get make to shutup.

--Ricky

--- 1.425/Makefile Tue Sep 2 15:13:35 2003
+++ 1.426/Makefile Fri Sep 5 22:25:25 2003
@@ -259,12 +259,13 @@

# Helpers built in scripts/

-scripts/docproc scripts/fixdep scripts/split-include : scripts ;
+scripts/docproc scripts/split-include : scripts ;

-.PHONY: scripts
+.PHONY: scripts scripts/fixdep
scripts:
$(Q)$(MAKE) $(build)=scripts
-
+scripts/fixdep:
+ $(Q)$(MAKE) $(build)=scripts fixdep

# To make sure we do not include .config for any of the *config targets
# catch them early, and hand them over to scripts/kconfig/Makefile
@@ -342,8 +343,8 @@

# If .config is newer than include/linux/autoconf.h, someone tinkered
# with it and forgot to run make oldconfig
-include/linux/autoconf.h: scripts/fixdep .config
- $(Q)$(MAKE) $(build)=scripts/kconfig silentoldconfig
+include/linux/autoconf.h: .config
+ $(Q)$(MAKE) -f $(TOPDIR)/Makefile silentoldconfig

endif

--- 1.34/scripts/Makefile Tue Mar 18 13:19:44 2003
+++ 1.35/scripts/Makefile Fri Sep 5 22:25:25 2003
@@ -22,6 +22,9 @@
# fixdep is needed to compile other host programs
$(addprefix $(obj)/,$(filter-out fixdep,$(always)) $(subdir-y)): $(obj)/fixdep

+fixdep: $(obj)/fixdep
+ @/bin/true
+
# dependencies on generated files need to be listed explicitly

$(obj)/modpost.o $(obj)/file2alias.o: $(obj)/elfconfig.h
@@ -33,3 +36,4 @@
$(call if_changed,elfconfig)

targets += elfconfig.h
+
--- 1.9/scripts/kconfig/Makefile Sun Aug 31 19:13:49 2003
+++ 1.10/scripts/kconfig/Makefile Fri Sep 5 22:25:25 2003
@@ -21,7 +21,7 @@
$< -o arch/$(ARCH)/Kconfig

silentoldconfig: $(obj)/conf
- $< -s arch/$(ARCH)/Kconfig
+ $(Q)$< -s arch/$(ARCH)/Kconfig

.PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig

--- 1.9/scripts/kconfig/conf.c Fri Jun 6 10:51:38 2003
+++ 1.10/scripts/kconfig/conf.c Fri Sep 5 22:25:25 2003
@@ -532,7 +532,8 @@
}
break;
case ask_silent:
- if (stat(".config", &tmpstat)) {
+ name = ".config";
+ if (stat(name, &tmpstat)) {
printf("***\n"
"*** You have not yet configured your kernel!\n"
"***\n"
@@ -541,6 +542,8 @@
"***\n");
exit(1);
}
+ conf_read(name);
+ break;
case ask_all:
case ask_new:
conf_read(NULL);
This BitKeeper patch contains the following changesets:
1.1165

# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jfbeam
# Host: troz.com
# Root: /usr/src/linux-2.6-bk

#
#--- 1.425/Makefile Tue Sep 2 15:13:35 2003
#+++ 1.426/Makefile Fri Sep 5 22:25:25 2003
#@@ -259,12 +259,13 @@
#
# # Helpers built in scripts/
#
#-scripts/docproc scripts/fixdep scripts/split-include : scripts ;
#+scripts/docproc scripts/split-include : scripts ;
#
#-.PHONY: scripts
#+.PHONY: scripts scripts/fixdep
# scripts:
# $(Q)$(MAKE) $(build)=scripts
#-
#+scripts/fixdep:
#+ $(Q)$(MAKE) $(build)=scripts fixdep
#
# # To make sure we do not include .config for any of the *config targets
# # catch them early, and hand them over to scripts/kconfig/Makefile
#@@ -342,8 +343,8 @@
#
# # If .config is newer than include/linux/autoconf.h, someone tinkered
# # with it and forgot to run make oldconfig
#-include/linux/autoconf.h: scripts/fixdep .config
#- $(Q)$(MAKE) $(build)=scripts/kconfig silentoldconfig
#+include/linux/autoconf.h: .config
#+ $(Q)$(MAKE) -f $(TOPDIR)/Makefile silentoldconfig
#
# endif
#
#
#--- 1.34/scripts/Makefile Tue Mar 18 13:19:44 2003
#+++ 1.35/scripts/Makefile Fri Sep 5 22:25:25 2003
#@@ -22,6 +22,9 @@
# # fixdep is needed to compile other host programs
# $(addprefix $(obj)/,$(filter-out fixdep,$(always)) $(subdir-y)): $(obj)/fixdep
#
#+fixdep: $(obj)/fixdep
#+ @/bin/true
#+
# # dependencies on generated files need to be listed explicitly
#
# $(obj)/modpost.o $(obj)/file2alias.o: $(obj)/elfconfig.h
#@@ -33,3 +36,4 @@
# $(call if_changed,elfconfig)
#
# targets += elfconfig.h
#+
#
#--- 1.9/scripts/kconfig/Makefile Sun Aug 31 19:13:49 2003
#+++ 1.10/scripts/kconfig/Makefile Fri Sep 5 22:25:25 2003
#@@ -21,7 +21,7 @@
# $< -o arch/$(ARCH)/Kconfig
#
# silentoldconfig: $(obj)/conf
#- $< -s arch/$(ARCH)/Kconfig
#+ $(Q)$< -s arch/$(ARCH)/Kconfig
#
# .PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig
#
#
#--- 1.9/scripts/kconfig/conf.c Fri Jun 6 10:51:38 2003
#+++ 1.10/scripts/kconfig/conf.c Fri Sep 5 22:25:25 2003
#@@ -532,7 +532,8 @@
# }
# break;
# case ask_silent:
#- if (stat(".config", &tmpstat)) {
#+ name = ".config";
#+ if (stat(name, &tmpstat)) {
# printf("***\n"
# "*** You have not yet configured your kernel!\n"
# "***\n"
#@@ -541,6 +542,8 @@
# "***\n");
# exit(1);
# }
#+ conf_read(name);
#+ break;
# case ask_all:
# case ask_new:
# conf_read(NULL);
#

# Diff checksum=6a129d6a


# Patch vers: 1.3
# Patch type: REGULAR

== ChangeSet ==
torvalds@athlon.transmeta.com|ChangeSet|20020205173056|16047|c1d11a41ed024864
jfbeam@troz.com|ChangeSet|20030906005754|14864
D 1.1165 03/09/05 22:25:56-04:00 jfbeam@troz.com +4 -0
B torvalds@athlon.transmeta.com|ChangeSet|20020205173056|16047|c1d11a41ed024864
C
c [PATCH] consistent "scripts" build
c
c The config targets depend on "scripts". However, fixdep is the only tool actually
c required. At config time, a full target build environment is not setup. Thus,
c scripts/empty.o (et. al.) will be recompiled between any target build and config
c build.
K 9834
P ChangeSet
------------------------------------------------

0a0
> torvalds@athlon.transmeta.com|scripts/Makefile|20020205174035|32289|96b950c69342ce77 jfbeam@troz.com|scripts/Makefile|20030906022525|41592
> zippel@linux-m68k.org[torvalds]|scripts/kconfig/Makefile|20021030043213|15288|5bd1152661e7e933 jfbeam@troz.com|scripts/kconfig/Makefile|20030906022525|32220
> torvalds@athlon.transmeta.com|Makefile|20020205173938|00876|d6ad9c1a8d595a5 jfbeam@troz.com|Makefile|20030906022525|14573
> zippel@linux-m68k.org[torvalds]|scripts/kconfig/conf.c|20021030043213|26561|8b9d1e0a36adabb5 jfbeam@troz.com|scripts/kconfig/conf.c|20030906022525|01802

== Makefile ==
torvalds@athlon.transmeta.com|Makefile|20020205173938|00876|d6ad9c1a8d595a5
jfbeam@spacemeat.troz.com|Makefile|20030902191335|12400
D 1.426 03/09/05 22:25:25-04:00 jfbeam@troz.com +6 -5
B torvalds@athlon.transmeta.com|ChangeSet|20020205173056|16047|c1d11a41ed024864
C
c separate fixdep from "scripts" and make it an independant target
K 14573
O -rw-rw-r--
P Makefile
------------------------------------------------

D262 1
I262 1
scripts/docproc scripts/split-include : scripts ;
D264 1
I264 1
.PHONY: scripts scripts/fixdep
D267 1
I267 2
scripts/fixdep:
$(Q)$(MAKE) $(build)=scripts fixdep
D345 2
I346 2
include/linux/autoconf.h: .config
$(Q)$(MAKE) -f $(TOPDIR)/Makefile silentoldconfig

== scripts/Makefile ==
torvalds@athlon.transmeta.com|scripts/Makefile|20020205174035|32289|96b950c69342ce77
jsimmons@maxwell.earthlink.net|scripts/Makefile|20030318181944|38775
D 1.35 03/09/05 22:25:25-04:00 jfbeam@troz.com +4 -0
B torvalds@athlon.transmeta.com|ChangeSet|20020205173056|16047|c1d11a41ed024864
C
c fixdep target
K 41592
O -rw-rw-r--
P scripts/Makefile
------------------------------------------------

I24 3
fixdep: $(obj)/fixdep
@/bin/true
\
I35 1
\

== scripts/kconfig/Makefile ==
zippel@linux-m68k.org[torvalds]|scripts/kconfig/Makefile|20021030043213|15288|5bd1152661e7e933
akpm@osdl.org[torvalds]|scripts/kconfig/Makefile|20030901012535|32022
D 1.10 03/09/05 22:25:25-04:00 jfbeam@troz.com +1 -1
B torvalds@athlon.transmeta.com|ChangeSet|20020205173056|16047|c1d11a41ed024864
C
c make silentoldconfig obey KBUILD_VERBOSE
K 32220
O -rw-rw-r--
P scripts/kconfig/Makefile
------------------------------------------------

D24 1
I24 1
$(Q)$< -s arch/$(ARCH)/Kconfig

== scripts/kconfig/conf.c ==
zippel@linux-m68k.org[torvalds]|scripts/kconfig/conf.c|20021030043213|26561|8b9d1e0a36adabb5
zippel@linux-m68k.org[torvalds]|scripts/kconfig/conf.c|20030606151850|64174
D 1.10 03/09/05 22:25:25-04:00 jfbeam@troz.com +4 -1
B torvalds@athlon.transmeta.com|ChangeSet|20020205173056|16047|c1d11a41ed024864
C
c make silentoldconfig actually silent
K 1802
O -rw-rw-r--
P scripts/kconfig/conf.c
------------------------------------------------

D535 1
I535 2
name = ".config";
if (stat(name, &tmpstat)) {
I543 2
conf_read(name);
break;

# Patch checksum=b46c30de
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.037 / U:1.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site