automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: confused: $DISTDIR not recognized by distcheck


From: Andrew Suffield
Subject: Re: confused: $DISTDIR not recognized by distcheck
Date: Mon, 17 May 2004 13:59:10 +0100
User-agent: Mutt/1.5.6i

On Mon, May 17, 2004 at 11:17:51AM +0200, Richard Bos wrote:
> Makefile.am
> install-data-hook:
>         echo DEBUG DEBUG  DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
>         echo DESTDIR $(DESTDIR)
>         for i in cgi-bin icons; do \
>           install -d -m 0755 $(DESTDIR)/srv/server/www/cgi-bin/$$i; \
>         done
>         for i in freebusy locks; do \
>           install -d -m 0777 $(DESTDIR)/srv/server/www/cgi-bin/$$i; \
>         done
>         echo DEBUG DEBUG  DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG

You need $(prefix) in every path. You need $(DESTDIR) in any rules
you write by hand; rules generated by automake will already contain
it.

This would work:
           install -d -m 0755 $(DESTDIR)$(prefix)/srv/server/www/cgi-bin/$$i; \

This would be saner:

cgibindir = $(prefix)/srv/server/www/cgi-bin
...
           install -d -m 0755 $(DESTDIR)$(cgibindir)/$$i; \

And this is better still:

cgibindir = $(prefix)/srv/server/www/cgi-bin

cgibin_DATA = icons freebusy locks

(Leaving the problem of generating rules to automake)

What you really want is this:

srvdir = @srvdir@
cgibindir = $(srvdir)/server/www/cgi-bin

cgibin_DATA = icons freebusy locks

But it's difficult to persuade configure to set @srvdir@ appropriately.

With "make DESTDIR=/foo install", DESTDIR=/foo and prefix=/bar; with
distcheck, prefix=$(CURDIR)/foo/ and DESTDIR=, think it through.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]