ia64/linux-2.6.18-xen.hg

diff Kbuild @ 0:831230e53067

Import 2.6.18 from kernel.org tarball.
author Ian Campbell <ian.campbell@xensource.com>
date Wed Apr 11 14:15:44 2007 +0100 (2007-04-11)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Kbuild	Wed Apr 11 14:15:44 2007 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +#
     1.5 +# Kbuild for top-level directory of the kernel
     1.6 +# This file takes care of the following:
     1.7 +# 1) Generate asm-offsets.h
     1.8 +
     1.9 +#####
    1.10 +# 1) Generate asm-offsets.h
    1.11 +#
    1.12 +
    1.13 +offsets-file := include/asm-$(ARCH)/asm-offsets.h
    1.14 +
    1.15 +always  := $(offsets-file)
    1.16 +targets := $(offsets-file)
    1.17 +targets += arch/$(ARCH)/kernel/asm-offsets.s
    1.18 +
    1.19 +# Default sed regexp - multiline due to syntax constraints
    1.20 +define sed-y
    1.21 +	"/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
    1.22 +endef
    1.23 +# Override default regexp for specific architectures
    1.24 +sed-$(CONFIG_MIPS) := "/^@@@/{s/^@@@//; s/ \#.*\$$//; p;}"
    1.25 +
    1.26 +quiet_cmd_offsets = GEN     $@
    1.27 +define cmd_offsets
    1.28 +	(set -e; \
    1.29 +	 echo "#ifndef __ASM_OFFSETS_H__"; \
    1.30 +	 echo "#define __ASM_OFFSETS_H__"; \
    1.31 +	 echo "/*"; \
    1.32 +	 echo " * DO NOT MODIFY."; \
    1.33 +	 echo " *"; \
    1.34 +	 echo " * This file was generated by $(srctree)/Kbuild"; \
    1.35 +	 echo " *"; \
    1.36 +	 echo " */"; \
    1.37 +	 echo ""; \
    1.38 +	 sed -ne $(sed-y) $<; \
    1.39 +	 echo ""; \
    1.40 +	 echo "#endif" ) > $@
    1.41 +endef
    1.42 +
    1.43 +# We use internal kbuild rules to avoid the "is up to date" message from make
    1.44 +arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
    1.45 +	$(Q)mkdir -p $(dir $@)
    1.46 +	$(call if_changed_dep,cc_s_c)
    1.47 +
    1.48 +$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
    1.49 +	$(Q)mkdir -p $(dir $@)
    1.50 +	$(call cmd,offsets)
    1.51 +