bug-gnu-utils
[Top][All Lists]
Advanced

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

Autoconf: Expansion of installation directory variables


From: Brad Hards
Subject: Autoconf: Expansion of installation directory variables
Date: Fri, 4 Jan 2002 21:52:54 +0800

G'day,

Been learning to use autoconf (after years of using configure scripts), and 
must say, I'm pretty damned impressed. Thanks to all concerned!

One thing that did strike me as a bit strange (probable bug) is the way in 
which directories are expanded. I expected that my Makefile would contain 
fully expanded variables, not relative variables.

For example, this fragment from Makefile.in:
INSTALL_DIR= @sbindir@
INSTALL_LIB= @libdir@
INSTALL_INC= @includedir@

With the default prefix of /usr/local, I thought that fragment would produce 
the following Makefile entries:
INSTALL_DIR= /usr/local/sbin
INSTALL_LIB= /usr/local/lib
INSTALL_INC= /usr/local/include

However what I get is
INSTALL_DIR= ${exec_prefix}/sbin
INSTALL_LIB= ${exec_prefix}/lib
INSTALL_INC= ${prefix}/include

No problem, except that I don't need prefix or exec_prefix for anything. So I 
hadn't written them into Makefile.in, and the INSTALL stuff ended up as 
/sbin, /lib, and /include (which is not what my configure script says will 
happen, since it firmly believes in the prefixes).

This behaviour isn't obvious from the documentation, and since automatically 
generated Makefiles aren't meant to be editted, then there doesn't seem to be 
any point in not expanding the variables. 
Alternatively, maybe the prefixes could be automatically included, if 
dependant variables are used.

Brad




reply via email to

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