forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kbuild: full dependency check on asm-offsets.h
Building asm-offsets.h has been moved to a seperate Kbuild file located in the top-level directory. This allow us to share the functionality across the architectures. The old rules in architecture specific Makefiles will die in subsequent patches. Furhtermore the usual kbuild dependency tracking is now used when deciding to rebuild asm-offsets.s. So we no longer risk to fail a rebuild caused by asm-offsets.c dependencies being touched. With this common rule-set we now force the same name across all architectures. Following patches will fix the rest. Signed-off-by: Sam Ravnborg <[email protected]>
- Loading branch information
Sam Ravnborg
committed
Sep 9, 2005
1 parent
8920e8f
commit 86feeaa
Showing
8 changed files
with
57 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# Kbuild for top-level directory of the kernel | ||
# This file takes care of the following: | ||
# 1) Generate asm-offsets.h | ||
|
||
##### | ||
# 1) Generate asm-offsets.h | ||
# | ||
|
||
offsets-file := include/asm-$(ARCH)/asm-offsets.h | ||
|
||
always := $(offsets-file) | ||
targets := $(offsets-file) | ||
targets += arch/$(ARCH)/kernel/asm-offsets.s | ||
|
||
quiet_cmd_offsets = GEN $@ | ||
define cmd_offsets | ||
cat $< | \ | ||
(set -e; \ | ||
echo "#ifndef __ASM_OFFSETS_H__"; \ | ||
echo "#define __ASM_OFFSETS_H__"; \ | ||
echo "/*"; \ | ||
echo " * DO NOT MODIFY."; \ | ||
echo " *"; \ | ||
echo " * This file was generated by $(srctree)/Kbuild"; \ | ||
echo " *"; \ | ||
echo " */"; \ | ||
echo ""; \ | ||
sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \ | ||
echo ""; \ | ||
echo "#endif" ) > $@ | ||
endef | ||
|
||
# We use internal kbuild rules to avoid the "is up to date" message from make | ||
arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE | ||
$(Q)mkdir -p $(dir $@) | ||
$(call if_changed_dep,cc_s_c) | ||
|
||
$(srctree)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild | ||
$(call cmd,offsets) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
*/ | ||
|
||
#include <asm/unistd.h> | ||
#include <asm/asm_offsets.h> | ||
#include <asm/asm-offsets.h> | ||
|
||
|
||
/* XXX | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters