Date: Thu, 1 Sep 2016 17:36:52 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305216 - head/share/mk Message-ID: <201609011736.u81Haq4q078826@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Thu Sep 1 17:36:52 2016 New Revision: 305216 URL: https://svnweb.freebsd.org/changeset/base/305216 Log: FAST_DEPEND/META_MODE: Fix several issues with SRCS containing '/'. - For FAST_DEPEND, properly apply the -M flags when compiling by enduring that the condition also has the s,/,_,g filter applied to it first. - For FAST_DEPEND, properly read from the filtered filename. - For META_MODE, it needs to read from a full-pathed and s,/,_,g replaced filename based on bmake's meta_name() function which names the .meta file for SRCS with '/' in them. This support has not been extended to the kernel build yet but may be in the future. MFC after: 2 weeks Reported by: dim Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Thu Sep 1 17:05:54 2016 (r305215) +++ head/share/mk/bsd.dep.mk Thu Sep 1 17:36:52 2016 (r305216) @@ -181,7 +181,7 @@ DEPEND_CFLAGS+= -MT${.TARGET} .if defined(.PARSEDIR) # Only add in DEPEND_CFLAGS for CFLAGS on files we expect from DEPENDOBJS # as those are the only ones we will include. -DEPEND_CFLAGS_CONDITION= "${DEPENDOBJS:M${.TARGET:${DEPEND_FILTER}}}" != "" +DEPEND_CFLAGS_CONDITION= "${DEPENDOBJS:${DEPEND_FILTER}:M${.TARGET:${DEPEND_FILTER}}}" != "" CFLAGS+= ${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS}:} .else CFLAGS+= ${DEPEND_CFLAGS} @@ -216,8 +216,17 @@ afterdepend: beforedepend # For meta+filemon the .meta file is checked for since it is the dependency # file used. .for __obj in ${DEPENDOBJS:O:u} -.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${__obj}.meta)) || \ - (!defined(_meta_filemon) && !exists(${.OBJDIR}/${DEPENDFILE}.${__obj})) +# If the obj has any '/', then replace with '_'. For meta files, this is +# mimicing what bmake's meta_name() does and adding in the full path +# as well to ensure that the expected meta file is read. +.if ${__obj:M*/*} +_meta_obj= ${.OBJDIR:C,/,_,g}_${__obj:C,/,_,g}.meta +.else +_meta_obj= ${__obj}.meta +.endif +_dep_obj= ${DEPENDFILE}.${__obj:${DEPEND_FILTER}} +.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${_meta_obj})) || \ + (!defined(_meta_filemon) && !exists(${.OBJDIR}/${_dep_obj})) ${__obj}: ${OBJS_DEPEND_GUESS} ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .elif defined(_meta_filemon)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609011736.u81Haq4q078826>