automake
[Top][All Lists]
Advanced

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

make distcheck fail due to unset DESTDIR


From: Roger Leigh
Subject: make distcheck fail due to unset DESTDIR
Date: Sat, 28 Feb 2009 14:14:27 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

Hi folks,

In a Makefile.am, I have the following:

------------------
if BUILD_DEBVERSION
pg_server_lib_LTLIBRARIES =     \
        debversion.la

debversion_la_SOURCES = \
        debversion.cc

debversion_la_CXXFLAGS = -I$(pg_server_includedir)
debversion_la_LDFLAGS = -module -avoid-version $(APT_PKG_LIBS)

pg_contrib_DATA =                       \
        debversion.sql                  \
        uninstall_debversion.sql
endif

debversion.sql: debversion.sql.in
        sed 's,MODULE_PATHNAME,$$libdir/$*,g' $< >$@
----------------

However, "make distcheck" fails, with:

make[3]: Entering directory `/home/rleigh/sbuild/sbuild-0.58.0/_build/db'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/usr/share/postgresql/8.3/contrib" || /bin/mkdir -p 
"/usr/share/postgresql/8.3/contrib"
 /usr/bin/install -c -m 644 'debversion.sql' 
'/usr/share/postgresql/8.3/contrib/debversion.sql'
/usr/bin/install: cannot create regular file 
`/usr/share/postgresql/8.3/contrib/debversion.sql': Permission denied
 /usr/bin/install -c -m 644 '../../db/uninstall_debversion.sql' 
'/usr/share/postgresql/8.3/contrib/uninstall_debversion.sql'
/usr/bin/install: cannot create regular file 
`/usr/share/postgresql/8.3/contrib/uninstall_debversion.sql': Permission denied


The rule itself looks OK:
install-pg_contribDATA: $(pg_contrib_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(pg_contribdir)" || $(MKDIR_P) "$(DESTDIR)$(pg_contribdir)"
        @list='$(pg_contrib_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
          echo " $(pg_contribDATA_INSTALL) '$$d$$p' 
'$(DESTDIR)$(pg_contribdir)/$$f'"; \
          $(pg_contribDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pg_contribdir)/$$f"; \
        done

It contains DESTDIR, and DESTDIR is set in the top-level Makefile in the
distcheck rule.  So I'm not sure where the cause of this failure lies--
I can't see anything obvious in the Makefile.am.

I tried removing the automake conditional in case that screwed things
up subtly, but it makes no difference.


I'm using automake-1.10.1 on Debian GNU/Linux.

The full source is at:
http://nagini.codelibre.net/~rleigh/sbuild-0.58.0.tar.gz
(db/Makefile.am is the Makefile in question.)


Many thanks,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: signature.asc
Description: Digital signature


reply via email to

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