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]

troubles with conditional install using automake


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



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