[Top][All Lists]

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

Creating some directory at install time.

From: Lucas Brasilino
Subject: Creating some directory at install time.
Date: Fri, 05 Nov 2004 11:38:30 -0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.4.2) Gecko/20040308


        First of all, I've been googling around searching this issue
with no success.
        I've got a quite newbie question about how can I create
some directory at install time (when executing 'make install').
I've got an project that is a daemon which is already be built
nicely using autoconf + automake.
        Now I'm working on installing a configuration file at install
time. So I've created an $(topdir)/conf directory with "" and
"" files. is the following:

confdir = $(sysconfdir)
conf_DATA = siri-server.conf

        -e 's,%SIRI_DATADIR%,$(localstatedir)/lib/$(PACKAGE),g' $< > $@

        I'm wondering how can I create '$(localstatedir)/lib/$(PACKAGE)'
directory at install time. Am I right in redefining "install-confDATA"
target at Something like this:

install-confDATA: $(conf_DATA)
        $(mkinstalldirs) $(DESTDIR)$(confdir)
        $(mkinstalldirs) $(localstatedir)/lib/$(PACKAGE) # added by me
        @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; \

        Thanks in advance

bests regards


Lucas Brasilino
Emprel -        Empresa Municipal de Informatica (pt_BR)
                Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-32327078

reply via email to

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