[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 |
Hi
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 "Makefile.am" and
"siri-server.conf.in" files. Makefile.am is the following:
confdir = $(sysconfdir)
conf_DATA = siri-server.conf
siri-server.conf: siri-server.conf.in
sed -e 's,%SIRI_MODAUTH_DEFAULT%,$(SIRI_MODAUTH_DEFAULT),g' \
-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 Makefile.am??? Something like this:
install-confDATA: $(conf_DATA)
@$(NORMAL_INSTALL)
$(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; \
done
Thanks in advance
bests regards
--
[]'s
Lucas Brasilino
address@hidden
http://www.recife.pe.gov.br
Emprel - Empresa Municipal de Informatica (pt_BR)
Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-32327078
- Creating some directory at install time.,
Lucas Brasilino <=