From: Bruno Haible Date: Mon, 7 Mar 2005 20:01:37 +0000 (+0000) Subject: Explain how to modify src/Makefile.am. X-Git-Tag: v0.14.3~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6c3bb164948f955dc503bece9cecbfb9f94b8f0;p=thirdparty%2Fgettext.git Explain how to modify src/Makefile.am. --- diff --git a/gettext-tools/doc/ChangeLog b/gettext-tools/doc/ChangeLog index 94bac2664..e4f2a4d94 100644 --- a/gettext-tools/doc/ChangeLog +++ b/gettext-tools/doc/ChangeLog @@ -1,3 +1,9 @@ +2005-03-06 Bruno Haible + + * gettext.texi (src/Makefile): Document the steps that need to be done + when automake is used. + Reported by Alexandre Duret-Lutz . + 2005-03-06 Bruno Haible * gettext.texi (config.h.in): Explain the constraints for this file's diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index b45903b47..6eb49b36f 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -6858,7 +6858,7 @@ textdomain (@var{PACKAGE}); @end example To make LOCALEDIR known to the program, add the following lines to -Makefile.in: +@file{Makefile.in}: @example datadir = @@datadir@@ @@ -6913,6 +6913,66 @@ dist: Makefile $(DISTFILES) @end enumerate +Note that if you are using GNU @code{automake}, @file{Makefile.in} is +automatically generated from @file{Makefile.am}, and the first three +changes and the last change are not necessary. The remaining needed +@file{Makefile.am} modifications are the following: + +@enumerate +@item +To make LOCALEDIR known to the program, add the following to +@file{Makefile.am}: + +@example +_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" +@end example + +@noindent +for each specific module or compilation unit, or + +@example +AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" +@end example + +for all modules and compilation units together. Furthermore, add this +line to define @samp{localedir}: + +@example +localedir = $(datadir)/locale +@end example + +@item +To ensure that the final linking will use @code{@@LIBINTL@@} or +@code{@@LTLIBINTL@@} as a library, add the following to +@file{Makefile.am}: + +@example +_LDADD = @@LIBINTL@@ +@end example + +@noindent +for each specific program, or + +@example +LDADD = @@LIBINTL@@ +@end example + +for all programs together. Remember that when you use @code{libtool} +to link a program, you need to use @@LTLIBINTL@@ instead of @@LIBINTL@@ +for that program. + +@item +If you have an @file{intl/} directory, whose contents is created by +@code{gettextize}, then to ensure that it will be searched for +C preprocessor include files in all circumstances, add something like +this to @file{Makefile.am}: + +@example +AM_CPPFLAGS = -I../intl -I$(top_srcdir)/intl +@end example + +@end enumerate + @node lib/gettext.h, , src/Makefile, Adjusting Files @subsection @file{gettext.h} in @file{lib/} @cindex @file{gettext.h} file