ports/devel/linux_kdump/files/patch-Makefile
Alexander Leidinger 65eb110812 Make this port usable again:
- depend upon gentoo stage 3 linux base (build dependency only!)
 - bail out and suggest to use the package when the default linux base port
   is installed at compile time (build time conflict with gentoo stage 3)
 - patch stuff for the kdump in -current
 - reword the description (this is a FreeBSD native program)
 - portlint
 - someone may want to write a linux replacement for mksubr
2006-07-19 20:02:22 +00:00

34 lines
894 B
Text

--- Makefile.orig Wed Jul 19 21:27:48 2006
+++ Makefile Wed Jul 19 21:43:08 2006
@@ -2,14 +2,19 @@
PROG= linux_kdump
SRCS= kdump.c linux_ioctl.c subr.c syscallnames.c
+.if exists(${SRCDIR}/usr.bin/kdump/kdump_subr.h)
+SRCS+= kdump_subr.c
+CLEANFILES+=kdump_subr.c
+.endif
CLEANFILES+=linux_ioctl.c syscallnames.c
BINDIR= /bin
DESTDIR=${PREFIX}
MANDIR= /man/man
SRCDIR?=/usr/src
+LINUXBASE?=/compat/linux
-CFLAGS+=-I${SRCDIR}/usr.bin/ktrace -I${SRCDIR}
+CFLAGS+=-I${SRCDIR}/usr.bin/ktrace -I${SRCDIR}/usr.bin/kdump -I${SRCDIR}
.PATH: ${SRCDIR}/usr.bin/ktrace
default: depend all
@@ -22,5 +27,10 @@
linux_ioctl.c: mkioctls.linux
/bin/sh ${.CURDIR}/mkioctls.linux
+
+.if exists(${SRCDIR}/usr.bin/kdump/kdump_subr.h)
+kdump_subr.c: ${SRCDIR}/usr.bin/kdump/mksubr
+ /bin/sh ${SRCDIR}/usr.bin/kdump/mksubr ${LINUXBASE}/usr/include > ${.TARGET}
+.endif
.include <bsd.prog.mk>