Skip to content

Commit

Permalink
WITH_META_MODE: Fix suffix transformation rules with guessed dependen…
Browse files Browse the repository at this point in the history
…cies.

This is the same problem as r290629.  With META_MODE we do not generate
.depend files, so there is no proper dependency to lookup.  Guessed
dependencies must be used.  If this proves to be a problem then we will
have to generate and use .depend files even with META_MODE.

Sponsored by:	EMC / Isilon Storage Division
  • Loading branch information
bdrewery committed May 21, 2016
1 parent dc07461 commit e390007
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions share/mk/bsd.dep.mk
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ afterdepend: beforedepend
(!defined(_meta_filemon) && !exists(${.OBJDIR}/${DEPENDFILE}.${__obj}))
${__obj}: ${OBJS_DEPEND_GUESS}
${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
.elif defined(_meta_filemon)
# For meta mode we still need to know which file to depend on to avoid
# ambiguous suffix transformation rules from .PATH. Meta mode does not
# use .depend files. We really only need source files, not headers.
${__obj}: ${OBJS_DEPEND_GUESS:N*.h}
${__obj}: ${OBJS_DEPEND_GUESS.${__obj}:N*.h}
.endif
.endfor

Expand Down
8 changes: 8 additions & 0 deletions sys/conf/kern.post.mk
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,14 @@ beforebuild: kernel-depend
${__obj}: ${OBJS_DEPEND_GUESS}
.endif
${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
.elif defined(_meta_filemon)
# For meta mode we still need to know which file to depend on to avoid
# ambiguous suffix transformation rules from .PATH. Meta mode does not
# use .depend files. We really only need source files, not headers.
.if ${SYSTEM_OBJS:M${__obj}}
${__obj}: ${OBJS_DEPEND_GUESS:N*.h}
.endif
${__obj}: ${OBJS_DEPEND_GUESS.${__obj}:N*.h}
.endif
.endfor

Expand Down

0 comments on commit e390007

Please sign in to comment.