This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc produces foo.exe, not foo


Hi Arne,

[...]
>What is the standard way of circumventing this problem? Simply writing
>
>          mv foo.exe bar.exe
>
>is not a full solution, because that is not portable. Is it necessary to
>write some autoconf stuff to check what the extension of the executable
>resulting from calling gcc is?

Don't use "mv" or "cp", but "install" instead and
replace install.exe with:

------------------------< snip snip snip >-----------------------------
#! /bin/sh

# file: install
# author:  earnie                  email: earnie_boyd@hotmail.com
#
# Install Preprocessor for the gnu-win32 "make install" command.
#
# To use:
#
#   copy this file to /usr/bin/install (earlier in the
#   path than the default GNU install).
#
# Note:
#   No warranty implicit or explicit is given.
#   You may copy, distribute and use as you see fit.
#   USE AT YOU OWN RISK.
#
# changed: M.Hirmke                email: mh@mike.franken.de
#   changed ginstall to cyg_install, because some packages are looking
#   for ginstall
#
# changed: Dr David Coe            email: david@coent.demon.co.uk
#   "I seem to remember earnie's script gave trouble (in X11 or lesstif
#    make install) when both <exec.exe> and <exec> are present
#    simultaneously). The attached helped."
#
# changed: Dr Pierre A. Humblet    email: humblet@eurecom.fr
#    Modify logic to work when several files are installed in a
#    directory, some with the .exe extension and others without.

tstr=""
while test $# -gt 1;
do
  if test -e $1.exe;
  then
    suffix=".exe";
  else
    suffix="";
  fi
  tstr="${tstr}${1}${suffix} "
  shift;
done
if test -d $1
then
  suffix="";
fi
tstr="${tstr}${1}${suffix}"

eval "cyg_install.exe $tstr";
exit
------------------------< snip snip snip >-----------------------------

>
>Thanx,
>
>-- Arne.

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://aquarius.franken.de/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]