Date: Sat, 3 May 2014 09:24:20 +0000 (UTC) From: Thomas Quinot <thomas@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265260 - in head: . tools/tools/nanobsd Message-ID: <201405030924.s439OKid066701@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: thomas Date: Sat May 3 09:24:20 2014 New Revision: 265260 URL: http://svnweb.freebsd.org/changeset/base/265260 Log: Add appropriate quoting to allow building with a KERNCONFDIR containing spaces. PR: kern/162736 MFC after: 1 week Modified: head/Makefile.inc1 head/tools/tools/nanobsd/nanobsd.sh Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat May 3 09:18:59 2014 (r265259) +++ head/Makefile.inc1 Sat May 3 09:24:20 2014 (r265260) @@ -1001,7 +1001,7 @@ buildkernel: cd ${KRNLCONFDIR}; \ PATH=${TMPPATH} \ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ - -I ${KERNCONFDIR} ${KERNCONFDIR}/${_kernel} + -I '${KERNCONFDIR}' '${KERNCONFDIR}/${_kernel}' .endif .if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN) @echo @@ -1816,7 +1816,7 @@ DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF} .if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE) .if exists(${KERNCONFDIR}/${KERNCONF}) FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ - ${KERNCONFDIR}/${KERNCONF} ; echo + '${KERNCONFDIR}/${KERNCONF}' ; echo .endif .endif Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Sat May 3 09:18:59 2014 (r265259) +++ head/tools/tools/nanobsd/nanobsd.sh Sat May 3 09:24:20 2014 (r265260) @@ -233,7 +233,7 @@ build_kernel ( ) ( ( if [ -f ${NANO_KERNEL} ] ; then - extra="KERNCONFDIR=$(realpath $(dirname ${NANO_KERNEL}))" + kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'" kernconf=$(basename ${NANO_KERNEL}) else kernconf=${NANO_KERNEL} @@ -245,10 +245,10 @@ build_kernel ( ) ( unset TARGET_CPUTYPE # Note: We intentionally build all modules, not only the ones in # NANO_MODULES so the built world can be reused by multiple images. - env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ - SRCCONF=${SRCCONF} \ - ${extra} __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ - KERNCONF=${kernconf} + eval "TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ + SRCCONF='${SRCCONF}' \ + __MAKE_CONF='${NANO_MAKE_CONF_BUILD}' \ + ${kernconfdir_arg} KERNCONF=${kernconf}" ) > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 ) @@ -315,19 +315,19 @@ install_kernel ( ) ( ( if [ -f ${NANO_KERNEL} ] ; then - extra="KERNCONFDIR=$(realpath $(dirname ${NANO_KERNEL}))" + kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'" kernconf=$(basename ${NANO_KERNEL}) else kernconf=${NANO_KERNEL} fi cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \ - DESTDIR=${NANO_WORLDDIR} \ - SRCCONF=${SRCCONF} \ - ${extra} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} \ - KERNCONF=${kernconf} \ - MODULES_OVERRIDE="${NANO_MODULES}" + eval "TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \ + DESTDIR='${NANO_WORLDDIR}' \ + SRCCONF='${SRCCONF}' \ + __MAKE_CONF='${NANO_MAKE_CONF_INSTALL}' \ + ${kernconfdir_arg} KERNCONF=${kernconf} \ + MODULES_OVERRIDE='${NANO_MODULES}'" ) > ${NANO_OBJ}/_.ik 2>&1 )
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405030924.s439OKid066701>