linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: drop symbolink link to kernel headers
@ 2004-01-20 18:08 Svetoslav Slavtchev
  2004-01-21 23:53 ` Greg KH
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Svetoslav Slavtchev @ 2004-01-20 18:08 UTC (permalink / raw)
  To: linux-hotplug

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

Hi,
the attached patch removes the need from a symbolik link to kernel headers
when compiling against klibc.
if KERNEL_DIR is not specified it looks for kernel headers
in /usr/src/linux( of course you could change it to /lib/modules/`uname
-r`/build )

the main idea is to build packages a bit easier/ pretier
instead of creating a symbolik link, one can specify
make KERNEL_DIR=[path to kernel] or omit it in case
kernel sources are available in /usr/src/linux

best,
svetljo

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Bis 31.1.: TopMail + Digicam für nur 29 EUR http://www.gmx.net/topmail

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: udev013_klibc_kheaders.diff --]
[-- Type: text/x-patch; name="udev013_klibc_kheaders.diff", Size: 2962 bytes --]

diff -Naurb udev-013/extras/multipath/libdevmapper/Makefile udev.old/extras/multipath/libdevmapper/Makefile
--- udev-013/extras/multipath/libdevmapper/Makefile	2003-12-10 12:14:19.000000000 +0100
+++ udev.old/extras/multipath/libdevmapper/Makefile	2004-01-19 12:29:13.153889468 +0100
@@ -10,7 +10,7 @@
 GCCINCDIR := ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"}
 CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -nostdinc \
          -I$(klibcdir)/klibc/include -I$(klibcdir)/klibc/include/bits32 \
-         -I$(GCCINCDIR) -I$(klibcdir)/linux/include -I. -Iioctl
+         -I$(GCCINCDIR) -I$(KERNEL_DIR)/include -I. -Iioctl
 
 OBJS = ioctl/libdevmapper.o libdm-common.o
 
diff -Naurb udev-013/extras/multipath/Makefile udev.old/extras/multipath/Makefile
--- udev-013/extras/multipath/Makefile	2004-01-05 20:48:32.000000000 +0100
+++ udev.old/extras/multipath/Makefile	2004-01-19 12:34:49.127502355 +0100
@@ -15,7 +15,7 @@
 GCCINCDIR := ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"}
 CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -nostdinc \
          -I$(klibcdir)/klibc/include -I$(klibcdir)/klibc/include/bits32 \
-         -I$(GCCINCDIR) -I$(klibcdir)/linux/include -I$(sysfsdir) -I.
+         -I$(GCCINCDIR) -I$(KERNEL_DIR)/include -I$(sysfsdir) -I.
 
 OBJS = main.o
 CRT0 = ../../klibc/klibc/crt0.o
@@ -32,7 +32,7 @@
 
 recurse:
 	@for dir in $(SUBDIRS); do\
-	$(MAKE) -C $$dir ; \
+	$(MAKE) KERNEL_DIR=$(KERNEL_DIR) -C $$dir ; \
 	done
 	$(MAKE) $(EXEC)
 
diff -Naurb udev-013/klibc/MCONFIG udev.old/klibc/MCONFIG
--- udev-013/klibc/MCONFIG	2004-01-19 13:26:01.115895297 +0100
+++ udev.old/klibc/MCONFIG	2004-01-18 16:59:06.047625766 +0100
@@ -12,7 +12,7 @@
 	  -I$(KLIBSRC)/arch/$(ARCH)/include \
 	  -I$(KLIBSRC)/include/bits$(BITSIZE) \
 	  -D__KLIBC__ -DBITSIZE=$(BITSIZE) -I$(KLIBSRC)/include \
-	  -I$(SRCROOT)/linux/include
+	  -I$(KERNEL_DIR)/include
 LDFLAGS =
 AR      = $(CROSS)ar
 RANLIB  = $(CROSS)ranlib
diff -Naurb udev-013/Makefile udev.old/Makefile
--- udev-013/Makefile	2004-01-19 13:26:01.115895297 +0100
+++ udev.old/Makefile	2004-01-19 12:36:13.173255316 +0100
@@ -32,6 +32,10 @@
 LOCAL_CFG_DIR =	etc/udev
 
 DESTDIR =
+ifndef KERNEL_DIR
+KERNEL_DIR=/usr/src/linux
+endif
+
 # override this to make udev look in a different location for it's config files
 prefix =
 exec_prefix =	${prefix}
@@ -122,7 +126,7 @@
 	KLIBC_BASE	= $(PWD)/klibc
 	KLIBC_DIR	= $(KLIBC_BASE)/klibc
 	INCLUDE_DIR	:= $(KLIBC_DIR)/include
-	LINUX_INCLUDE_DIR	:= $(KLIBC_BASE)/linux/include
+	LINUX_INCLUDE_DIR	:= $(KERNEL_DIR)/include
 	include $(KLIBC_DIR)/arch/$(ARCH)/MCONFIG
 	# arch specific objects
 	ARCH_LIB_OBJS =	\
@@ -150,7 +154,7 @@
 	@extras="$(EXTRAS)" ; for target in $$extras ; do \
 		echo $$target ; \
 		$(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
-			-C $$target $@ ; \
+			KERNEL_DIR="$(KERNEL_DIR)" -C $$target $@ ; \
 	done ; \
 
 $(ROOT): $(LIBC)

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

end of thread, other threads:[~2004-02-03  0:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-20 18:08 PATCH: drop symbolink link to kernel headers Svetoslav Slavtchev
2004-01-21 23:53 ` Greg KH
2004-01-22  0:40 ` 
2004-01-22  1:51 ` 
2004-01-22  3:42 ` Dave Dodge
2004-01-22 17:06 ` linas
2004-01-22 17:24 ` Svetoslav Slavtchev
2004-01-22 17:28 ` Greg KH
2004-01-22 17:31 ` Greg KH
2004-02-03  0:52 ` Greg KH

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