Makefile.in respect $(DESTDIR) - Patch applied

Sjors Gielen mailinglist@dazjorz.com
Mon Feb 23 17:17:00 GMT 2009


Hello,

I noticed winsup does not respect $(DESTDIR) in its installation 
process. The applied patch modifies the Makefile.in files, to have them 
use $(DESTDIR) in all install lines. This includes:
    * install(1)   (also MKDIRP)
    * the mkinstalldirs / $(mkinstalldirs) commands
    * a ln -sf line
I may have forgotten some, however the following commands show the patch 
works:

    build$ ../src/configure --prefix=/tmp/wrongplace
    build$ make
    build$ make install DESTDIR=/tmp/rightplace

This correctly installs all files to /tmp/rightplace/tmp/wrongplace, 
/tmp/wrongplace is never created. newlib already respects DESTDIR in its 
makefiles (it does use automake). This patch applies cleanly to the 
current CVS revision.

After applying this patch, the commands in FAQ section 6.18 "How do I 
build Cygwin on my own" can be changed to:

   mkdir build install;
   cd build;
   (../src/configure --prefix= -v; make) >& make.out
   make install DESTDIR=../install > install.log 2>&1

After these commands, all files are in ../install and configured to be 
installed in / (prefix is empty, i.e. / without the last slash). In my 
opinion, this is a cleaner way to compile Cygwin than giving 
--prefix=../install to configure.

Sjors
-------------- next part --------------
A non-text attachment was scrubbed...
Name: destdir.patch
Type: text/x-patch
Size: 13919 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20090223/c2a996b2/attachment.bin>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list