Skip to content
Browse files

remove erlang .sh copies.

  • Loading branch information...
1 parent c2112d5 commit 59da7979ea598861171befee3528752768f77d67 @mhammond mhammond committed Jul 5, 2009
Showing with 0 additions and 727 deletions.
  1. +0 −5 utils/win32/vc/README.txt
  2. +0 −47 utils/win32/vc/ar.sh
  3. +0 −318 utils/win32/vc/cc.sh
  4. +0 −184 utils/win32/vc/ld.sh
  5. +0 −87 utils/win32/vc/mc.sh
  6. +0 −86 utils/win32/vc/rc.sh
View
5 utils/win32/vc/README.txt
@@ -1,5 +0,0 @@
-This directory contains shell scripts which allow the VC tools to
-be used as if they are the gnu tools.
-
-They were shamelessly stolen from the erts/etc/win32/cygwin_tools/vc/
-directory in the erlang/otp distribution - thanks guys!
View
47 utils/win32/vc/ar.sh
@@ -1,47 +0,0 @@
-#! /bin/sh
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2002-2009. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-CMD=""
-while test -n "$1" ; do
- x="$1"
- case "$x" in
- -out:)
- shift
- case "$1" in
- /*)
- MPATH=`cygpath -m $1`;;
- *)
- MPATH=$1;;
- esac
- CMD="$CMD -out:\"$MPATH\"";;
- -out:/*)
- y=`echo $x | sed 's,^-out:\(/.*\),\1,g'`;
- MPATH=`cygpath -m $y`;
- CMD="$CMD -out:\"$MPATH\"";;
- /*)
- MPATH=`cygpath -m $x`;
- CMD="$CMD \"$MPATH\"";;
- *)
- y=`echo $x | sed 's,",\\\",g'`;
- CMD="$CMD \"$y\"";;
- esac
- shift
-done
-
-eval lib.exe $CMD
View
318 utils/win32/vc/cc.sh
@@ -1,318 +0,0 @@
-#! /bin/sh
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2002-2009. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-# Icky cl wrapper that does it's best to behave like a Unixish cc.
-# Made to work for Erlang builds and to make configure happy, not really
-# general I suspect.
-# set -x
-# Save the command line for debug outputs
-SAVE="$@"
-
-# Constants
-COMMON_CFLAGS="-nologo -D__WIN32__ -DWIN32 -DWINDOWS -D_WIN32 -DNT -D_CRT_SECURE_NO_DEPRECATE"
-
-# Variables
-# The stdout and stderr for the compiler
-MSG_FILE=/tmp/cl.exe.$$.1
-ERR_FILE=/tmp/cl.exe.$$.2
-
-# "Booleans" determined during "command line parsing"
-# If the stdlib option is explicitly passed to this program
-MD_FORCED=false
-# If we're preprocession (only) i.e. -E
-PREPROCESSING=false
-# If we're generating dependencies (implies preprocesing)
-DEPENDENCIES=false
-# If this is supposed to be a debug build
-DEBUG_BUILD=false
-# If this is supposed to be an optimized build (there can only be one...)
-OPTIMIZED_BUILD=false
-# If we're linking or only compiling
-LINKING=true
-
-# This data is accumulated during command line "parsing"
-# The stdlibrary option, default multithreaded dynamic
-MD=-MD
-# Flags for debug compilation
-DEBUG_FLAGS=""
-# Flags for optimization
-OPTIMIZE_FLAGS=""
-# The specified output filename (if any), may be either object or exe.
-OUTFILE=""
-# Unspecified command line options for the compiler
-CMD=""
-# All the c source files, in unix style
-SOURCES=""
-# All the options to pass to the linker, kept in Unix style
-LINKCMD=""
-
-
-# Loop through the parameters and set the above variables accordingly
-# Also convert some cygwin filenames to "mixed style" dito (understood by the
-# compiler very well), except for anything passed to the linker, that script
-# handles those and the sources, which are also kept unixish for now
-
-while test -n "$1" ; do
- x="$1"
- case "$x" in
- -Wall)
- ;;
- -c)
- LINKING=false;;
- #CMD="$CMD -c";;
- -MM)
- PREPROCESSING=true;
- LINKING=false;
- DEPENDENCIES=true;;
- -E)
- PREPROCESSING=true;
- LINKING=false;; # Obviously...
- #CMD="$CMD -E";;
- -Owx)
- # Optimization hardcoded of wxErlang, needs to disable debugging too
- OPTIMIZE_FLAGS="-Ob2ity -Gs -Zi";
- DEBUG_FLAGS="";
- DEBUG_BUILD=false;
- if [ $MD_FORCED = false ]; then
- MD=-MD;
- fi
- OPTIMIZED_BUILD=true;;
- -O*)
- # Optimization hardcoded, needs to disable debugging too
- OPTIMIZE_FLAGS="-Ox -Zi";
- DEBUG_FLAGS="";
- DEBUG_BUILD=false;
- if [ $MD_FORCED = false ]; then
- MD=-MD;
- fi
- OPTIMIZED_BUILD=true;;
- -g|-ggdb)
- if [ $OPTIMIZED_BUILD = false ];then
- # Hardcoded windows debug flags
- DEBUG_FLAGS="-Z7";
- if [ $MD_FORCED = false ]; then
- MD=-MDd;
- fi
- LINKCMD="$LINKCMD -g";
- DEBUG_BUILD=true;
- fi;;
- # Allow forcing of stdlib
- -mt|-MT)
- MD="-MT";
- MD_FORCED=true;;
- -md|-MD)
- MD="-MD";
- MD_FORCED=true;;
- -ml|-ML)
- MD="-ML";
- MD_FORCED=true;;
- -mdd|-MDD|-MDd)
- MD="-MDd";
- MD_FORCED=true;;
- -mtd|-MTD|-MTd)
- MD="-MTd";
- MD_FORCED=true;;
- -mld|-MLD|-MLd)
- MD="-MLd";
- MD_FORCED=true;;
- -o)
- shift;
- OUTFILE="$1";;
- -o*)
- y=`echo $x | sed 's,^-[Io]\(.*\),\1,g'`;
- OUTFILE="$y";;
- -I/*)
- y=`echo $x | sed 's,^-[Io]\(/.*\),\1,g'`;
- z=`echo $x | sed 's,^-\([Io]\)\(/.*\),\1,g'`;
- MPATH=`cygpath -m $y`;
- CMD="$CMD -$z\"$MPATH\"";;
- -I*)
- y=`echo $x | sed 's,",\\\",g'`;
- CMD="$CMD $y";;
- -D*)
- y=`echo $x | sed 's,",\\\",g'`;
- CMD="$CMD $y";;
- -EH*)
- y=`echo $x | sed 's,",\\\",g'`;
- CMD="$CMD $y";;
- -l*)
- y=`echo $x | sed 's,^-l\(.*\),\1,g'`;
- LINKCMD="$LINKCMD $x";;
- /*.c)
- SOURCES="$SOURCES $x";;
- *.c)
- SOURCES="$SOURCES $x";;
- /*.cc)
- SOURCES="$SOURCES $x";;
- *.cc)
- SOURCES="$SOURCES $x";;
- /*.cpp)
- SOURCES="$SOURCES $x";;
- *.cpp)
- SOURCES="$SOURCES $x";;
- /*.o)
- LINKCMD="$LINKCMD $x";;
- *.o)
- LINKCMD="$LINKCMD $x";;
- *)
- # Try to quote uninterpreted options
- y=`echo $x | sed 's,",\\\",g'`;
- LINKCMD="$LINKCMD $y";;
- esac
- shift
-done
-
-#Return code from compiler, linker.sh and finally this script...
-RES=0
-
-# Accumulated object names
-ACCUM_OBJECTS=""
-
-# A temporary object file location
-TMPOBJDIR=/tmp/tmpobj$$
-mkdir $TMPOBJDIR
-
-# Compile
-for x in $SOURCES; do
- start_time=`date '+%s'`
- # Compile each source
- if [ $LINKING = false ]; then
- # We should have an output defined, which is a directory
- # or an object file
- case $OUTFILE in
- /*.o)
- # Simple output, SOURCES should be one single
- n=`echo $SOURCES | wc -w`;
- if [ $n -gt 1 ]; then
- echo "cc.sh:Error, multiple sources, one object output.";
- exit 1;
- else
- output_filename=`cygpath -m $OUTFILE`;
- fi;;
- *.o)
- # Relative path needs no translation
- n=`echo $SOURCES | wc -w`
- if [ $n -gt 1 ]; then
- echo "cc.sh:Error, multiple sources, one object output."
- exit 1
- else
- output_filename=$OUTFILE
- fi;;
- /*)
- # Absolute directory
- o=`echo $x | sed 's,.*/,,' | sed 's,\.c$,.o,'`
- output_filename=`cygpath -m $OUTFILE`
- output_filename="$output_filename/${o}";;
- *)
- # Relative_directory or empty string (.//x.o is valid)
- o=`echo $x | sed 's,.*/,,' | sed 's,\.cp*$,.o,'`
- output_filename="./${OUTFILE}/${o}";;
- esac
- else
- # We are linking, which means we build objects in a temporary
- # directory and link from there. We should retain the basename
- # of each source to make examining the exe easier...
- o=`echo $x | sed 's,.*/,,' | sed 's,\.c$,.o,'`
- output_filename=$TMPOBJDIR/$o
- ACCUM_OBJECTS="$ACCUM_OBJECTS $output_filename"
- fi
- # Now we know enough, lets try a compilation...
- MPATH=`cygpath -m $x`
- if [ $PREPROCESSING = true ]; then
- output_flag="-E"
- else
- output_flag="-c -Fo`cygpath -m ${output_filename}`"
- fi
- params="$COMMON_CFLAGS $MD $DEBUG_FLAGS $OPTIMIZE_FLAGS \
- $CMD ${output_flag} $MPATH"
- if [ "X$CC_SH_DEBUG_LOG" != "X" ]; then
- echo cc.sh "$SAVE" >>$CC_SH_DEBUG_LOG
- echo cl.exe $params >>$CC_SH_DEBUG_LOG
- fi
- eval cl.exe $params >$MSG_FILE 2>$ERR_FILE
- RES=$?
- if test $PREPROCESSING = false; then
- cat $ERR_FILE >&2
- tail +2 $MSG_FILE
- else
- tail +2 $ERR_FILE >&2
- if test $DEPENDENCIES = true; then
- #after_pp=`date '+%s'`
- #echo Preprocessed $x':' `expr $after_pp '-' $start_time` >&2
- if test `grep -v $x $MSG_FILE | grep -c '#line'` != "0"; then
- o=`echo $x | sed 's,.*/,,' | sed 's,\.cp*$,.o,'`
- echo -n $o':'
- #cat $MSG_FILE | grep '#line' | grep -v $x | awk -F\" '{printf("\"%s\"\n",$2)}' | sort -u | xargs -n1 cygpath -m -s | xargs -n1 cygpath | awk '{printf("\\\n %s ",$1)}'
- cat $MSG_FILE | grep '#line' | grep -v $x | awk -F\" '{printf("%s\n",$2)}' | sort -u | tee nisse.txt | cygpath -f - -m -s | cygpath -f - | tee kalle.txt | awk '{printf("\\\n %s ",$0)}'
- echo
- echo
- after_sed=`date '+%s'`
- echo Made dependencises for $x':' `expr $after_sed '-' $start_time` 's' >&2
- fi
- else
- cat $MSG_FILE
- fi
- fi
- rm -f $ERR_FILE $MSG_FILE
- if [ $RES != 0 ]; then
- rm -rf $TMPOBJDIR
- exit $RES
- fi
-done
-
-# If we got here, we succeeded in compiling (if there were anything to compile)
-# The output filename should name an executable if we're linking
-if [ $LINKING = true ]; then
- case $OUTFILE in
- "")
- # Use the first source name to name the executable
- first_source=""
- for x in $SOURCES; do first_source=$x; break; done;
- if [ -n "$first_source" ]; then
- e=`echo $x | sed 's,.*/,,' | sed 's,\.c$,.exe,'`;
- out_spec="-o $e";
- else
- out_spec="";
- fi;;
- *)
- out_spec="-o $OUTFILE";;
- esac
- # Descide which standard library to link against
- case $MD in
- -ML)
- stdlib="-lLIBC";;
- -MLd)
- stdlib="-lLIBCD";;
- -MD)
- stdlib="-lMSVCRT";;
- -MDd)
- stdlib="-lMSVCRTD";;
- -MT)
- stdlib="-lLIBCMT";;
- -MTd)
- stdlib="-lLIBMTD";;
- esac
- # And finally call the next script to do the linking...
- params="$out_spec $LINKCMD $stdlib"
- eval ld.sh $ACCUM_OBJECTS $params
- RES=$?
-fi
-rm -rf $TMPOBJDIR
-
-exit $RES
View
184 utils/win32/vc/ld.sh
@@ -1,184 +0,0 @@
-#! /bin/sh
-# set -x
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2002-2009. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-# Save the command line for debug outputs
-SAVE="$@"
-kernel_libs="kernel32.lib advapi32.lib"
-gdi_libs="gdi32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib"
-DEFAULT_LIBRARIES="$kernel_libs $gdi_libs"
-
-CMD=""
-STDLIB=MSVCRT.LIB
-DEBUG_BUILD=false
-STDLIB_FORCED=false
-BUILD_DLL=false
-OUTPUT_FILENAME=""
-
-while test -n "$1" ; do
- x="$1"
- case "$x" in
- -dll| -DLL)
- BUILD_DLL=true;;
- -L/*|-L.*)
- y=`echo $x | sed 's,^-L\(.*\),\1,g'`;
- MPATH=`cygpath -m $y`;
- CMD="$CMD -libpath:\"$MPATH\"";;
- -link)
- # libtool tries to be helpful by passing -link.
- # theoretically that should be via cc.sh, but this
- # is all a mystery still...
- ;;
- -lMSVCRT|-lmsvcrt)
- STDLIB_FORCED=true;
- STDLIB=MSVCRT.LIB;;
- -lMSVCRTD|-lmsvcrtd)
- STDLIB_FORCED=true;
- STDLIB=MSVCRTD.LIB;;
- -lLIBCMT|-llibcmt)
- STDLIB_FORCED=true;
- STDLIB=LIBCMT.LIB;;
- -lLIBCMTD|-llibcmtd)
- STDLIB_FORCED=true;
- STDLIB=LIBCMTD.LIB;;
- -lsocket)
- DEFAULT_LIBRARIES="$DEFAULT_LIBRARIES WS2_32.LIB";;
- -l*)
- y=`echo $x | sed 's,^-l\(.*\),\1,g'`;
- MPATH=`cygpath -m $y`;
- CMD="$CMD \"${MPATH}.lib\"";;
- -g)
- DEBUG_BUILD=true;;
- -pdb:none|-incremental:no)
- ;;
- -implib:*)
- y=`echo $x | sed 's,^-implib:\(.*\),\1,g'`;
- MPATH=`cygpath -m $y`;
- CMD="$CMD -implib:\"${MPATH}\"";;
- -def:*)
- y=`echo $x | sed 's,^-def:\(.*\),\1,g'`;
- MPATH=`cygpath -m $y`;
- CMD="$CMD -def:\"${MPATH}\"";;
- -o)
- shift
- MPATH=`cygpath -m $1`;
- OUTPUT_FILENAME="$MPATH";;
- -o/*)
- y=`echo $x | sed 's,^-[Io]\(/.*\),\1,g'`;
- MPATH=`cygpath -m $y`;
- OUTPUT_FILENAME="$MPATH";;
- /*)
- MPATH=`cygpath -m $x`;
- CMD="$CMD \"$MPATH\"";;
- *)
- y=`echo $x | sed 's,",\\\",g'`;
- CMD="$CMD \"$y\"";;
- esac
- shift
-done
-if [ $DEBUG_BUILD = true ]; then
- linktype="-debug -pdb:none"
- if [ $STDLIB_FORCED = false ]; then
- STDLIB=MSVCRTD.LIB
- fi
-fi
-# Generate a PDB
-linkadd_pdb=""
-case "$OUTPUT_FILENAME" in
- *.exe|*.EXE)
- fn=`echo "$OUTPUT_FILENAME" | sed 's,[eE][xX][eE]$,,g'`;
- linkadd_pdb="-pdb:\"${fn}pdb\"";;
- *.dll|*.DLL)
- fn=`echo "$OUTPUT_FILENAME" | sed 's,[dD][lL][lL]$,,g'`;
- linkadd_pdb="-pdb:\"${fn}pdb\"";;
- "")
- linkadd_pdb="-pdb:\"a.pdb\"";;
- *)
- linkadd_pdb="-pdb:\"${OUTPUT_FILENAME}.pdb\"";;
-esac
-
- linktype="-debug $linkadd_pdb"
-
-if [ $BUILD_DLL = true ];then
- case "$OUTPUT_FILENAME" in
- *.exe|*.EXE)
- echo "Warning, output set to .exe when building DLL" >&2
- CMD="-dll -out:\"$OUTPUT_FILENAME\" $CMD";
- OUTPUTRES="${OUTPUT_FILENAME}\;2";
- MANIFEST="${OUTPUT_FILENAME}.manifest";;
- *.dll|*.DLL)
- CMD="-dll -out:\"$OUTPUT_FILENAME\" $CMD";
- OUTPUTRES="${OUTPUT_FILENAME}\;2";
- MANIFEST="${OUTPUT_FILENAME}.manifest";;
- "")
- CMD="-dll -out:\"a.dll\" $CMD";
- OUTPUTRES="a.dll\;2";
- MANIFEST="a.dll.manifest";;
- *)
- CMD="-dll -out:\"${OUTPUT_FILENAME}.dll\" $CMD";
- OUTPUTRES="${OUTPUT_FILENAME}.dll\;2";
- MANIFEST="${OUTPUT_FILENAME}.dll.manifest";;
- esac
-else
- case "$OUTPUT_FILENAME" in
- *.exe|*.EXE)
- CMD="-out:\"$OUTPUT_FILENAME\" $CMD";
- OUTPUTRES="${OUTPUT_FILENAME}\;1"
- MANIFEST="${OUTPUT_FILENAME}.manifest";;
- *.dll|*.DLL)
- echo "Warning, output set to .dll when building EXE" >&2
- CMD="-out:\"$OUTPUT_FILENAME\" $CMD";
- OUTPUTRES="${OUTPUT_FILENAME}\;1";
- MANIFEST="${OUTPUT_FILENAME}.manifest";;
- "")
- CMD="-out:\"a.exe\" $CMD";
- OUTPUTRES="a.exe\;1";
- MANIFEST="a.exe.manifest";;
- *)
- CMD="-out:\"${OUTPUT_FILENAME}.exe\" $CMD";
- OUTPUTRES="${OUTPUT_FILENAME}.exe\;1";
- MANIFEST="${OUTPUT_FILENAME}.exe.manifest";;
- esac
-fi
-
-p=$$
-CMD="$linktype -nologo -incremental:no $CMD $STDLIB $DEFAULT_LIBRARIES"
-if [ "X$LD_SH_DEBUG_LOG" != "X" ]; then
- echo "pwd: `pwd`" >>$LD_SH_DEBUG_LOG
- echo ld.sh "$SAVE" >>$LD_SH_DEBUG_LOG
- echo link.exe $CMD >>$LD_SH_DEBUG_LOG
-fi
-eval link.exe "$CMD" >/tmp/link.exe.${p}.1 2>/tmp/link.exe.${p}.2
-RES=$?
-CMANIFEST=`cygpath $MANIFEST`
-if [ "$RES" = "0" -a -f "$CMANIFEST" ]; then
- eval mt.exe -nologo -manifest "$MANIFEST" -outputresource:"$OUTPUTRES" >>/tmp/link.exe.${p}.1 2>>/tmp/link.exe.${p}.2
- RES=$?
- if [ "$RES" != "0" ]; then
- REMOVE=`echo "$OUTPUTRES" | sed 's,\\\;[12]$,,g'`
- CREMOVE=`cygpath $REMOVE`
- rm -f "$CREMOVE"
- fi
- rm -f "$CMANIFEST"
-fi
-
-tail +2 /tmp/link.exe.${p}.2 >&2
-cat /tmp/link.exe.${p}.1
-rm -f /tmp/link.exe.${p}.2 /tmp/link.exe.${p}.1
-exit $RES
View
87 utils/win32/vc/mc.sh
@@ -1,87 +0,0 @@
-#! /bin/sh
-# set -x
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2002-2009. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-# Save the command line for debug outputs
-SAVE="$@"
-CMD=""
-OUTPUT_DIRNAME=""
-
-# Find the correct mc.exe. This could be done by the configure script,
-# But as we seldom use the resource compiler, it might as well be done here...
-MCC=""
-save_ifs=$IFS
-IFS=:
-for p in $PATH; do
- if [ -f $p/mc.exe ]; then
- if [ -n "`$p/mc.exe -? 2>&1 >/dev/null </dev/null \
- | grep -i \"message compiler\"`" ]; then
- MCC=$p/mc.exe
- fi
- fi
-done
-IFS=$save_ifs
-
-if [ -z "$MCC" ]; then
- echo 'mc.exe not found!' >&2
- exit 1
-fi
-
-while test -n "$1" ; do
- x="$1"
- case "$x" in
- -o)
- shift
- OUTPUT_DIRNAME="$1";;
- -o/*)
- y=`echo $x | sed 's,^-[Io]\(/.*\),\1,g'`;
- OUTPUT_DIRNAME="$y";;
- -I)
- shift
- MPATH=`cygpath -m $1`;
- CMD="$CMD -I\"$MPATH\"";;
- -I/*)
- y=`echo $x | sed 's,^-[Io]\(/.*\),\1,g'`;
- MPATH=`cygpath -m $y`;
- CMD="$CMD -I\"$MPATH\"";;
- *)
- MPATH=`cygpath -m -a $x`;
- CMD="$CMD \"$MPATH\"";;
- esac
- shift
-done
-p=$$
-if [ "X$MC_SH_DEBUG_LOG" != "X" ]; then
- echo rc.sh "$SAVE" >>$MC_SH_DEBUG_LOG
- echo rc.exe $CMD >>$MC_SH_DEBUG_LOG
-fi
-if [ -n "$OUTPUT_DIRNAME" ]; then
- cd $OUTPUT_DIRNAME
- RES=$?
- if [ "$RES" != "0" ]; then
- echo "mc.sh: Error: could not cd to $OUTPUT_DIRNAME">&2
- exit $RES
- fi
-fi
-eval $MCC "$CMD" >/tmp/mc.exe.${p}.1 2>/tmp/mc.exe.${p}.2
-RES=$?
-tail +2 /tmp/mc.exe.${p}.2 >&2
-cat /tmp/mc.exe.${p}.1
-rm -f /tmp/mc.exe.${p}.2 /tmp/mc.exe.${p}.1
-exit $RES
View
86 utils/win32/vc/rc.sh
@@ -1,86 +0,0 @@
-#! /bin/sh
-# set -x
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2002-2009. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-# Save the command line for debug outputs
-SAVE="$@"
-CMD=""
-OUTPUT_FILENAME=""
-
-# Find the correct rc.exe. This could be done by the configure script,
-# But as we seldom use the resource compiler, it might as well be done here...
-RCC=""
-save_ifs=$IFS
-IFS=:
-for p in $PATH; do
- if [ -f $p/rc.exe ]; then
- if [ -n "`$p/rc.exe -? 2>&1 | grep -i "resource compiler"`" ]; then
- RCC=$p/rc.exe
- fi
- fi
-done
-IFS=$save_ifs
-
-if [ -z "$RCC" ]; then
- echo 'rc.exe not found!' >&2
- exit 1
-fi
-
-while test -n "$1" ; do
- x="$1"
- case "$x" in
- -o)
- shift
- MPATH=`cygpath -m $1`;
- OUTPUT_FILENAME="$MPATH";;
- -o/*)
- y=`echo $x | sed 's,^-[Io]\(/.*\),\1,g'`;
- MPATH=`cygpath -m $y`;
- OUTPUT_FILENAME="$MPATH";;
- -I)
- shift
- MPATH=`cygpath -m $1`;
- CMD="$CMD -I\"$MPATH\"";;
- -I/*)
- y=`echo $x | sed 's,^-[Io]\(/.*\),\1,g'`;
- MPATH=`cygpath -m $y`;
- CMD="$CMD -I\"$MPATH\"";;
- /*)
- MPATH=`cygpath -m $x`;
- CMD="$CMD \"$MPATH\"";;
- *)
- y=`echo $x | sed 's,",\\\",g'`;
- CMD="$CMD \"$y\"";;
- esac
- shift
-done
-p=$$
-if [ -n "$OUTPUT_FILENAME" ]; then
- CMD="-Fo$OUTPUT_FILENAME $CMD"
-fi
-if [ "X$RC_SH_DEBUG_LOG" != "X" ]; then
- echo rc.sh "$SAVE" >>$RC_SH_DEBUG_LOG
- echo rc.exe $CMD >>$RC_SH_DEBUG_LOG
-fi
-eval $RCC "$CMD" >/tmp/rc.exe.${p}.1 2>/tmp/rc.exe.${p}.2
-RES=$?
-tail +2 /tmp/rc.exe.${p}.2 >&2
-cat /tmp/rc.exe.${p}.1
-rm -f /tmp/rc.exe.${p}.2 /tmp/rc.exe.${p}.1
-exit $RES

0 comments on commit 59da797

Please sign in to comment.
Something went wrong with that request. Please try again.