kbuild: Build minimum in scripts/ when changing configuration

Sam Ravnborg
2003-09-10T19:39:36Z

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1270 -> 1.1271
# Makefile 1.427 -> 1.428
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/10 sam@mars.ravnborg.org 1.1271
# kbuild: Build minimum in scripts/ when changing configuration
#
# From: Ricky Beam <jfbeam@bluetronic.net>, me
#
# With the increasing amount of programs located in scripts/, several
# of which is dependent on the kernel configuration, it makes sense to
# avoid building these too often.
# With this patch only fixdep is build, the minimal requirement for running
# any *config target
# --------------------------------------------
#
diff -Nru a/Makefile b/Makefile
--- a/Makefile Wed Sep 10 21:15:44 2003
+++ b/Makefile Wed Sep 10 21:15:44 2003
@@ -253,12 +253,15 @@

# 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 $@
+

# 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
@@ -336,8 +339,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 $(srctree)/Makefile silentoldconfig

endif