svn commit: r246866 - projects/bmake/share/mk

Simon J. Gerraty sjg at FreeBSD.org
Sat Feb 16 01:19:19 UTC 2013


Author: sjg
Date: Sat Feb 16 01:19:18 2013
New Revision: 246866
URL: http://svnweb.freebsd.org/changeset/base/246866

Log:
  If MAKESYSPATH contained .../ entry resolve it so that it still works
  when we launch make from obj tree.
  If we don't have sysroot support we need some c++ and clang specific
  include dirs in the stage tree.

Modified:
  projects/bmake/share/mk/local.sys.mk

Modified: projects/bmake/share/mk/local.sys.mk
==============================================================================
--- projects/bmake/share/mk/local.sys.mk	Sat Feb 16 01:16:53 2013	(r246865)
+++ projects/bmake/share/mk/local.sys.mk	Sat Feb 16 01:19:18 2013	(r246866)
@@ -108,6 +108,11 @@ WITH_STAGING_PROG= yes
 PYTHON ?= /usr/local/bin/python
 
 .if ${.MAKE.LEVEL} == 0
+.if ${MAKESYSPATH:Uno:M*.../*} != ""
+# make sure this is resolved
+MAKESYSPATH:= ${MAKESYSPATH:S,:, ,g:C,\.\.\./.*,${_this:H},:ts:}
+.export MAKESYSPATH
+.endif
 # this works best if share/mk is ready for it.
 BUILD_AT_LEVEL0= no
 # By default only MACHINE0 updates dependencies
@@ -146,8 +151,13 @@ STAGE_SYMLINKS_DIR= ${STAGE_OBJTOP}
 CFLAGS_LAST+= -nostdinc
 .endif
 CFLAGS_LAST+= -isystem ${STAGE_OBJTOP}/usr/include -isystem ${STAGE_OBJTOP}/include
+CFLAGS_LAST += ${CFLAGS_LAST.${COMPILER_TYPE}}
 LDFLAGS_LAST+= -B${STAGE_LIBDIR} -L${STAGE_LIBDIR}
-CXXFLAGS_LAST+= -isystem ${STAGE_OBJTOP}/usr/include/c++/${GCCVER:U4.2}
+CXXFLAGS_LAST += -isystem ${STAGE_OBJTOP}/usr/include/c++/${GCCVER:U4.2}
+# backward doesn't get searched if -nostdinc
+CXXFLAGS_LAST += -isystem ${STAGE_OBJTOP}/usr/include/c++/${GCCVER:U4.2}/backward
+CFLAGS_LAST.clang += -isystem ${STAGE_OBJTOP}/usr/include/clang/3.2
+CXXFLAGS_LAST += ${CFLAGS_LAST.${COMPILER_TYPE}}
 .else
 # if ld suppored sysroot, this would suffice
 CFLAGS_LAST+= --sysroot=${STAGE_OBJTOP} -isystem ${STAGE_OBJTOP}/include
@@ -202,6 +212,11 @@ MAKE_PRINT_VAR_ON_ERROR+= \
 	OBJTOP \
 	${MAKE_PRINT_VAR_ON_ERROR_XTRAS}
 
+.if ${.MAKE.LEVEL} > 0
+MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH
+.endif
+
+
 # these are handy
 # we can use this for a cheap timestamp at the start of a target's script,
 # but not at the end - since make will expand both at the same time.


More information about the svn-src-projects mailing list