bug-gnulib
[Top][All Lists]
Advanced

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

Re: DEPENDS_ON_* preprocessor symbols


From: Ben Pfaff
Subject: Re: DEPENDS_ON_* preprocessor symbols
Date: Sun, 23 May 2010 12:14:45 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Bruno Haible <address@hidden> writes:

>> I noticed that there were references to
>> this preprocessor symbol and two related ones
>> (DEPENDS_ON_LIBCHARSET and DEPENDS_ON_LIBICONV) in
>> relocatable.c.  Their purpose was not documented, but I think
>> that I figured out what they are for.  I'm proposing the
>> following update to doc/relocatable-maint.texi in gnulib as
>> explanation.
>
> Thanks for this text. Yes it is correct. Except for two details:
>   - "... C preprocessor symbols to nonzero values"
>     I would write "... C preprocessor symbols to 1"
>     since there is no point in using other values than 1.
>   - "(e.g. with address@hidden)"
>     I would omit that, because in larger projects it's more appropriate
>     to define these through AM_CPPFLAGS in some Makefile.am.

Thank you.  I made both of your suggested changes and pushed this
out.  I'm appending the actual commit, for reference.

> I wish the list of libraries that support this mechanism was not hard-coded.
> Do you have an idea for making it extensible?

It is not clear to me why this mechanism is here.  I guess that
it must be to avoid the need for the caller to also call the
individual lib<name>_set_relocation_prefix functions directly.
But it would be much more flexible if the caller was given that
option.  Each program could simply call the necessary functions
for the libraries that it uses.  It would also avoid the
necessity to pull in unneeded libraries for some binaries in a
given package.

I guess that calling the lib<name>_set_relocation_prefix
functions directly *is* an option, really.  I am reluctant to do
so, though, because these functions are not documented parts of
the libraries that have them.  Have you considered documenting
them?

--8<--------------------------cut here-------------------------->8--

>From bf776338948242ad73595b46d80b7b2930c816c3 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <address@hidden>
Date: Sun, 23 May 2010 12:02:39 -0700
Subject: [PATCH] Update maintainer documentation for 'relocatable-prog' module.

---
 ChangeLog                  |    6 ++++++
 doc/relocatable-maint.texi |   21 +++++++++++++++++++++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e7ab8ad..40bd312 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-23  Ben Pfaff  <address@hidden>
+
+       Update maintainer documentation for 'relocatable-prog' module.
+       * doc/relocatable-maint.texi: Update.
+       Comments by Bruno Haible.
+
 2010-05-23  Bruno Haible  <address@hidden>
 
        git-merge-changelog: Enable --split-merged-entry by default.
diff --git a/doc/relocatable-maint.texi b/doc/relocatable-maint.texi
index 72c6eaa..58160cf 100644
--- a/doc/relocatable-maint.texi
+++ b/doc/relocatable-maint.texi
@@ -89,6 +89,27 @@ bindtextdomain (PACKAGE, relocate (LOCALEDIR));
 The prototype for this function is in @file{relocatable.h}.
 
 @item
+The @code{set_program_name} function can also configure some
+additional libraries to relocate files that they access, by defining
+corresponding C preprocessor symbols to 1.  The libraries for which
+this is supported and the corresponding preprocessor symbols are:
+
address@hidden @asis
address@hidden libcharset
address@hidden
+
address@hidden libiconv
address@hidden
+
address@hidden libintl
address@hidden
address@hidden table
+
+Defining the symbol for a library makes every program in the package
+depend on that library, whether the program really uses the library or
+not, so this feature should be used with some caution.
+
address@hidden
 If your package installs shell scripts, also import the
 @code{relocatable-script} module.  Then, near the beginning of each
 shell script that your package installs, add the following:
-- 
1.7.1


-- 
I love deadlines.
I love the whooshing noise they make as they go by.
--Douglas Adams



reply via email to

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