This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Creating some directory at install time.
- From: Richard Dawe <rich at phekda dot gotadsl dot co dot uk>
- To: Lucas Brasilino <brasilino at recife dot pe dot gov dot br>
- Cc: automake at gnu dot org
- Date: Fri, 05 Nov 2004 16:13:23 +0000
- Subject: Re: Creating some directory at install time.
- References: <418B9066.9080905@recife.pe.gov.br>
Hello.
Lucas Brasilino wrote:
[snip]
I'm wondering how can I create '$(localstatedir)/lib/$(PACKAGE)'
directory at install time. Am I right in redefining "install-confDATA"
target at Makefile.am??? Something like this:
You could use an install-*-local target in your Makefile.am. See the
following info page:
info automake extending
install-confDATA: $(conf_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(confdir)
$(mkinstalldirs) $(localstatedir)/lib/$(PACKAGE) # added by me
This would need to be:
$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/$(PACKAGE)
so that DESTDIR installs are supported. These are where the package
installed under a different prefix than it was configured. E.g.: it may
be installed like this:
make install DESTDIR=/some/path
See the section "Staged Installs" under:
info automake install
@list='$(conf_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(confDATA_INSTALL) $$d$$p $(DESTDIR)$(confdir)/$$f"; \
$(confDATA_INSTALL) $$d$$p $(DESTDIR)$(confdir)/$$f; \
done
Hope that helps, regards,
--
Richard Dawe [ http://homepages.nildram.co.uk/~phekda/richdawe/ ]
"You can't evaluate a man by logic alone."
-- McCoy, "I, Mudd", Star Trek