Skip to content
Browse files

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
  • Loading branch information...
1 parent 015fd7f commit a8f9cbce5e35e0afcf8f58b6807edb988883a9a3 @bapt bapt committed Nov 20, 2013
Showing with 10 additions and 7 deletions.
  1. +10 −7 Mk/Uses/kmod.mk
View
17 Mk/Uses/kmod.mk
@@ -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="${SRC_BASE}/sys"
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}

0 comments on commit a8f9cbc

Please sign in to comment.
Something went wrong with that request. Please try again.