Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2002 18:15:47 -0600 (MDT)
From:      jhein@timing.com
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        marcel@FreeBSD.org
Subject:   ports/42649: linux_kdump port for source dirs != /usr/src
Message-ID:  <200209110015.g8B0FlGe003871@brain.timing.com>

next in thread | raw e-mail | index | archive | help

>Number:         42649
>Category:       ports
>Synopsis:       linux_kdump port for source dirs != /usr/src
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 10 17:20:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        FreeBSD 4.x or 5.x i386
>Organization:
>Environment:
System: FreeBSD


>Description:
I keep various source trees around, and they can't all be in /usr/src ;)

So here's a patch that "unbreaks" the linux_kdump port requirement
 that the source be in /usr/src.  All you have to do is specify
 'make SRCDIR=/some/where/else'.  It defaults to /usr/src.
 Feel free to change the var names if there are better names.

>How-To-Repeat:
	'cd ports/devel/linux_kdump ; make' with source tree somewhere
	other than /usr/src
>Fix:

for the port Makefile...

Index: Makefile
===================================================================
RCS file: /base/FreeBSD-CVS/ports/devel/linux_kdump/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- Makefile	2000/08/11 00:46:13	1.17
+++ Makefile	2002/09/10 11:30:51
@@ -20,11 +20,14 @@
 
 .include <bsd.port.pre.mk>
 
-.if !exists(/sys/i386/linux/syscalls.master)
-BROKEN=		"requires kernel source present in /sys"
+SRCDIR?=	/usr/src
+SYSDIR?=	${SRCDIR}/sys
+
+.if !exists(${SYSDIR}/i386/linux/syscalls.master)
+BROKEN=		"requires kernel source present in ${SYSDIR}"
 .endif
-.if !exists(/usr/src/usr.bin/ktrace/subr.c)
-BROKEN=		"requires ktrace source present in /usr/src/usr.bin/ktrace"
+.if !exists(${SRCDIR}/usr.bin/ktrace/subr.c)
+BROKEN=		"requires ktrace source present in ${SRCDIR}/usr.bin/ktrace"
 .endif
 
 .include <bsd.port.post.mk>


and for the Makefile down in the work dir...


--- work/linux_kdump-1.4/Makefile.orig	Tue Mar 23 04:46:00 1999
+++ work/linux_kdump-1.4/Makefile	Tue Sep 10 05:22:54 2002
@@ -4,15 +4,17 @@
 BINDIR=	/bin
 MANDIR=	/man/man
 PROG=	linux_kdump
-CFLAGS+=-I/usr/src/usr.bin/ktrace -I/
+SRCDIR?=/usr/src
+SYSDIR?=${SRCDIR}/sys
+CFLAGS+=-I${SRCDIR}/usr.bin/ktrace -I/
 SRCS=	kdump.c linux_ioctl.c subr.c syscallnames.c
-.PATH:	/usr/src/usr.bin/ktrace
+.PATH:	${SRCDIR}/usr.bin/ktrace
 CLEANFILES+=linux_ioctl.c syscallnames.c
 
 default:	depend all
 
 syscallnames.c:
-	/bin/sh /sys/kern/makesyscalls.sh /sys/i386/linux/syscalls.master linux_syscallnames.conf
+	/bin/sh ${SYSDIR}/kern/makesyscalls.sh ${SYSDIR}/i386/linux/syscalls.master linux_syscallnames.conf
 	echo "int nsyscalls = sizeof (syscallnames) / sizeof (syscallnames[0]);" >> syscallnames.c
 
 linux_ioctl.c: mkioctls.linux
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209110015.g8B0FlGe003871>