Possible problem with Cygwin install

mark@lpb.niams.nih.gov mark@lpb.niams.nih.gov
Tue Aug 17 05:39:00 GMT 1999

Dear Geoff,

     Thank you for responding to my previous bug report.  I am sure you are
quite busy.  If you are not the person I should be sending these to, let me
know.  This letter concerns another bug I have found in using Cygwin.  This
bug is generic to Cygwin, as described below, but I have sort of a patch.

     Since most Unix makefiles install executables that don't have
extensions, a typical Unix makefile will have stuff like

    gcc - o prog prog.c
    install prog prog_loc

     Cygwin and Mingw produce an executable named prog.exe in response to the
first line, so that the second line generates the error message, "prog not
found".  Thus "make install" on typical Unix makefiles often fails under
Cygwin.  I have written a preprocessor to install to compensate for this
problem.  The pre-processor is a simple tcsh command file, but the logic could
easily be incorporated into C code.  If there is any interest, and I could get
my hands on the current source code for the install command, I would be happy
to try to modify it so it, by itself, would act as my pre-processor with the
current source code acts.

     Another solution to the install problem would be to reconsider the
decision to cause gcc to append .exe automatically to executables.  You can
always use "-o prog.exe" when you want the .exe.

     The tcsh preprocessor I have written for install follows below.  I
abrogate all rights to it. You may do with it as you see fit.


#! /bin/tcsh
#    Written by M.S.
set params = ()
set ford = ()
foreach i ($argv)
 switch ($i)
  case -*:
   set params = ($params $i)
  case +*:
   set params = ($params $i)
   set ford = ($ford $i)
echo "MS params are $params"
echo "MS ford are $ford"
set nf = ${#ford}
set installford = ()   #just in case nf = 1
set dest = ""          #just in case nf = 1
if ("$nf" > "1") then
#determine proper destination
if (!(-e $ford[$nf-$nf]:t) && (-e $ford[$nf-$nf]:t".exe")) then
     set dest = $ford[$nf-$nf]".exe"
     set dest = $ford[$nf-$nf]
echo "MS dest is $dest"
#check for proper files to install
set n = 1
while ( "$n" < "$nf" )
 echo "MS check $ford[$n-$n]"
 if (  (!(-e $ford[$n-$n]) ) && (-e $ford[$n-$n]".exe") ) then
  set installford = ($installford $ford[$n-$n]".exe")
  echo "MS $ford[$n-$n] replaced"
  set installford = ( $installford $ford[$n-$n] )
  echo "MS $ford[$n-$n] exists"
 @ n++
echo "MS* /CYGNUS/CYGWIN-b20/H-I586-cygwin32/BIN/install.exe $params   \
 $installford  $dest"
eval /CYGNUS/CYGWIN-b20/H-I586-cygwin32/BIN/install.exe $params   \
 $installford  $dest


Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

More information about the Cygwin mailing list