Amanda-Users

Re: make w/ amanda ignoring DESTDIR

2002-09-16 21:20:59
Subject: Re: make w/ amanda ignoring DESTDIR
From: Jean-Louis Martineau <martinea AT iro.umontreal DOT ca>
To: "Brandon D. Valentine" <bandix AT structbio.vanderbilt DOT edu>
Date: Mon, 16 Sep 2002 21:02:58 -0400
Hi Brandon,

It works for me.
Which release of make are you using, it must be gnu make?

> grep DESTDIR Makefile common-src/Makefile
------------------------------------
Makefile:DESTDIR =
Makefile:       $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
Makefile:           echo " $(INSTALL_DATA) $(srcdir)/$$p 
$(DESTDIR)$(pkgdatadir)/$$p"; \
Makefile:           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p; \
Makefile:           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p"; \
Makefile:           $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
Makefile:         rm -f $(DESTDIR)$(pkgdatadir)/$$p; \
Makefile:       $(mkinstalldirs)  $(DESTDIR)$(pkgdatadir)
common-src/Makefile:DESTDIR =
common-src/Makefile:    $(mkinstalldirs) $(DESTDIR)$(libdir)
common-src/Makefile:        echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p 
$(DESTDIR)$(libdir)/$$p"; \
common-src/Makefile:        $(LIBTOOL)  --mode=install $(INSTALL) $$p 
$(DESTDIR)$(libdir)/$$p; \
common-src/Makefile:      $(LIBTOOL)  --mode=uninstall rm -f 
$(DESTDIR)$(libdir)/$$p; \
common-src/Makefile:    $(mkinstalldirs)  $(DESTDIR)$(libdir)
------------------------------------

I have the same reference to DESTDIR in the Makefile.in
Do you get them?

Jean-Louis


On Mon, Sep 16, 2002 at 06:34:14PM -0500, Brandon D. Valentine wrote:
> This is preplexing.  I'm attempting to build amanda inst packages for my
> SGIs (which are currently running their clients via NFS).  I cannot get
> the Amanda Makefiles to honor DESTDIR for the install target.
> 
> % printenv CC
> cc
> % printenv CFLAGS
> -mips3 -n32
> % ./configure --without-server --with-user=amanda --with-group=amanda
> --with-tape-server=backup --with-tape-device=/dev/nst0
> --with-index-server=backup --with-bsd-security --with-amandahosts
> --with-gnutar=/usr/local/bin/amtar --enable-shared --sysconfdir=/etc
> --localstatedir=/var/lib
> --with-gnutar-listdir=/var/lib/amanda/gnutar-lists
> [ configure output snipped]
> % make
> [ make completes successfully ]
> % make DESTDIR=/jaws/bandix/inst/tmproot/amanda install
> Making install in config
>         cd .. \
>           && CONFIG_FILES= CONFIG_HEADERS=config/config.h \
>              /sbin/sh ./config.status
> creating config/config.h
> config/config.h is unchanged
> Making install in common-src
>         /sbin/sh ../config/mkinstalldirs /usr/local/lib
> /sbin/sh ../libtool  --mode=install ../config/install-sh -c libamanda.la
> /usr/local/lib/libamanda.la
> ../config/install-sh -c .libs/libamanda-2.4.2p2.so.
> /usr/local/lib/libamanda-2.4.2p2.so.
> Cannot create /usr/local/lib/#inst.2799697# - Permission denied
> *** Error code 2 (bu21)
> *** Error code 1 (bu21)
> *** Error code 1 (bu21)
> 
> As you can see it's trying to install in /usr/local in spite of my
> specifying DESTDIR (which the Makefiles appear to use as an install
> prefix throughout).  I literally just built and installed GNUtar,
> OpenSSH, OpenSSL and libz in temproots using the DESTDIR make variable
> via GNU configure/autoconf/automake and the same environment.
> 
> Anyone ever seen this behavior and have speculation as to why Amanda's
> Makefiles don't appear to honor the DESTDIR make variable?  I've noticed
> this line in every Makefile generated by configure:
> DESTDIR =
> 
> Any suggested workarounds?
> 
> Thanks,
> 
> -- 
> Brandon D. Valentine <bandix AT structbio.vanderbilt DOT edu>
> Computer Geek, Center for Structural Biology
> 
> "This isn't rocket science -- but it _is_ computer science."
>       - Terry Lambert on current AT FreeBSD DOT org.

-- 
Jean-Louis Martineau             email: martineau AT IRO.UMontreal DOT CA 
Departement IRO, Universite de Montreal
C.P. 6128, Succ. CENTRE-VILLE    Tel: (514) 343-6111 ext. 3529
Montreal, Canada, H3C 3J7        Fax: (514) 343-5834

<Prev in Thread] Current Thread [Next in Thread>