]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Better way to define the dependencies of a program or library.
authorBruno Haible <bruno@clisp.org>
Mon, 7 Apr 2003 10:44:31 +0000 (10:44 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:21 +0000 (12:10 +0200)
13 files changed:
ChangeLog
config/install-reloc
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/Makefile.in
gettext-runtime/intl/Makefile.msvc
gettext-runtime/intl/relocatable.c
gettext-runtime/lib/ChangeLog
gettext-runtime/lib/Makefile.am
gettext-runtime/lib/Makefile.msvc
gettext-tools/lib/ChangeLog
gettext-tools/lib/Makefile.am
gettext-tools/lib/Makefile.msvc
gettext-tools/lib/relocatable.c

index 06289199f6b2b1e38fc34f719d5fa6de5bddc609..49094648bae0979499b1cc1fb76f1eeda0e77881 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-04-05  Bruno Haible  <bruno@clisp.org>
+
+       * config/install-reloc: Don't define NO_LIBRARIES.
+
 2003-04-01  Bruno Haible  <bruno@clisp.org>
 
        * README.mingw: New file.
index e4895fa0486268e2f20778c43ac8fc93aac4104a..030bee6779561f9c027f1863103d40ffcf5dac04 100755 (executable)
@@ -110,7 +110,7 @@ test -n "$libdirs" || exit 0
 
 # Compile wrapper.
 installdir=`echo "$destprog" | sed -e 's,/[^/]*$,,'`
-func_verbose $compile_command -I"$builddir" -I"$srcdir" -I"$config_h_dir" -DHAVE_CONFIG_H -DNO_LIBRARIES -DNO_XMALLOC -D"INSTALLPREFIX=\"$prefix\"" -D"INSTALLDIR=\"$installdir\"" -D"LIBPATHVAR=\"$library_path_var\"" -D"LIBDIRS=$libdirs" "$srcdir"/relocwrapper.c "$srcdir"/progname.c "$srcdir"/xreadlink.c "$srcdir"/canonicalize.c "$srcdir"/relocatable.c "$srcdir"/setenv.c "$srcdir"/strerror.c -o $destprog.wrapper || exit $?
+func_verbose $compile_command -I"$builddir" -I"$srcdir" -I"$config_h_dir" -DHAVE_CONFIG_H -DNO_XMALLOC -D"INSTALLPREFIX=\"$prefix\"" -D"INSTALLDIR=\"$installdir\"" -D"LIBPATHVAR=\"$library_path_var\"" -D"LIBDIRS=$libdirs" "$srcdir"/relocwrapper.c "$srcdir"/progname.c "$srcdir"/xreadlink.c "$srcdir"/canonicalize.c "$srcdir"/relocatable.c "$srcdir"/setenv.c "$srcdir"/strerror.c -o $destprog.wrapper || exit $?
 
 # Rename $destprog.wrapper -> $destprog -> $destprog.bin.
 ln -f $destprog $destprog.bin || exit 1
index a34bcd63f60a30ccc387bbde19b830da6372f0b1..ea811b85f041fcb3f4afc32b79a8f62c8985bd98 100644 (file)
@@ -1,3 +1,10 @@
+2003-04-05  Bruno Haible  <bruno@clisp.org>
+
+       * relocatable.c: Rely on DEPENDS_ON_LIBCHARSET, DEPENDS_ON_LIBICONV,
+       DEPENDS_ON_LIBINTL, not on NO_LIBRARIES.
+       * Makefile.in (DEFS): Define DEPENDS_ON_LIBICONV, for relocatable.c.
+       * Makefile.msvc (CFLAGS): Also define DEPENDS_ON_LIBICONV.
+
 2003-04-05  Bruno Haible  <bruno@clisp.org>
 
        * relocatable.c (_GNU_SOURCE): Define, to ensure getline() gets
index 59711191d4827cd61983766b87729988952090c9..90321e86a948164b14244891c6e68e8278af4954 100644 (file)
@@ -54,7 +54,8 @@ DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
 -DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \
 -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
 -Dset_relocation_prefix=libintl_set_relocation_prefix \
--Drelocate=libintl_relocate @DEFS@
+-Drelocate=libintl_relocate \
+-DDEPENDS_ON_LIBICONV=1 @DEFS@
 CPPFLAGS = @CPPFLAGS@
 CFLAGS = @CFLAGS@
 LDFLAGS = @LDFLAGS@
index 779c1f91e632f60976298ee8e183101379d4e731..ba6bd0a3691bb5ec40f7c3e934de064b0e284227 100644 (file)
@@ -78,7 +78,7 @@ OPTIMFLAGS = -D_NDEBUG -O1
 
 # -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro.
 # -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro.
-CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H -DBUILDING_LIBINTL -DBUILDING_DLL -DLOCALEDIR=\"$(IIlocaledir)\" -DLOCALE_ALIAS_PATH=\"$(IIaliaspath)\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(IIbindir)\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate
+CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H -DBUILDING_LIBINTL -DBUILDING_DLL -DLOCALEDIR=\"$(IIlocaledir)\" -DLOCALE_ALIAS_PATH=\"$(IIaliaspath)\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(IIbindir)\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1
 
 INCLUDES = -I. -I.. -I$(includedir)
 
index fb8e16ed3c6cbc067f77a79806ccab409d884a7e..16f79a528f0c6aac25308b2b045d9e5611207906 100644 (file)
 # include "xmalloc.h"
 #endif
 
-#ifndef NO_LIBRARIES
-# if !defined IN_LIBICONV && HAVE_ICONV
-#  include <iconv.h>
-# endif
-# if !defined IN_LIBINTL && !defined IN_LIBICONV && ENABLE_NLS
-#  include <libintl.h>
-# endif
+#if DEPENDS_ON_LIBCHARSET
+# include <libcharset.h>
+#endif
+#if DEPENDS_ON_LIBICONV && HAVE_ICONV
+# include <iconv.h>
+#endif
+#if DEPENDS_ON_LIBINTL && ENABLE_NLS
+# include <libintl.h>
 #endif
 
 /* Faked cheap 'bool'.  */
@@ -139,14 +140,15 @@ set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
 {
   set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
 
-#ifndef NO_LIBRARIES
   /* Now notify all dependent libraries.  */
-# if !defined IN_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
+#if DEPENDS_ON_LIBCHARSET
+  libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+#endif
+#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
   libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
-# endif
-# if !defined IN_LIBINTL && !defined IN_LIBICONV && ENABLE_NLS && defined libintl_set_relocation_prefix
+#endif
+#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
   libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
-# endif
 #endif
 }
 
index 97b0633572b1e52decaddd6194612546c8668502..6d8054551a2a675957fdd6ed0fef7f5caf136409 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-05  Bruno Haible  <bruno@clisp.org>
+
+       * Makefile.am (DEFS): Define DEPENDS_ON_LIBINTL, for relocatable.c.
+       * Makefile.msvc (CFLAGS): Also define DEPENDS_ON_LIBINTL.
+
 2003-03-30  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.vms: New file.
index a59b8312c6ad7cba0e96589714bfbd7704b6da28..be13dc7480d78996ad55576d9d5ab87c269f5d76 100644 (file)
@@ -55,6 +55,8 @@ INCLUDES = \
   -I../intl -I$(srcdir)/../intl \
   -I../../gettext-tools/lib -I$(srcdir)/../../gettext-tools/lib
 
+DEFS = -DDEPENDS_ON_LIBINTL=1 @DEFS@
+
 # List of files to be distributed.
 
 EXTRA_DIST += $(LIBADD_SOURCE)
index e7a68d617f7ca780b41fb46903fdc00ff1a5c836..e3afab68e5598250b6040edbb57d372dedcbfd24 100644 (file)
@@ -38,7 +38,7 @@ OPTIMFLAGS = -Od -Z7
 OPTIMFLAGS = -D_NDEBUG -O1
 !endif
 
-CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H
+CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H -DDEPENDS_ON_LIBINTL=1
 
 INCLUDES = -I. -I.. -I..\intl -I..\..\gettext-tools\lib -I..\..\gettext-tools\windows -I$(includedir)
 
index e7f62b5748a8cb9ceeaf537640a3b8b934671604..fba2b1ed7b195dca494fbf5af5b10201429701d2 100644 (file)
@@ -1,3 +1,12 @@
+2003-04-05  Bruno Haible  <bruno@clisp.org>
+
+       * relocatable.c: Rely on DEPENDS_ON_LIBCHARSET, DEPENDS_ON_LIBICONV,
+       DEPENDS_ON_LIBINTL, not on NO_LIBRARIES.
+       * Makefile.am (DEFS): Define DEPENDS_ON_LIBINTL and DEPENDS_ON_LIBCONV,
+       for relocatable.c.
+       * Makefile.msvc (CFLAGS): Also define DEPENDS_ON_LIBINTL and
+       DEPENDS_ON_LIBCONV.
+
 2003-04-05  Bruno Haible  <bruno@clisp.org>
 
        * relocatable.c (_GNU_SOURCE): Define, to ensure getline() gets
index 134f02818cc780ab4f2382dbcb4421bd5315cf6c..9732d1145c3eca55a350c1cf14693709c95321f1 100644 (file)
@@ -125,9 +125,10 @@ EXTRA_DIST += \
   gen-lbrkprop.c 3level.h Combining.txt \
   ChangeLog.0
 
-DEFS = -DEXEEXT=\"$(EXEEXT)\" @DEFS@
 INCLUDES = -I. -I$(srcdir) -I.. -I../intl -I$(top_srcdir)/intl
 
+DEFS = -DEXEEXT=\"$(EXEEXT)\" -DDEPENDS_ON_LIBINTL=1 -DDEPENDS_ON_LIBCONV=1 @DEFS@
+
 
 DISTCLEANFILES += fnmatch.h
 
index 8fe5eb204293c54a62fc33e546f69821271a3b35..4e25206cb113fec2cb64abdfd4c353abbc18b369 100644 (file)
@@ -58,7 +58,7 @@ OPTIMFLAGS = -Od -Z7
 OPTIMFLAGS = -D_NDEBUG -O1
 !endif
 
-CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H -DEXEEXT=\".exe\"
+CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DDEPENDS_ON_LIBINTL=1 -DDEPENDS_ON_LIBCONV=1
 
 INCLUDES = -I. -I.. -I..\intl -I..\windows -I$(includedir)
 
index fb8e16ed3c6cbc067f77a79806ccab409d884a7e..16f79a528f0c6aac25308b2b045d9e5611207906 100644 (file)
 # include "xmalloc.h"
 #endif
 
-#ifndef NO_LIBRARIES
-# if !defined IN_LIBICONV && HAVE_ICONV
-#  include <iconv.h>
-# endif
-# if !defined IN_LIBINTL && !defined IN_LIBICONV && ENABLE_NLS
-#  include <libintl.h>
-# endif
+#if DEPENDS_ON_LIBCHARSET
+# include <libcharset.h>
+#endif
+#if DEPENDS_ON_LIBICONV && HAVE_ICONV
+# include <iconv.h>
+#endif
+#if DEPENDS_ON_LIBINTL && ENABLE_NLS
+# include <libintl.h>
 #endif
 
 /* Faked cheap 'bool'.  */
@@ -139,14 +140,15 @@ set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
 {
   set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
 
-#ifndef NO_LIBRARIES
   /* Now notify all dependent libraries.  */
-# if !defined IN_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
+#if DEPENDS_ON_LIBCHARSET
+  libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+#endif
+#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
   libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
-# endif
-# if !defined IN_LIBINTL && !defined IN_LIBICONV && ENABLE_NLS && defined libintl_set_relocation_prefix
+#endif
+#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
   libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
-# endif
 #endif
 }