[PATCH] asm-generic magic

george anzinger (george@mvista.com)
Mon, 05 May 2003 23:41:40 -0700


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-524-1052203409-0001-2
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

The attached patch changes topdir/Makefile to make the asm-generic
stuff to work the way I assumed it was supposed to work. :)

That is, if the file exists in .../include/asm/ use that one, if not
and it exist in .../include/asm-generic/ use the generic one. This is
compatable with current conventions but also allows asm files that do
nothing but include the asm-generic file with the same name to go
away. The "magic" is to supply both include and include/asm-generic
to CPP. This causes it, when looking for <asm/foo.h> to look first
in ...include/asm/ and then in .../include/asm-generic/asm. To make
the ladder work we put a link (called asm) in asm-generic to point to ".".

Commits?

-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

--=_courier-524-1052203409-0001-2 Content-Type: text/plain; name="asm-generic.patch"; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="asm-generic.patch"

--- linux-2.5.69-wq/Makefile~ 2003-05-05 15:33:30.000000000 -0700 +++ linux/Makefile 2003-05-05 18:00:42.000000000 -0700 @@ -181,7 +181,7 @@ NOSTDINC_FLAGS = -nostdinc -iwithprefix include -CPPFLAGS := -D__KERNEL__ -Iinclude +CPPFLAGS := -D__KERNEL__ -Iinclude -Iinclude/generic-asm CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ -fno-strict-aliasing -fno-common AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS) @@ -403,7 +403,7 @@ # module versions are listed in "prepare" .PHONY: prepare -prepare: include/linux/version.h include/asm include/config/MARKER +prepare: include/linux/version.h include/asm include/config/MARKER include/asm-generic/asm ifdef KBUILD_MODULES ifeq ($(origin SUBDIRS),file) $(Q)rm -rf $(MODVERDIR) @@ -453,6 +453,10 @@ @echo ' Making asm->asm-$(ARCH) symlink' @ln -s asm-$(ARCH) $@ +include/asm-generic/asm: + @echo ' Making asm-generic/asm->. symlink' + @ln -s . $@ + # Split autoconf.h into include/linux/config/* include/config/MARKER: scripts/split-include include/linux/autoconf.h child process exited abnormally

--=_courier-524-1052203409-0001-2--