|
From: Mariano Suarez-A. <al...@ma...> - 2003-06-19 18:33:31
|
Hi all,
As you probably know, the file src/libs/scrollkeeper.h.in has a couple
of configuration path automake variables in it (prefix and another one)
The intent is, clearly, that they be substituted at configure time:
indeed, the file is listed in the AC_CONFIG_FILES. That does not work...
>From the autoconf texinfo doc, one learns that
Most of these variables have values that rely on `prefix' or
`exec_prefix'. It is deliberate that the directory output
variables keep them unexpanded: typically `@datadir@' will be
replaced by `${prefix}/share', not `/usr/local/share'.
This behavior is mandated by the GNU coding standards, [...]
A corollary is that you should not use these variables except in
Makefiles. [...]
Similarly you should not rely on `AC_OUTPUT_FILES' to replace
`datadir' and friends in your shell scripts and other files, rather
let `make' manage their replacement.
After that, the docs go on to give an example, which, for scrollkeeper, leads easily following
The docs go on to give an example, which is easily adapted to fix the above
scrollkeeper bug. This is not a perfect fix, since BUILT_SOURCES only works
for a few targets, but oh well, most people just make && make install, so
that should be ok.
Follows a patch (which you'll also find as an attachment) to the latest
version I could get my hands on (cvs was down)
Cheers,
-- m
--- scrollkeeper-0.3.12-orig/configure.in 2003-01-23 03:10:57.000000000 -0300
+++ scrollkeeper-0.3.12/configure.in 2003-06-17 04:43:15.000000000 -0300
@@ -211,7 +211,6 @@
AC_OUTPUT(
libs/Makefile
-libs/scrollkeeper.h
libuuid/Makefile
cl/Makefile
cl/src/Makefile
--- scrollkeeper-0.3.12-orig/libs/Makefile.am 2003-01-23 03:10:57.000000000 -0300
+++ scrollkeeper-0.3.12/libs/Makefile.am 2003-06-17 04:43:19.000000000 -0300
@@ -17,5 +17,14 @@
database.c \
uninstall.c \
update-url.c
+
+# Note BUILT_SOURCES is only taken into account for `make all' and `make check'
+# This sucks, but oh well..
+BUILT_SOURCES = scrollkeeper.h
libscrollkeeper_la_LIBADD = $(XML_LIBS) $(XSLT_LIBS)
+
+scrollkeeper.h : Makefile scrollkeeper.h.in
+ sed -e 's,@localstatedir\@,$(localstatedir),g' \
+ -e 's,@prefix\@,$(prefix),g' \
+ scrollkeeper.h.in > scrollkeeper.h
------------------------------------------------------------------------------
Mariano Suárez-Alvarez
Departamento de Matemática
Facultad de Ciencias Exactas y Naturales, Universidad de Buenos Aires
Ciudad Universitaria, Pabellón I. Buenos Aires (1428). Argentina.
http://mate.dm.uba.ar/~aldoc9
Je pense en effet que, sauf à croire au miracle, on ne peut attendre le
progrès de la raison que d'une action politique rationnellement orientée
vers la défense des conditions sociales de l'existence de la raison,
d'une mobilisation permanente de tous les producteurs culturels en vue
de défendre, par des interventions continues et modestes, les bases
institutionnelles de l'activité intellectuelle. Tout projet de
développement de l'esprit humain qui, oubliant l'enracinement historique
de la raison, compte sur la seule force de la raison et de la
prédication rationnelle pour faire avancer les causes de la raison, et
qui n'en appelle pas à la lutte politique pour tenter de doter la raison
et la liberté des intruments proprement politiques qui sont les
conditions de leur réalisation dans l'histoire, reste encore prisonnier
de l'illusion scolastique.
Pierre Bourdieu, Le point de vue scolastique, ``Raisons pratiques.
Sur la théorie de l'action''.
Points, vol. 331. París: Éditions du Seuil, 1994.
------------------------------------------------------------------------------
|