www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/08/17/08:41:52

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Date: Tue, 17 Aug 1999 08:39:31 -0400 (EDT)
From: mark AT lpb DOT niams DOT nih DOT gov
Message-Id: <199908171239.IAA01281@lpb.niams.nih.gov>
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Possible problem with Cygwin install
Mime-Version: 1.0

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.

--------------------------Start------------------------------------------------

#! /bin/tcsh
#    Written by M.S.
set params = ()
set ford = ()
foreach i ($argv)
 switch ($i)
  case -*:
   set params = ($params $i)
  breaksw
  case +*:
   set params = ($params $i)
  breaksw
  default:
   set ford = ($ford $i)
  breaksw
 endsw
end
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"
 else
     set dest = $ford[$nf-$nf]
        endif
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"
 else
  set installford = ( $installford $ford[$n-$n] )
  echo "MS $ford[$n-$n] exists"
 endif
 @ n++
 end
endif
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

---------------------------End-------------------------------------------------


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019