[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
troubles with conditional install using automake
From: |
Guillaume Rousse |
Subject: |
troubles with conditional install using automake |
Date: |
Wed, 01 Dec 2004 15:29:10 +0100 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
I'm trying to implement conditional installation of stuff with
non-standard location, such as init-script. The basic idea is not to
install them unless the user specify a location when running ./configure
However, it doesn't work with automake conditional
in configure.ac:
AC_ARG_WITH(
initrddir,
[ --with-initrddir=DIR path to install init script],
initrddir=$withval,
initrddir=""
)
AC_SUBST(initrddir)
AM_CONDITIONAL(WANT_INITRD, test "$initrddir" != "")
in makefile.am, either:
if WANT_INITRD
initrd_SCRIPTS = parserd
endif
In this situation, I don't have any installation target for initrd
scripts in generated Makefile
or:
if WANT_INITRD
INITRD = parserd
else
INITRD =
endif
initrd_SCRIPTS = $(INITRD)
In this situation, I have an installation target for initrd scripts in
generated Makefile, using $(initrd_SCRIPTS) as dependency. However,
initrd_SCRIPTS is defined to $(INITRD) at the beginning of the Makefile,
while INITRD is defined at the end of the Makefile, with other
conditional variables, and thus appears empty when it is evaluated.
So, is there any solution to my problem before i consider using autoconf
substitutions instead ?
BTW, I'm using autoconf 2.53 and automake 1.8
--
Napalm is an area support weapon
-- Murphy's Military Laws n°126
- troubles with conditional install using automake,
Guillaume Rousse <=