Skip to contentSkip to conversation

Teach kbuild to pull files from BK repository

PATCH In review David Dillow 1 participant 1 message Dec 5, 2003

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 Teach kbuild to pull files from BK repository

# 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.1504 -> 1.1505
# Makefile 1.439 -> 1.440
# scripts/Makefile.build 1.41 -> 1.42
# drivers/scsi/aic7xxx/Makefile 1.21 -> 1.22
# scripts/kconfig/Makefile 1.10 -> 1.11

#	               (new)	        -> 1.1     scripts/getfiles
#	               (new)	        -> 1.1     scripts/Makefile.repo

#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/12/03 [email protected] 1.1505
# Teach the kbuild system how to pull needed files from the repository. # With this, you can copy your config into a clean repository, type # make, and it will build the kernel, retrieving any needed files that

# have not yet been checked out.
#         
# We cannot use make's default implicit rules to do this, as we do
# not list the dependencies for each file in the Makefiles, nor do we
# want to. Therefore, we use the getfiles script to parse error
# messages from a gcc -E run to determine which files are missing.
#         
# This does not handle Kconfig files yet, only the source files.
# --------------------------------------------
#
diff -Nru a/Makefile b/Makefile
--- a/Makefile	Thu Dec  4 00:24:49 2003
+++ b/Makefile	Thu Dec  4 00:24:49 2003
@@ -937,6 +937,36 @@
 endif #ifeq ($(config-targets),1)
 endif #ifeq ($(mixed-targets),1)

+
+# Rules to automatically check files out of the repository during build +# =========================================================================== +
+# Command to use to perform actual pull of a file from the repository +GET = get
+export GET
+
+# Need this rule so that getfiles will get the proper CFLAGS to complete +# its dependency checkout
+arch/$(ARCH)/kernel/asm-offsets.c: include/config/MARKER
+ $(Q)$(MAKE) $(build)=$(@D) $@
+
+# $(kbuild_base_files) lists the files we need to have pulled from the +# repository before we start doing anything else in order correctly build +
+kbuild_base_files := scripts/Makefile.build scripts/Makefile.lib +kbuild_base_files += scripts/Makefile.modpost scripts/Makefile.modinst +kbuild_base_files += scripts/Makefile.repo scripts/mkversion +kbuild_base_files += scripts/getfiles scripts/mkcompile_h
+
+# This rule will ensure these files exist, or are pulled from the repository +.get_kbuild_files.d: $(kbuild_base_files)
+ $(Q)touch .get_kbuild_files.d
+
+-include .get_kbuild_files.d
+
+include $(srctree)/scripts/Makefile.repo
+
+
# FIXME Should go into a make.lib or something
# ===========================================================================

drivers/scsi/aic7xxx/Makefile +0 -2
diff -Nru a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile
@@ -44,8 +44,6 @@
 
 $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h
 $(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h
-$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped
-$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped
 
 $(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_reg.h
 $(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_reg.h
scripts/Makefile.build +2 -0
diff -Nru a/scripts/Makefile.build b/scripts/Makefile.build
@@ -24,6 +24,8 @@
 endif
 
 
+include scripts/Makefile.repo
+
 ifdef EXTRA_TARGETS
 $(warning kbuild: $(obj)/Makefile - Usage of EXTRA_TARGETS is obsolete in 2.6. Please fix!)
 endif
scripts/Makefile.repo new file +124 -0

124 lines not on this page · raw message

scripts/getfiles new file +245 -0

245 lines not on this page · raw message

scripts/kconfig/Makefile +4 -1
diff -Nru a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
@@ -139,7 +139,10 @@
 -include $(obj)/.tmp_gtkcheck
 
 # GTK needs some extra effort, too...
-$(obj)/.tmp_gtkcheck:
+# ... and some extra files from the repository. It doesn't really depend
+# on gconf.glade, but it won't hurt to re-run .tmp_gtkcheck, and this
+# is a convienient place to tell make it is needed from the repository
+$(obj)/.tmp_gtkcheck: $(obj)/gconf.glade
 	@if `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --exists`; then		\
 		if `pkg-config gtk+-2.0 --atleast-version=2.0.0`; then			\
 			touch $@;								\