This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Creating some directory at install time.


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]