[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1321569446-20433-2-git-send-email-hpa@linux.intel.com>
Date: Thu, 17 Nov 2011 14:37:19 -0800
From: "H. Peter Anvin" <hpa@...ux.intel.com>
To: linux-kernel@...r.kernel.org, kbuild@...r.kernel.org,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>
Cc: "H.J. Lu" <hjl.tools@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Michal Marek <mmarek@...e.cz>, Sam Ravnborg <sam@...nborg.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
"H. Peter Anvin" <hpa@...ux.intel.com>
Subject: [PATCH 1/8] kbuild: Add support for installing generated asm headers
From: "H. Peter Anvin" <hpa@...ux.intel.com>
Generated asm headers are supposed to live in
arch/*/include/generated/asm, but objhdr-y expect them to live in the
same directory they are generated in. Instead of trying to cut that
particular Gordian knot, introduce genhdr-y that takes this into
account; the sole user of objhdr-y, linux/version.h, should be
migrated over at some later date.
Suggested-by: David Woodhouse <dwmw2@...radead.org>
Acked-by: David Woodhouse <dwmw2@...radead.org>
Cc: Sam Ravnborg <sam@...nborg.org>
Cc: Michal Marek <mmarek@...e.cz>
Signed-off-by: H. Peter Anvin <hpa@...ux.intel.com>
---
scripts/Makefile.headersinst | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index a57f5bd..d3bae5e 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -4,12 +4,16 @@
# header-y - list files to be installed. They are preprocessed
# to remove __KERNEL__ section of the file
# objhdr-y - Same as header-y but for generated files
+# genhdr-y - Same as objhdr-y but in a generated/ directory
#
# ==========================================================================
# called may set destination dir (when installing to asm/)
_dst := $(if $(dst),$(dst),$(obj))
+# generated header directory
+gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj)))
+
kbuild-file := $(srctree)/$(obj)/Kbuild
include $(kbuild-file)
@@ -33,9 +37,10 @@ wrapper-files := $(filter $(header-y), $(generic-y))
# all headers files for this dir
header-y := $(filter-out $(generic-y), $(header-y))
-all-files := $(header-y) $(objhdr-y) $(wrapper-files)
+all-files := $(header-y) $(objhdr-y) $(genhdr-y) $(wrapper-files)
input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \
- $(addprefix $(objtree)/$(obj)/,$(objhdr-y))
+ $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) \
+ $(addprefix $(objtree)/$(gen)/,$(genhdr-y))
output-files := $(addprefix $(install)/, $(all-files))
# Work out what needs to be removed
@@ -52,6 +57,7 @@ quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
cmd_install = \
$(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \
$(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \
+ $(PERL) $< $(objtree)/$(gen) $(install) $(SRCARCH) $(genhdr-y); \
for F in $(wrapper-files); do \
echo "\#include <asm-generic/$$F>" > $(install)/$$F; \
done; \
--
1.7.6.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists