Re: kbuild: Separate output directory - include patch

From: Sam Ravnborg
Date: Tue Aug 19 2003 - 16:59:16 EST


# 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.1272 -> 1.1273
# kernel/Makefile 1.32 -> 1.33
# scripts/genksyms/Makefile 1.3 -> 1.4
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/08/19 sam@xxxxxxxxxxxxxxxxx 1.1273
# kbuild: Fix build with seperate output directory
#
# Build rule for ikconfig updated.
# Include directive for genksyms updated
# --------------------------------------------
#
diff -Nru a/kernel/Makefile b/kernel/Makefile
--- a/kernel/Makefile Tue Aug 19 23:41:31 2003
+++ b/kernel/Makefile Tue Aug 19 23:41:31 2003
@@ -20,8 +20,6 @@
obj-$(CONFIG_COMPAT) += compat.o
obj-$(CONFIG_IKCONFIG) += configs.o

-# files to be removed upon make clean
-clean-files := ikconfig.h

ifneq ($(CONFIG_IA64),y)
# According to Alan Modra <alan@xxxxxxxxxxxxxxxx>, the -fno-omit-frame-pointer is
@@ -32,8 +30,13 @@
CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer
endif

-$(obj)/ikconfig.h: scripts/mkconfigs .config Makefile
- $(CONFIG_SHELL) scripts/mkconfigs .config Makefile > $(obj)/ikconfig.h
+quiet_cmd_ikconfig = IKCFG $@
+ cmd_ikconfig = $(CONFIG_SHELL) $< .config $(srctree)/Makefile > $@
+
+targets := ikconfig.h
+
+$(obj)/ikconfig.h: scripts/mkconfigs .config Makefile FORCE
+ $(call if_changed,ikconfig)

$(obj)/configs.o: $(obj)/ikconfig.h $(obj)/configs.c \
include/linux/version.h include/linux/compile.h
diff -Nru a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile
--- a/scripts/genksyms/Makefile Tue Aug 19 23:41:31 2003
+++ b/scripts/genksyms/Makefile Tue Aug 19 23:41:31 2003
@@ -3,13 +3,14 @@
always := $(host-progs)

genksyms-objs := genksyms.o parse.o lex.o
-
-HOSTCFLAGS_parse.o := -Wno-uninitialized
+# -I needed for generated C source (shipped source)
+HOSTCFLAGS_parse.o := -Wno-uninitialized -I$(obj)

# dependencies on generated files need to be listed explicitly

$(obj)/lex.o: $(obj)/parse.h $(obj)/keywords.c
-
+# -I needed for generated C source (shipped source)
+HOSTCFLAGS_lex.o := -I$(obj)

ifdef GENERATE_PARSER

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