linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] asm-generic magic
@ 2003-05-06  6:41 george anzinger
  2003-05-06  7:26 ` David S. Miller
  0 siblings, 1 reply; 12+ messages in thread
From: george anzinger @ 2003-05-06  6:41 UTC (permalink / raw)
  To: Andrew Morton, kbuild-devel, mec, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]



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


[-- Attachment #2: asm-generic.patch --]
[-- Type: text/plain, Size: 1096 bytes --]

--- 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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-05-07 20:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-06  6:41 [PATCH] asm-generic magic george anzinger
2003-05-06  7:26 ` David S. Miller
2003-05-06 20:15   ` george anzinger
2003-05-07  2:55     ` David S. Miller
2003-05-07  9:35       ` george anzinger
2003-05-07 14:30         ` Sam Ravnborg
2003-05-07 15:08           ` george anzinger
2003-05-07 14:06             ` David S. Miller
2003-05-07 15:33               ` george anzinger
2003-05-07 14:31                 ` David S. Miller
2003-05-07 15:24           ` Kbuild newbie/promotional docs needed John van V.
2003-05-07 20:24             ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).