#!/bin/bash ## ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. ## ## Use of this source code is governed by a BSD-style license ## that can be found in the LICENSE file in the root of the source ## tree. An additional intellectual property rights grant can be found ## in the file PATENTS. All contributing project authors may ## be found in the AUTHORS file in the root of the source tree. ## self=$0 self_basename=${self##*/} EOL=$'\n' EOLDOS=$'\r' show_help() { cat <&2 [ -f "${outfile}" ] && rm -f ${outfile}{,.mk} exit 1 } die_unknown(){ echo "Unknown option \"$1\"." >&2 echo "See ${self_basename} --help for available options." >&2 [ -f "${outfile}" ] && rm -f ${outfile}{,.mk} exit 1 } indent1=$'\t' indent="" indent_push() { indent="${indent}${indent1}" } indent_pop() { indent="${indent%${indent1}}" } parse_project() { local file=$1 if [ "$sfx" = "vcproj" ]; then local name=`grep Name "$file" | awk 'BEGIN {FS="\""}{if (NR==1) print $2}'` local guid=`grep ProjectGUID "$file" | awk 'BEGIN {FS="\""}{if (NR==1) print $2}'` else local name=`grep RootNamespace "$file" | sed 's,.*<.*>\(.*\).*,\1,'` local guid=`grep ProjectGuid "$file" | sed 's,.*<.*>\(.*\).*,\1,'` fi # save the project GUID to a varaible, normalizing to the basename of the # vcproj file without the extension local var var=${file##*/} var=${var%%.${sfx}} eval "${var}_file=\"$1\"" eval "${var}_name=$name" eval "${var}_guid=$guid" if [ "$sfx" = "vcproj" ]; then cur_config_list=`grep -A1 '/dev/null 2>&1 && echo yes) .nodevenv.once: ${TAB}@echo " * \$(MSBUILD_TOOL) not found in path." ${TAB}@echo " * " ${TAB}@echo " * You will have to build all configurations manually using the" ${TAB}@echo " * Visual Studio IDE. To allow make to build them automatically," ${TAB}@echo " * add the Common7/IDE directory of your Visual Studio" ${TAB}@echo " * installation to your path, eg:" ${TAB}@echo " * C:\Program Files\Microsoft Visual Studio 8\Common7\IDE" ${TAB}@echo " * " ${TAB}@touch \$@ CLEAN-OBJS += \$(if \$(found_devenv),,.nodevenv.once) EOF for sln_config in ${config_list}; do local config=${sln_config%%|*} local platform=${sln_config##*|} local nows_sln_config=`echo $sln_config | sed -e 's/[^a-zA-Z0-9]/_/g'` cat <${outfile} <>${outfile} done process_global >>${outfile} process_makefile >${mkoutfile}