svn commit: r334411 - head/Mk/Uses

Baptiste Daroussin bapt at FreeBSD.org
Wed Nov 20 12:43:30 UTC 2013


Author: bapt
Date: Wed Nov 20 12:43:29 2013
New Revision: 334411
URL: http://svnweb.freebsd.org/changeset/ports/334411

Log:
  Define the target in post section.
  Remove the PHONY kmod-pre-install target and replace it with a real file target (well directory in this case)
  
  Approved by:	rene

Modified:
  head/Mk/Uses/kmod.mk

Modified: head/Mk/Uses/kmod.mk
==============================================================================
--- head/Mk/Uses/kmod.mk	Wed Nov 20 12:41:39 2013	(r334410)
+++ head/Mk/Uses/kmod.mk	Wed Nov 20 12:43:29 2013	(r334411)
@@ -11,6 +11,8 @@
 .if !defined(_INCLUDE_USES_KMOD_MK)
 _INCLUDE_USES_KMOD_MK=	yes
 
+_USES_POST=	kmod
+
 .if defined(kmod_ARGS)
 IGNORE=	USES=kmod takes no arguments
 .endif
@@ -33,15 +35,16 @@ MAKE_ENV+=	KMODDIR="${KMODDIR}" SYSDIR="
 MAKE_ENV+=	NO_XREF=yes
 .endif
 
-.PHONY: kmod-preinstall kmod-post-install
-pre-install: kmod-pre-install
-kmod-pre-install:
-.if defined(NO_STAGE)
-	${MKDIR} ${KMODDIR}
-.else
-	${MKDIR} ${STAGEDIR}${KMODDIR}
 .endif
 
+.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_KMOD_POST_MK)
+_INCLUDE_USES_KMOD_POST_MK=	yes
+
+.PHONY: kmod-post-install
+pre-install: ${STAGEDIR}${KMODDIR}
+${STAGEDIR}${KMODDIR}:
+	${MKDIR} ${.TARGET}
+
 post-install: kmod-post-install
 kmod-post-install:
 	${ECHO_CMD} "@exec /usr/sbin/kldxref ${KMODDIR}"  >> ${TMPPLIST}


More information about the svn-ports-head mailing list