diff options
Diffstat (limited to 'source4/heimdal_build')
-rwxr-xr-x | source4/heimdal_build/et_compile_wrapper.sh | 32 | ||||
-rw-r--r-- | source4/heimdal_build/wscript_build | 20 |
2 files changed, 26 insertions, 26 deletions
diff --git a/source4/heimdal_build/et_compile_wrapper.sh b/source4/heimdal_build/et_compile_wrapper.sh index b267bb5ddc..939b434767 100755 --- a/source4/heimdal_build/et_compile_wrapper.sh +++ b/source4/heimdal_build/et_compile_wrapper.sh @@ -1,13 +1,13 @@ #!/bin/sh # -SELF=$0 -SELFDIR=`dirname ${SELF}` +SELF="$0" +SELFDIR=`dirname "${SELF}"` -DESTDIR=$1 -CMD=$2 -FILE=$3 -SOURCE=$4 +DESTDIR="$1" +CMD="$2" +FILE="$3" +SOURCE="$4" shift 4 test -z "${DESTDIR}" && { @@ -30,22 +30,22 @@ test -z "${SOURCE}" && { exit 1; } -CURDIR=`pwd` +CURDIR="`pwd`" -cd ${DESTDIR} && { +cd "${DESTDIR}" && { # Remove older copies beforehand - MIT's compile_et uses odd permissions for these # files, which makes Heimdal's compile_et fail mysteriously when writing to them. - rm -f `basename ${FILE} .et`.c - rm -f `basename ${FILE} .et`.h - ${CMD} ${FILE} >&2 || exit 1; - cd ${CURDIR} + rm -f `basename "${FILE}" .et`.c + rm -f `basename "${FILE}" .et`.h + "${CMD}" "${FILE}" >&2 || exit 1; + cd "${CURDIR}" TMP="${SOURCE}.$$" - mv ${SOURCE} ${TMP} && { - echo "#include \"config.h\"" > ${SOURCE} && { - cat ${TMP} >> ${SOURCE} + mv "${SOURCE}" "${TMP}" && { + echo "#include \"config.h\"" > "${SOURCE}" && { + cat "${TMP}" >> "${SOURCE}" } } - rm -f ${TMP} + rm -f "${TMP}" } || { echo "${SELF}:cannot cd into '${DESTDIR}'" >&2; exit 1; diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build index 3ce70a2ed3..421ead4ea4 100644 --- a/source4/heimdal_build/wscript_build +++ b/source4/heimdal_build/wscript_build @@ -52,8 +52,8 @@ def HEIMDAL_ASN1(name, source, # SRC[0].abspath(env) gives the absolute path to the source directory for the first # source file. Note that in the case of a option_file, we have more than # one source file - cd_rule = 'cd ${TGT[0].parent.abspath(env)}' - asn1_rule = cd_rule + ' && ${BLDBIN}/asn1_compile ${OPTION_FILE} ${ASN1OPTIONS} --one-code-file ${SRC[0].abspath(env)} ${ASN1NAME}' + cd_rule = 'cd "${TGT[0].parent.abspath(env)}"' + asn1_rule = cd_rule + ' && "${BLDBIN}/asn1_compile" ${OPTION_FILE} ${ASN1OPTIONS} --one-code-file "${SRC[0].abspath(env)}" ${ASN1NAME}' source = to_list(source) @@ -74,7 +74,7 @@ def HEIMDAL_ASN1(name, source, t.env.ASN1OPTIONS = options t.env.BLDBIN = os.path.normpath(os.path.join(bld.srcnode.abspath(bld.env), '..')) if option_file is not None: - t.env.OPTION_FILE = "--option-file=%s" % os.path.normpath(os.path.join(bld.curdir, option_file)) + t.env.OPTION_FILE = "--option-file='%s'" % os.path.normpath(os.path.join(bld.curdir, option_file)) cfile = out_files[0][0:-2] + '.c' hfile = out_files[1][0:-3] + '.h' @@ -148,7 +148,7 @@ def HEIMDAL_ERRTABLE(name, source): if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'): deps = 'compile_et' - t = bld(rule='${SRC[1].abspath(env)} ${TGT[0].parent.abspath(env)} ${COMPILE_ET} ${SRC[0].abspath(env)} ${TGT[0].bldpath(env)}', + t = bld(rule='"${SRC[1].abspath(env)}" "${TGT[0].parent.abspath(env)}" "${COMPILE_ET}" "${SRC[0].abspath(env)}" ${TGT[0].bldpath(env)}', ext_out = '.c', before = 'cc', on_results = True, @@ -166,7 +166,7 @@ def HEIMDAL_AUTOPROTO(header, source, options=None, group='prototypes'): options='-q -P comment -o' SET_TARGET_TYPE(bld, header, 'PROTOTYPE') source = heimdal_paths(source) - t = bld(rule='${PERL} ${HEIMDAL}/cf/make-proto.pl ${OPTIONS} ${TGT[0].abspath(env)} ${SRC}', + t = bld(rule='${PERL} "${HEIMDAL}/cf/make-proto.pl" ${OPTIONS} "${TGT[0].abspath(env)}" ${SRC}', source=source, target=header, on_results=True, @@ -780,7 +780,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_WIND'): HEIMDAL_GENERATOR( name="HEIMDAL_ERRORLIST", - rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[1].parent.abspath(env)}", + rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'", source = '../heimdal/lib/wind/gen-errorlist.py ../heimdal/lib/wind/rfc3454.txt ../heimdal/lib/wind/stringprep.py', target = '../heimdal/lib/wind/errorlist_table.c ../heimdal/lib/wind/errorlist_table.h' ) @@ -788,21 +788,21 @@ if not bld.CONFIG_SET('USING_SYSTEM_WIND'): HEIMDAL_GENERATOR( name = 'HEIMDAL_NORMALIZE_TABLE', - rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[2].abspath()} ${SRC[1].parent.abspath(env)}", + rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[2].abspath()}' '${SRC[1].parent.abspath(env)}'", source = '../heimdal/lib/wind/gen-normalize.py ../heimdal/lib/wind/UnicodeData.txt ../heimdal/lib/wind/CompositionExclusions-3.2.0.txt', target = '../heimdal/lib/wind/normalize_table.h ../heimdal/lib/wind/normalize_table.c' ) HEIMDAL_GENERATOR( name = 'HEIMDAL_COMBINING_TABLE', - rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[1].parent.abspath(env)}", + rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'", source = '../heimdal/lib/wind/gen-combining.py ../heimdal/lib/wind/UnicodeData.txt', target = '../heimdal/lib/wind/combining_table.h ../heimdal/lib/wind/combining_table.c' ) HEIMDAL_GENERATOR( name = 'HEIMDAL_BIDI_TABLE', - rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[1].parent.abspath(env)}", + rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'", source = '../heimdal/lib/wind/gen-bidi.py ../heimdal/lib/wind/rfc3454.txt', target = '../heimdal/lib/wind/bidi_table.h ../heimdal/lib/wind/bidi_table.c' ) @@ -810,7 +810,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_WIND'): HEIMDAL_GENERATOR( name = 'HEIMDAL_MAP_TABLE', - rule="${PYTHON} ${SRC[0].abspath()} ${SRC[2].abspath()} ${SRC[2].parent.abspath(env)}", + rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[2].abspath()}' '${SRC[2].parent.abspath(env)}'", source = '../heimdal/lib/wind/gen-map.py ../heimdal/lib/wind/stringprep.py ../heimdal/lib/wind/rfc3454.txt', target = '../heimdal/lib/wind/map_table.h ../heimdal/lib/wind/map_table.c' ) |