lkml.org 
[lkml]   [2003]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] asm-generic magic


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

--- 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
\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.062 / U:2.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site