]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Restore the ability to build gettext-tools separately, part 2.
authorBruno Haible <bruno@clisp.org>
Sat, 18 May 2019 22:33:19 +0000 (00:33 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Apr 2020 10:49:38 +0000 (12:49 +0200)
* gettext-tools/configure.ac: New option --with-installed-csharp-dll.
(USE_INSTALLED_CSHARP_DLL): New conditional.
* gettext-tools/src/Makefile.am (CSHARP_DLL_DIR): New variable.
(msgunfmt.net.exe): Use it.
* configure.ac: Filter out --with-installed-csharp-dll from inherited --help
output.
* PACKAGING: Document that gettext-tools's configure needs to be invoked with
--with-installed-csharp-dll.

PACKAGING
configure.ac
gettext-tools/configure.ac
gettext-tools/src/Makefile.am

index 52b80ac7e51f46ec25dbb369d93a2575df827aa6..f4bae4561ec70a9de2532502b5c2358bb976036c 100644 (file)
--- a/PACKAGING
+++ b/PACKAGING
@@ -42,7 +42,7 @@ The 'libtextstyle' binary package can be installed by doing
 The 'gettext-tools' binary package can be installed by doing
 
       cd gettext-tools
-      ./configure --with-installed-libtextstyle
+      ./configure --with-installed-libtextstyle --with-installed-csharp-dll
       make
       make install
 
index 0c84bdd724fc32badbdb0d5d5bfad8a4e8ebe4d6..49689fb01173a6fbd1df2852b7356819fdda492e 100644 (file)
@@ -49,7 +49,7 @@ AC_CANONICAL_HOST
 dnl Optional Features: AC_ARG_ENABLE calls
 dnl Optional Packages: AC_ARG_WITH calls
 dnl Some influential environment variables: AC_ARG_VAR calls
-esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; cd libtextstyle && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.libtextstyle; } | sed -f build-aux/ac-help.sed ])
+esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; cd libtextstyle && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.libtextstyle | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ])
 
 AC_CONFIG_FILES([Makefile])
 
index 104b067badbe80e703d818bd6a4a91f35d77780f..52868da46160e7594953d518557252939102e43c 100644 (file)
@@ -147,6 +147,20 @@ fi
 AM_CONDITIONAL([USE_INSTALLED_LIBTEXTSTYLE],
   [test "$gt_use_installed_libtextstyle" != no])
 
+dnl This option allows to build gettext-tools without (re)building GNU.Gettext.dll.
+AC_ARG_WITH([installed-csharp-dll],
+  [AS_HELP_STRING([--with-installed-csharp-dll],
+     [Use an already installed C# DLL.])],
+  [gt_use_installed_csharp_dll=$withval],
+  [gt_use_installed_csharp_dll=no])
+if test "$gt_use_installed_csharp_dll" = no; then
+  test -f ../gettext-runtime/intl-csharp/Makefile || {
+    AC_MSG_ERROR([When building the gettext-tools package without building the entire gettext package, you need to pass the --with-installed-csharp-dll option to configure.])
+  }
+fi
+AM_CONDITIONAL([USE_INSTALLED_CSHARP_DLL],
+  [test "$gt_use_installed_csharp_dll" != no])
+
 dnl This line internationalizes the bison generated parsers.
 BISON_I18N
 
index af3dcee15480d4b45d5a03602d0d7678e3e48eef..1ec1587a50b449099999e4c445280ccb2b8de78d 100644 (file)
@@ -616,8 +616,13 @@ all-csharp-no:
 msgfmt.net.exe: msgfmt.cs
        $(CSHARPCOMP) $(CSHARPCOMPFLAGS) -o $@ $(srcdir)/msgfmt.cs
 
+if USE_INSTALLED_CSHARP_DLL
+CSHARP_DLL_DIR = $(libdir)
+else
+CSHARP_DLL_DIR = ../../gettext-runtime/intl-csharp
+endif
 msgunfmt.net.exe: msgunfmt.cs
-       $(CSHARPCOMP) $(CSHARPCOMPFLAGS) -o $@ -L ../../gettext-runtime/intl-csharp -l GNU.Gettext $(srcdir)/msgunfmt.cs
+       $(CSHARPCOMP) $(CSHARPCOMPFLAGS) -o $@ -L '$(CSHARP_DLL_DIR)' -l GNU.Gettext $(srcdir)/msgunfmt.cs
 
 install-exec-local: install-exec-csharp-@BUILDCSHARP@
 install-exec-csharp-yes: all-csharp-yes