Date: Mon, 17 Jun 2002 15:00:41 -0500 From: "David W. Chapman Jr." <dwcjr@inethouston.net> To: audit@freebsd.org Cc: ports@freebsd.org Subject: Early work on making bsd.port.mk like kmod Message-ID: <20020617200041.GF17783@leviathan.inethouston.net>
next in thread | raw e-mail | index | archive | help
--oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This is my first attempt any any type of shell scripting or bsd.port.mk work so take that into consideration when you review. This is just the early phase of making bsd.port.mk like kmod ports and does not have anything fancy, its more for concept right now. I would like to see if anyone agrees with the approach I'm taking right now and suggestions are welcome. -- David W. Chapman Jr. dwcjr@inethouston.net Raintree Network Services, Inc. <www.inethouston.net> dwcjr@freebsd.org FreeBSD Committer <www.FreeBSD.org> --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bsd.port.mk.patch" Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.414 diff -u -r1.414 bsd.port.mk --- bsd.port.mk 13 Jun 2002 18:20:40 -0000 1.414 +++ bsd.port.mk 17 Jun 2002 19:58:05 -0000 @@ -527,6 +527,9 @@ # when you noticed the distfile you just fetched has # a different checksum and you intend to verify if # the port still works with it. +# Not sure where this should go, so here is a good start +# USE_KMOD - Port uses kernel sources to build. +# KMOD_DIR - Directory for kmod files to be installed to. # Start of pre-makefile section. .if !defined(AFTERPORTMK) @@ -781,6 +784,17 @@ #RESTRICTED= "Contains cryptography." .endif +.if defined(USE_KMOD) +.if !exists(/usr/src/sys/Makefile) +BROKEN= "Kernel source files required" +.endif +.if ${OSVERSION} >= 500000 +KMOD_DIR?= /boot/kernel +.else +KMOD_DIR?= /modules +.endif +.endif + .if defined(EMACS_PORT_NAME) .include "${PORTSDIR}/Mk/bsd.emacs.mk" .endif @@ -3310,6 +3324,9 @@ @>${TMPPLIST} @for man in ${__MANPAGES}; do \ ${ECHO_CMD} $${man} >> ${TMPPLIST}; \ + done + @for kmod in ${INSTALL_KMOD}; do \ + ${ECHO_CMD} @unexec ${RM} ${KMOD_DIR}/`${BASENAME} $$kmod` >> ${TMPPLIST}; \ done .for _PREFIX in ${PREFIX} .if ${_TMLINKS:M${_PREFIX}*}x != x --oyUTqETQ0mS9luUI-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020617200041.GF17783>