]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Native Woe32/MSVC support.
authorBruno Haible <bruno@clisp.org>
Sat, 29 Mar 2003 16:20:30 +0000 (16:20 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:18 +0000 (12:10 +0200)
72 files changed:
ChangeLog
Makefile.am
Makefile.msvc [new file with mode: 0644]
README.woe32 [new file with mode: 0644]
gettext-runtime/ChangeLog
gettext-runtime/Makefile.am
gettext-runtime/Makefile.msvc [new file with mode: 0644]
gettext-runtime/README.woe32 [new file with mode: 0644]
gettext-runtime/doc/ChangeLog
gettext-runtime/doc/Makefile.am
gettext-runtime/doc/Makefile.msvc [new file with mode: 0644]
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/Makefile.in
gettext-runtime/intl/Makefile.msvc [new file with mode: 0644]
gettext-runtime/intl/README.woe32 [new file with mode: 0644]
gettext-runtime/intl/libgnuintl.h.in [new file with mode: 0644]
gettext-runtime/lib/ChangeLog
gettext-runtime/lib/Makefile.am
gettext-runtime/lib/Makefile.msvc [new file with mode: 0644]
gettext-runtime/libasprintf/ChangeLog
gettext-runtime/libasprintf/Makefile.am
gettext-runtime/libasprintf/Makefile.msvc [new file with mode: 0644]
gettext-runtime/libasprintf/README.woe32 [new file with mode: 0644]
gettext-runtime/libasprintf/autosprintf.h.in [new file with mode: 0644]
gettext-runtime/libasprintf/windows/asprintf.rc [new file with mode: 0644]
gettext-runtime/libasprintf/windows/dllexport.h [new file with mode: 0644]
gettext-runtime/man/ChangeLog
gettext-runtime/man/Makefile.am
gettext-runtime/man/Makefile.msvc [new file with mode: 0644]
gettext-runtime/po/ChangeLog
gettext-runtime/po/Makefile.msvc.sh [new file with mode: 0755]
gettext-runtime/po/Rules-msvc [new file with mode: 0644]
gettext-runtime/src/ChangeLog
gettext-runtime/src/Makefile.am
gettext-runtime/src/Makefile.msvc [new file with mode: 0644]
gettext-runtime/windows/dllexport.h [new file with mode: 0644]
gettext-runtime/windows/intl.rc [new file with mode: 0644]
gettext-tools/ChangeLog
gettext-tools/Makefile.am
gettext-tools/Makefile.msvc [new file with mode: 0644]
gettext-tools/README.woe32 [new file with mode: 0644]
gettext-tools/doc/ChangeLog
gettext-tools/doc/Makefile.am
gettext-tools/doc/Makefile.msvc [new file with mode: 0644]
gettext-tools/lib/ChangeLog
gettext-tools/lib/Makefile.am
gettext-tools/lib/Makefile.msvc [new file with mode: 0644]
gettext-tools/libuniname/ChangeLog
gettext-tools/libuniname/Makefile.am
gettext-tools/libuniname/Makefile.msvc [new file with mode: 0644]
gettext-tools/man/ChangeLog
gettext-tools/man/Makefile.am
gettext-tools/man/Makefile.msvc [new file with mode: 0644]
gettext-tools/misc/ChangeLog
gettext-tools/misc/Makefile.am
gettext-tools/misc/Makefile.msvc [new file with mode: 0644]
gettext-tools/po/ChangeLog
gettext-tools/po/Makefile.msvc.sh [new file with mode: 0755]
gettext-tools/po/Rules-msvc [new file with mode: 0644]
gettext-tools/projects/ChangeLog
gettext-tools/projects/Makefile.am
gettext-tools/projects/Makefile.msvc [new file with mode: 0644]
gettext-tools/src/ChangeLog
gettext-tools/src/Makefile.am
gettext-tools/src/Makefile.msvc [new file with mode: 0644]
gettext-tools/tests/ChangeLog
gettext-tools/tests/Makefile.am
gettext-tools/tests/Makefile.msvc [new file with mode: 0644]
gettext-tools/windows/gettextlib.exp [new file with mode: 0644]
gettext-tools/windows/gettextlib.rc [new file with mode: 0644]
gettext-tools/windows/gettextsrc.exp [new file with mode: 0644]
gettext-tools/windows/gettextsrc.rc [new file with mode: 0644]

index a71aeb06edbffec5ac8f0c66580c833dda54d25e..e57f8255c74558256a7f17b9e33fdc48163b1984 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * README.woe32: New file.
+       * Makefile.am (EXTRA_DIST): Add them.
+
 2003-02-28  Bruno Haible  <bruno@clisp.org>
 
        Support for relocatable installation.
index 8865d49285ad7b4ae86b6c71a3f9543f1a52296e..417bbe24d6a41a91ecfb78c02e0b3fe35cc8b90f 100644 (file)
@@ -46,6 +46,11 @@ EXTRA_DIST += djgpp/COPYING.DJ djgpp/Makefile.maint djgpp/README.DJ \
 EXTRA_DIST += os2/README.OS2 os2/Makefile os2/backward.def os2/configure.awk
 
 
+# Woe32 support.
+
+EXTRA_DIST += README.woe32 Makefile.msvc
+
+
 # Documentation tag not known to automake.
 
 html:
diff --git a/Makefile.msvc b/Makefile.msvc
new file mode 100644 (file)
index 0000000..c5513e0
--- /dev/null
@@ -0,0 +1,154 @@
+# -*- Makefile -*- for gettext
+
+#### Start of system configuration section. ####
+
+# Flags that can be set on the nmake command line:
+#   DLL=1     for compiling a .dll with a stub .lib (default is a static .lib)
+#             Note that this works only with MFLAGS=-MD.
+#   MFLAGS={-ML|-MT|-MD} for defining the compilation model
+#     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
+#     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
+#     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
+#   DEBUG=1   for compiling with debugging information
+# Note that nmake command line flags are automatically passed to subdirectory
+# Makefiles. Therefore we don't need to pass them explicitly to subdirectory
+# Makefiles, but the subdirectory Makefiles need to have the same defaults.
+!if !defined(DLL)
+DLL=0
+!endif
+!if !defined(DEBUG)
+DEBUG=0
+!endif
+!if !defined(MFLAGS)
+!if !$(DLL)
+MFLAGS=
+!else
+MFLAGS=-MD
+!endif
+!endif
+
+# Directories used by "make install":
+prefix = c:\usr
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)\bin
+libdir = $(exec_prefix)\lib
+includedir = $(prefix)\include
+datadir = $(prefix)\share
+localedir = $(datadir)\locale
+pkgdatadir = $(datadir)\gettext
+mandir = $(prefix)\man
+docdir = $(prefix)\doc\gettext
+emacsdir = $(datadir)\emacs
+lispdir = $(emacsdir)\site-lisp
+
+# Programs used by "make":
+
+CC = cl
+CXX = cl -TP
+
+# Set to -W3 if you want to see maximum amount of warnings, including stupid
+# ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
+WARN_CFLAGS = -W1
+
+!if !$(DLL)
+PICFLAGS =
+!else
+# "-GD" (msvc5) optimizes for DLL.
+# mscv4 doesn't know about this flag and ignores it.
+PICFLAGS = -GD
+!endif
+
+!if $(DEBUG)
+OPTIMFLAGS = -Od -Z7
+!else
+# Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
+OPTIMFLAGS = -D_NDEBUG -O1
+!endif
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all : force
+       cd gettext-runtime
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd gettext-tools
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+
+install : force
+       cd gettext-runtime
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd gettext-tools
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+
+installdirs : force
+       cd gettext-runtime
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd gettext-tools
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+
+uninstall : force
+       cd gettext-runtime
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd gettext-tools
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+
+check : all force
+       cd gettext-runtime
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd gettext-tools
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+
+mostlyclean : force
+       cd gettext-runtime
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd gettext-tools
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+
+clean : force
+       cd gettext-runtime
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd gettext-tools
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+
+distclean : force
+       cd gettext-runtime
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd gettext-tools
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       $(RM) config.status config.log config.cache Makefile
+
+maintainer-clean : force
+       cd gettext-runtime
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd gettext-tools
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       $(RM) config.status config.log config.cache Makefile
+
+force :
diff --git a/README.woe32 b/README.woe32
new file mode 100644 (file)
index 0000000..08dbf89
--- /dev/null
@@ -0,0 +1,29 @@
+Installation on Woe32 (WinNT/2000/XP, Win95/98/ME):
+
+- Requires MS Visual C/C++ 4.0 or 5.0 or 6.0 or 7.0.
+
+- Cannot build in a separate directory.
+
+- Build instructions:
+
+   Make sure that the MSVC4.0 or MSVC5.0 or MSVC6.0 utilities ("cl" etc.) are
+   found in PATH.
+
+   For shared library (DLL):
+
+        nmake -f Makefile.msvc DLL=1 MFLAGS=-MD
+
+   For static library:
+
+        nmake -f Makefile.msvc
+
+   If you want to build both the shared and static library, you have to
+   unpack the gettext sources twice in different directories. Don't mix
+   the two formats; you cannot use the libintl.h generated for the static
+   library together with the shared library or vice versa.
+
+- Installation:
+
+        nmake -f Makefile.msvc DLL=1 MFLAGS=-MD install prefix=InstallBaseDirectory
+   or
+        nmake -f Makefile.msvc install prefix=InstallBaseDirectory
index 30214489d82e1f99f64a639f0726ee757a99a756..57a5d12dd1167e876a4cf60f47296c5361fb9f25 100644 (file)
@@ -1,3 +1,13 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * README.woe32: New file.
+       * windows/dllexport.h: New file.
+       * windows/intl.rc: New file.
+       * Makefile.am (EXTRA_DIST): Add them and config.h.msvc.
+       (config.h.msvc, intl/libgnuintl.h.msvc-shared): New rules.
+
 2003-02-28  Bruno Haible  <bruno@clisp.org>
 
        Support for relocatable installation.
index bc0b20ab4754779a98eba84eecd1d09b83a7fad7..a6abaec957972d2819882972a3f4ddedcf53ba36 100644 (file)
@@ -46,3 +46,40 @@ ABOUT-NLS: $(srcdir)/doc/nls.texi $(srcdir)/doc/matrix.texi
        rm -f $(srcdir)/ABOUT-NLS \
          && $(MAKEINFO) --output=$(srcdir)/ABOUT-NLS --no-header \
            -I $(srcdir)/doc --no-validate nls.texi
+
+
+# Woe32 support.
+
+config.h.msvc: config.h.in
+       sed -e 's/#undef ENABLE_NLS$$/#define ENABLE_NLS 1/' \
+           -e 's/#undef ENABLE_RELOCATABLE$$/#define ENABLE_RELOCATABLE 1/' \
+           -e 's/#undef HAVE_ALLOCA$$/#define HAVE_ALLOCA 1/' \
+           -e 's/#undef HAVE_ENVIRON_DECL$$/#define HAVE_ENVIRON_DECL 1/' \
+           -e 's/#undef HAVE_ERRNO_DECL$$/#define HAVE_ERRNO_DECL 1/' \
+           -e 's/#undef HAVE_GETCWD$$/#define HAVE_GETCWD 1/' \
+           -e 's/#undef HAVE_ICONV$$/#define HAVE_ICONV 1/' \
+           -e 's/#undef HAVE_LIMITS_H$$/#define HAVE_LIMITS_H 1/' \
+           -e 's/#undef HAVE_LOCALE_H$$/#define HAVE_LOCALE_H 1/' \
+           -e 's/#undef HAVE_MEMMOVE$$/#define HAVE_MEMMOVE 1/' \
+           -e 's/#undef HAVE_PUTENV$$/#define HAVE_PUTENV 1/' \
+           -e 's/#undef HAVE_SETLOCALE$$/#define HAVE_SETLOCALE 1/' \
+           -e 's/#undef HAVE_STDDEF_H$$/#define HAVE_STDDEF_H 1/' \
+           -e 's/#undef HAVE_STDLIB_H$$/#define HAVE_STDLIB_H 1/' \
+           -e 's/#undef HAVE_STRDUP$$/#define HAVE_STRDUP 1/' \
+           -e 's/#undef HAVE_STRERROR$$/#define HAVE_STRERROR 1/' \
+           -e 's/#undef HAVE_STRING_H$$/#define HAVE_STRING_H 1/' \
+           -e 's/#undef HAVE_STRTOUL$$/#define HAVE_STRTOUL 1/' \
+           -e 's/#undef HAVE_SYS_STAT_H$$/#define HAVE_SYS_STAT_H 1/' \
+           -e 's/#undef HAVE_SYS_TYPES_H$$/#define HAVE_SYS_TYPES_H 1/' \
+           -e 's/#undef HAVE_VPRINTF$$/#define HAVE_VPRINTF 1/' \
+           -e 's/#undef ICONV_CONST$$/#define ICONV_CONST const/' \
+           -e 's/#undef STACK_DIRECTION$$/#define STACK_DIRECTION -1/' \
+           -e 's/#undef STDC_HEADERS$$/#define STDC_HEADERS 1/' \
+           -e 's/#undef uintmax_t$$/#define uintmax_t unsigned long/' \
+           -e '/#undef INSTALLPREFIX$$/d' \
+         < $< > $@
+
+intl/libgnuintl.h.msvc-shared: intl/libgnuintl.h.in windows/dllexport.h
+       sed -e 's/extern \([^"]\)/extern LIBINTL_DLL_EXPORTED \1/' -e '/#define _LIBINTL_H/r windows/dllexport.h' < $< > $@
+
+EXTRA_DIST += README.woe32 Makefile.msvc config.h.msvc windows/dllexport.h windows/intl.rc
diff --git a/gettext-runtime/Makefile.msvc b/gettext-runtime/Makefile.msvc
new file mode 100644 (file)
index 0000000..7270431
--- /dev/null
@@ -0,0 +1,294 @@
+# -*- Makefile -*- for gettext-runtime
+
+#### Start of system configuration section. ####
+
+# Flags that can be set on the nmake command line:
+#   DLL=1     for compiling a .dll with a stub .lib (default is a static .lib)
+#             Note that this works only with MFLAGS=-MD.
+#   MFLAGS={-ML|-MT|-MD} for defining the compilation model
+#     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
+#     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
+#     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
+#   DEBUG=1   for compiling with debugging information
+# Note that nmake command line flags are automatically passed to subdirectory
+# Makefiles. Therefore we don't need to pass them explicitly to subdirectory
+# Makefiles, but the subdirectory Makefiles need to have the same defaults.
+!if !defined(DLL)
+DLL=0
+!endif
+!if !defined(DEBUG)
+DEBUG=0
+!endif
+!if !defined(MFLAGS)
+!if !$(DLL)
+MFLAGS=
+!else
+MFLAGS=-MD
+!endif
+!endif
+
+# Directories used by "make install":
+prefix = c:\usr
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)\bin
+libdir = $(exec_prefix)\lib
+includedir = $(prefix)\include
+datadir = $(prefix)\share
+localedir = $(datadir)\locale
+mandir = $(prefix)\man
+docdir = $(prefix)\doc\gettext
+
+# Programs used by "make":
+
+CC = cl
+CXX = cl -TP
+
+# Set to -W3 if you want to see maximum amount of warnings, including stupid
+# ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
+WARN_CFLAGS = -W1
+
+!if !$(DLL)
+PICFLAGS =
+!else
+# "-GD" (msvc5) optimizes for DLL.
+# mscv4 doesn't know about this flag and ignores it.
+PICFLAGS = -GD
+!endif
+
+!if $(DEBUG)
+OPTIMFLAGS = -Od -Z7
+!else
+# Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
+OPTIMFLAGS = -D_NDEBUG -O1
+!endif
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all : config.h force
+       cd doc
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd intl
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd libasprintf
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+
+config.h : config.h.msvc
+       -$(RM) config.h
+       $(LN) config.h.msvc config.h
+
+install : force
+       cd doc
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd intl
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd libasprintf
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+
+installdirs : force
+       cd doc
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd intl
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd libasprintf
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+
+uninstall : force
+       cd doc
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd intl
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd libasprintf
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+
+check : all force
+       cd doc
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd intl
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd libasprintf
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+
+mostlyclean : force
+       cd doc
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd intl
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd libasprintf
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       $(RM) config.h
+
+clean : force
+       cd doc
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd intl
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd libasprintf
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       $(RM) config.h
+
+distclean : force
+       cd doc
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd intl
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd libasprintf
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       $(RM) config.h
+       $(RM) config.status config.log config.cache Makefile
+
+maintainer-clean : force
+       cd doc
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd intl
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd libasprintf
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       $(RM) config.h
+       $(RM) config.status config.log config.cache Makefile
+
+force :
diff --git a/gettext-runtime/README.woe32 b/gettext-runtime/README.woe32
new file mode 100644 (file)
index 0000000..08dbf89
--- /dev/null
@@ -0,0 +1,29 @@
+Installation on Woe32 (WinNT/2000/XP, Win95/98/ME):
+
+- Requires MS Visual C/C++ 4.0 or 5.0 or 6.0 or 7.0.
+
+- Cannot build in a separate directory.
+
+- Build instructions:
+
+   Make sure that the MSVC4.0 or MSVC5.0 or MSVC6.0 utilities ("cl" etc.) are
+   found in PATH.
+
+   For shared library (DLL):
+
+        nmake -f Makefile.msvc DLL=1 MFLAGS=-MD
+
+   For static library:
+
+        nmake -f Makefile.msvc
+
+   If you want to build both the shared and static library, you have to
+   unpack the gettext sources twice in different directories. Don't mix
+   the two formats; you cannot use the libintl.h generated for the static
+   library together with the shared library or vice versa.
+
+- Installation:
+
+        nmake -f Makefile.msvc DLL=1 MFLAGS=-MD install prefix=InstallBaseDirectory
+   or
+        nmake -f Makefile.msvc install prefix=InstallBaseDirectory
index dcd3859e99cb3fdc77143c9bb6791268acf4f734..4a8d9ebf901bb86316e23fb4be72859aa803e15c 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-02-22  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am (ps, pdf): Remove rules, redundant with automake 1.7.2.
index 1f411e368798095a08bdb859cd35221b6c7eb663..adc26230632e9d90fcd9c0e8deafa5431fe9d4fa 100644 (file)
 ## Process this file with automake to produce Makefile.in.
 
 AUTOMAKE_OPTIONS = 1.2 gnits
+EXTRA_DIST =
 
-EXTRA_DIST = nls.texi matrix.texi
+EXTRA_DIST += nls.texi matrix.texi
 
 
 # Documentation tag not known to automake.
 
 html:
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-runtime/doc/Makefile.msvc b/gettext-runtime/doc/Makefile.msvc
new file mode 100644 (file)
index 0000000..326e753
--- /dev/null
@@ -0,0 +1,31 @@
+# -*- Makefile -*- for gettext-runtime/doc
+
+#### Start of system configuration section. ####
+
+RM = -del
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all :
+
+install : all
+
+installdirs :
+
+uninstall :
+
+check :
+
+mostlyclean : clean
+
+clean : force
+       $(RM) core
+
+distclean : clean
+       $(RM) Makefile
+
+maintainer-clean : distclean
+
+force :
index 11fec9e62ea3a4beeb6bc29fbaa3f4cbc1e80740..3a075857062189945dace3809370f398d437bb68 100644 (file)
@@ -1,3 +1,19 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * libgnuintl.h.in: Renamed from libgnuintl.h.
+       * Makefile.msvc: New file.
+       * README.woe32: New file.
+       * Makefile.in (HEADERS): Remove libgnuintl.h, add libgnuintl.h.in.
+       (DISTFILES.gettext): Add Makefile.msvc.
+       (DISTFILES.obsolete): Add libgnuintl.h.
+       (libgnuintl.h): New rule.
+       (libintl.h, $(OBJECTS)): Expect libgnuintl.h in builddir, not in
+       srcdir.
+       (mostlyclean): Also remove libgnuintl.h.
+
+       * Makefile.in (loadmsgcat.$lo): Depend on hash-string.h.
+
 2003-02-28  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.in (localcharset.$lo): Depend on localcharset.h.
index c618a60063c4e797d35a97a2d9bf1231dd791efb..57407e12464a7d8ff6998e5c79771488d7d5a3a0 100644 (file)
@@ -71,7 +71,7 @@ HEADERS = \
   localcharset.h \
   relocatable.h \
   os2compat.h \
-  libgnuintl.h
+  libgnuintl.h.in
 SOURCES = \
   bindtextdom.c \
   dcgettext.c \
@@ -123,9 +123,9 @@ DISTFILES.common = Makefile.in \
 config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
 DISTFILES.generated = plural.c
 DISTFILES.normal = VERSION
-DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc
+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc Makefile.msvc
 DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
-COPYING.LIB-2 gettext.h libgettext.h plural-eval.c
+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
 
 all: all-@USE_INCLUDED_LIBINTL@
 all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
@@ -219,8 +219,11 @@ ref-del.sed: $(srcdir)/ref-del.sin
 
 INCLUDES = -I.. -I. -I$(srcdir)
 
-libintl.h: $(srcdir)/libgnuintl.h
-       cp $(srcdir)/libgnuintl.h libintl.h
+libgnuintl.h: $(srcdir)/libgnuintl.h.in
+       cp $(srcdir)/libgnuintl.h.in libgnuintl.h
+
+libintl.h: libgnuintl.h
+       cp libgnuintl.h libintl.h
 
 charset.alias: $(srcdir)/config.charset
        $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
@@ -391,9 +394,9 @@ uninstall:
 
 info dvi ps pdf html:
 
-$(OBJECTS): ../config.h $(srcdir)/libgnuintl.h
+$(OBJECTS): ../config.h libgnuintl.h
 bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
-dcigettext.$lo: $(srcdir)/hash-string.h
+dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
 explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
 dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
 dcigettext.$lo: $(srcdir)/eval-plural.h
@@ -418,7 +421,7 @@ ID: $(HEADERS) $(SOURCES)
 
 mostlyclean:
        rm -f *.a *.la *.o *.obj *.lo core core.*
-       rm -f libintl.h charset.alias ref-add.sed ref-del.sed
+       rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
        rm -f -r .libs _libs
 
 clean: mostlyclean
diff --git a/gettext-runtime/intl/Makefile.msvc b/gettext-runtime/intl/Makefile.msvc
new file mode 100644 (file)
index 0000000..efe0b37
--- /dev/null
@@ -0,0 +1,228 @@
+# -*- Makefile -*- for gettext-runtime/intl
+
+#### Start of system configuration section. ####
+
+# Flags that can be set on the nmake command line:
+#   DLL=1     for compiling a .dll with a stub .lib (default is a static .lib)
+#             Note that this works only with MFLAGS=-MD.
+#   MFLAGS={-ML|-MT|-MD} for defining the compilation model
+#     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
+#     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
+#     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
+#   DEBUG=1   for compiling with debugging information
+!if !defined(DLL)
+DLL=0
+!endif
+!if !defined(DEBUG)
+DEBUG=0
+!endif
+!if !defined(MFLAGS)
+!if !$(DLL)
+MFLAGS=
+!else
+MFLAGS=-MD
+!endif
+!endif
+
+# Directories used by "make":
+srcdir = .
+
+# Directories used by "make install":
+prefix = c:\usr
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)\bin
+libdir = $(exec_prefix)\lib
+includedir = $(prefix)\include
+datadir = $(prefix)\share
+localedir = $(datadir)\locale
+aliaspath =
+
+# Programs used by "make":
+
+CC = cl
+
+# Set to -W3 if you want to see maximum amount of warnings, including stupid
+# ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
+WARN_CFLAGS = -W1
+
+!if !$(DLL)
+PICFLAGS =
+!else
+# "-GD" (msvc5) optimizes for DLL.
+# mscv4 doesn't know about this flag and ignores it.
+PICFLAGS = -GD
+!endif
+
+!if $(DEBUG)
+OPTIMFLAGS = -Od -Z7
+!else
+# Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
+OPTIMFLAGS = -D_NDEBUG -O1
+!endif
+
+CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(bindir)\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate
+
+INCLUDES = -I..
+
+AR = lib
+AR_FLAGS = /out:
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+OBJECTS = bindtextdom.obj dcgettext.obj dgettext.obj gettext.obj finddomain.obj loadmsgcat.obj localealias.obj textdomain.obj l10nflist.obj explodename.obj dcigettext.obj dcngettext.obj dngettext.obj ngettext.obj plural.obj plural-exp.obj localcharset.obj relocatable.obj localename.obj log.obj osdep.obj intl-compat.obj
+
+RESOURCES = intl.res
+
+all : intl.lib libintl.h
+
+libgnuintl.h :
+!if !$(DLL)
+       $(LN) $(srcdir)\libgnuintl.h.in libgnuintl.h
+!else
+       $(LN) $(srcdir)\libgnuintl.h.msvc-shared libgnuintl.h
+!endif
+
+bindtextdom.obj : $(srcdir)\bindtextdom.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\bindtextdom.c
+
+dcgettext.obj : $(srcdir)\dcgettext.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\dcgettext.c
+
+dgettext.obj : $(srcdir)\dgettext.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\dgettext.c
+
+gettext.obj : $(srcdir)\gettext.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\gettext.c
+
+finddomain.obj : $(srcdir)\finddomain.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\finddomain.c
+
+loadmsgcat.obj : $(srcdir)\loadmsgcat.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h $(srcdir)\hash-string.h $(srcdir)\plural-exp.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\loadmsgcat.c
+
+localealias.obj : $(srcdir)\localealias.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h $(srcdir)\relocatable.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\localealias.c
+
+textdomain.obj : $(srcdir)\textdomain.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\textdomain.c
+
+l10nflist.obj : $(srcdir)\l10nflist.c libgnuintl.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\l10nflist.c
+
+explodename.obj : $(srcdir)\explodename.c libgnuintl.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\explodename.c
+
+dcigettext.obj : $(srcdir)\dcigettext.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h $(srcdir)\hash-string.h $(srcdir)\plural-exp.h $(srcdir)\eval-plural.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\dcigettext.c
+
+dcngettext.obj : $(srcdir)\dcngettext.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\dcngettext.c
+
+dngettext.obj : $(srcdir)\dngettext.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\dngettext.c
+
+ngettext.obj : $(srcdir)\ngettext.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\ngettext.c
+
+plural.obj : $(srcdir)\plural.c libgnuintl.h $(srcdir)\plural-exp.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\plural.c
+
+plural-exp.obj : $(srcdir)\plural-exp.c libgnuintl.h $(srcdir)\plural-exp.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\plural-exp.c
+
+localcharset.obj : $(srcdir)\localcharset.c libgnuintl.h $(srcdir)\localcharset.h $(srcdir)\relocatable.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\localcharset.c
+
+relocatable.obj : $(srcdir)\relocatable.c libgnuintl.h $(srcdir)\relocatable.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\relocatable.c
+
+localename.obj : $(srcdir)\localename.c libgnuintl.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\localename.c
+
+log.obj : $(srcdir)\log.c libgnuintl.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\log.c
+
+osdep.obj : $(srcdir)\osdep.c libgnuintl.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\osdep.c
+
+intl-compat.obj : $(srcdir)\intl-compat.c libgnuintl.h $(srcdir)\gettextP.h $(srcdir)\gmo.h $(srcdir)\loadinfo.h
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c $(srcdir)\intl-compat.c
+
+!if !$(DLL)
+
+intl.lib : $(OBJECTS)
+       -$(RM) intl.lib
+       $(AR) $(AR_FLAGS)intl.lib $(OBJECTS)
+
+!else
+
+# intl.dll and intl.lib are created together.
+intl.lib : $(OBJECTS) $(RESOURCES)
+       $(CC) $(MFLAGS) -LD $(OBJECTS) $(RESOURCES)
+
+intl.res : $(srcdir)\..\windows\intl.rc
+       rc -Fo intl.res $(srcdir)\..\windows\intl.rc
+
+!endif
+
+libintl.h : libgnuintl.h
+       $(LN) libgnuintl.h libintl.h
+
+install : all force
+       -mkdir $(prefix)
+       -mkdir $(includedir)
+       $(INSTALL_DATA) libintl.h $(includedir)\libintl.h
+       -mkdir $(exec_prefix)
+!if $(DLL)
+       -mkdir $(bindir)
+       $(INSTALL_DATA) intl.dll $(bindir)\intl.dll
+!endif
+       -mkdir $(libdir)
+       $(INSTALL_DATA) intl.lib $(libdir)\intl.lib
+
+installdirs : force
+       -mkdir $(prefix)
+       -mkdir $(includedir)
+       -mkdir $(exec_prefix)
+!if $(DLL)
+       -mkdir $(bindir)
+!endif
+       -mkdir $(libdir)
+
+uninstall : force
+       $(RM) $(includedir)\libintl.h
+!if $(DLL)
+       $(RM) $(bindir)\intl.dll
+!endif
+       $(RM) $(libdir)\intl.lib
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+       $(RM) libgnuintl.h
+       $(RM) libintl.h
+       $(RM) *.obj
+       $(RM) *.lib
+       $(RM) *.exp
+       $(RM) *.dll
+       $(RM) intl.res
+       $(RM) core
+
+distclean : clean
+
+maintainer-clean : distclean
+
+force :
+
diff --git a/gettext-runtime/intl/README.woe32 b/gettext-runtime/intl/README.woe32
new file mode 100644 (file)
index 0000000..675a743
--- /dev/null
@@ -0,0 +1,39 @@
+Installation on Woe32 (WinNT/2000/XP, Win95/98/ME):
+
+- Requires MS Visual C/C++ 4.0 or 5.0 or 6.0 or 7.0.
+
+- Cannot build in a separate directory.
+
+- Build instructions:
+
+   Make sure that the MSVC4.0 or MSVC5.0 or MSVC6.0 utilities ("cl" etc.) are
+   found in PATH.
+
+   For shared library (DLL):
+
+        nmake -f Makefile.msvc DLL=1 MFLAGS=-MD
+
+   For static library:
+
+        nmake -f Makefile.msvc
+
+   If you want to build both the shared and static library, you have to
+   unpack the gettext sources twice in different directories. Don't mix
+   the two formats; you cannot use the libintl.h generated for the static
+   library together with the shared library or vice versa.
+
+- Installation:
+
+   Either:
+
+        Copy libintl.h to your header file repository.
+        Copy intl.lib to your library repository.
+        If you built for shared library, also copy intl.dll into one of
+        the directories listed in your PATH, or into the directory containing
+        the executable which shall make use of libintl.
+
+   Or:
+
+        nmake -f Makefile.msvc DLL=1 MFLAGS=-MD install prefix=InstallBaseDirectory
+   or
+        nmake -f Makefile.msvc install prefix=InstallBaseDirectory
diff --git a/gettext-runtime/intl/libgnuintl.h.in b/gettext-runtime/intl/libgnuintl.h.in
new file mode 100644 (file)
index 0000000..4123c44
--- /dev/null
@@ -0,0 +1,308 @@
+/* Message catalogs for internationalization.
+   Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _LIBINTL_H
+#define _LIBINTL_H     1
+
+#include <locale.h>
+
+/* The LC_MESSAGES locale category is the category used by the functions
+   gettext() and dgettext().  It is specified in POSIX, but not in ANSI C.
+   On systems that don't define it, use an arbitrary value instead.
+   On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
+   then includes <libintl.h> (i.e. this file!) and then only defines
+   LC_MESSAGES.  To avoid a redefinition warning, don't define LC_MESSAGES
+   in this case.  */
+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
+# define LC_MESSAGES 1729
+#endif
+
+/* We define an additional symbol to signal that we use the GNU
+   implementation of gettext.  */
+#define __USE_GNU_GETTEXT 1
+
+/* Provide information about the supported file formats.  Returns the
+   maximum minor revision number supported for a given major revision.  */
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
+  ((major) == 0 ? 1 : -1)
+
+/* Resolve a platform specific conflict on DJGPP.  GNU gettext takes
+   precedence over _conio_gettext.  */
+#ifdef __DJGPP__
+# undef gettext
+#endif
+
+/* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers
+   used by programs.  Similarly, test __PROTOTYPES, not PROTOTYPES.  */
+#ifndef _INTL_PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+#  define _INTL_PARAMS(args) args
+# else
+#  define _INTL_PARAMS(args) ()
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* We redirect the functions to those prefixed with "libintl_".  This is
+   necessary, because some systems define gettext/textdomain/... in the C
+   library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
+   If we used the unprefixed names, there would be cases where the
+   definition in the C library would override the one in the libintl.so
+   shared library.  Recall that on ELF systems, the symbols are looked
+   up in the following order:
+     1. in the executable,
+     2. in the shared libraries specified on the link command line, in order,
+     3. in the dependencies of the shared libraries specified on the link
+        command line,
+     4. in the dlopen()ed shared libraries, in the order in which they were
+        dlopen()ed.
+   The definition in the C library would override the one in libintl.so if
+   either
+     * -lc is given on the link command line and -lintl isn't, or
+     * -lc is given on the link command line before -lintl, or
+     * libintl.so is a dependency of a dlopen()ed shared library but not
+       linked to the executable at link time.
+   Since Solaris gettext() behaves differently than GNU gettext(), this
+   would be unacceptable.
+
+   The redirection happens by default through macros in C, so that &gettext
+   is independent of the compilation unit, but through inline functions in
+   C++, in order not to interfere with the name mangling of class fields or
+   class methods called 'gettext'.  */
+
+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
+   If he doesn't, we choose the method.  A third possible method is
+   _INTL_REDIRECT_ASM, supported only by GCC.  */
+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
+# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus)
+#  define _INTL_REDIRECT_ASM
+# else
+#  ifdef __cplusplus
+#   define _INTL_REDIRECT_INLINE
+#  else
+#   define _INTL_REDIRECT_MACROS
+#  endif
+# endif
+#endif
+/* Auxiliary macros.  */
+#ifdef _INTL_REDIRECT_ASM
+# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
+# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
+# define _INTL_STRINGIFY(prefix) #prefix
+#else
+# define _INTL_ASM(cname)
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
+   text).  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_gettext (const char *__msgid);
+static inline char *gettext (const char *__msgid)
+{
+  return libintl_gettext (__msgid);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define gettext libintl_gettext
+#endif
+extern char *gettext _INTL_PARAMS ((const char *__msgid))
+       _INTL_ASM (libintl_gettext);
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+   LC_MESSAGES locale.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
+static inline char *dgettext (const char *__domainname, const char *__msgid)
+{
+  return libintl_dgettext (__domainname, __msgid);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dgettext libintl_dgettext
+#endif
+extern char *dgettext _INTL_PARAMS ((const char *__domainname,
+                                    const char *__msgid))
+       _INTL_ASM (libintl_dgettext);
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+   locale.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
+                               int __category);
+static inline char *dcgettext (const char *__domainname, const char *__msgid,
+                              int __category)
+{
+  return libintl_dcgettext (__domainname, __msgid, __category);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dcgettext libintl_dcgettext
+#endif
+extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
+                                     const char *__msgid,
+                                     int __category))
+       _INTL_ASM (libintl_dcgettext);
+#endif
+
+
+/* Similar to `gettext' but select the plural form corresponding to the
+   number N.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
+                              unsigned long int __n);
+static inline char *ngettext (const char *__msgid1, const char *__msgid2,
+                             unsigned long int __n)
+{
+  return libintl_ngettext (__msgid1, __msgid2, __n);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define ngettext libintl_ngettext
+#endif
+extern char *ngettext _INTL_PARAMS ((const char *__msgid1,
+                                    const char *__msgid2,
+                                    unsigned long int __n))
+       _INTL_ASM (libintl_ngettext);
+#endif
+
+/* Similar to `dgettext' but select the plural form corresponding to the
+   number N.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
+                               const char *__msgid2, unsigned long int __n);
+static inline char *dngettext (const char *__domainname, const char *__msgid1,
+                              const char *__msgid2, unsigned long int __n)
+{
+  return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dngettext libintl_dngettext
+#endif
+extern char *dngettext _INTL_PARAMS ((const char *__domainname,
+                                     const char *__msgid1,
+                                     const char *__msgid2,
+                                     unsigned long int __n))
+       _INTL_ASM (libintl_dngettext);
+#endif
+
+/* Similar to `dcgettext' but select the plural form corresponding to the
+   number N.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dcngettext (const char *__domainname,
+                                const char *__msgid1, const char *__msgid2,
+                                unsigned long int __n, int __category);
+static inline char *dcngettext (const char *__domainname,
+                               const char *__msgid1, const char *__msgid2,
+                               unsigned long int __n, int __category)
+{
+  return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dcngettext libintl_dcngettext
+#endif
+extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
+                                      const char *__msgid1,
+                                      const char *__msgid2,
+                                      unsigned long int __n,
+                                      int __category))
+       _INTL_ASM (libintl_dcngettext);
+#endif
+
+
+/* Set the current default message catalog to DOMAINNAME.
+   If DOMAINNAME is null, return the current default.
+   If DOMAINNAME is "", reset to the default of "messages".  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_textdomain (const char *__domainname);
+static inline char *textdomain (const char *__domainname)
+{
+  return libintl_textdomain (__domainname);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define textdomain libintl_textdomain
+#endif
+extern char *textdomain _INTL_PARAMS ((const char *__domainname))
+       _INTL_ASM (libintl_textdomain);
+#endif
+
+/* Specify that the DOMAINNAME message catalog will be found
+   in DIRNAME rather than in the system locale data base.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_bindtextdomain (const char *__domainname,
+                                    const char *__dirname);
+static inline char *bindtextdomain (const char *__domainname,
+                                   const char *__dirname)
+{
+  return libintl_bindtextdomain (__domainname, __dirname);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define bindtextdomain libintl_bindtextdomain
+#endif
+extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname,
+                                          const char *__dirname))
+       _INTL_ASM (libintl_bindtextdomain);
+#endif
+
+/* Specify the character encoding in which the messages from the
+   DOMAINNAME message catalog will be returned.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_bind_textdomain_codeset (const char *__domainname,
+                                             const char *__codeset);
+static inline char *bind_textdomain_codeset (const char *__domainname,
+                                            const char *__codeset)
+{
+  return libintl_bind_textdomain_codeset (__domainname, __codeset);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define bind_textdomain_codeset libintl_bind_textdomain_codeset
+#endif
+extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname,
+                                                   const char *__codeset))
+       _INTL_ASM (libintl_bind_textdomain_codeset);
+#endif
+
+
+/* Support for relocatable packages.  */
+
+/* Sets the original and the current installation prefix of the package.
+   Relocation simply replaces a pathname starting with the original prefix
+   by the corresponding pathname with the current prefix instead.  Both
+   prefixes should be directory names without trailing slash (i.e. use ""
+   instead of "/").  */
+#define libintl_set_relocation_prefix libintl_set_relocation_prefix
+extern void libintl_set_relocation_prefix (const char *orig_prefix,
+                                          const char *curr_prefix);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* libintl.h */
index 621a76359f4ce411316e61a097f9d9981452fb5b..16ea1d1aa9b8f807288d09678b2908ee9fca3ac7 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-03-05  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am (stdbool.h, alloca.h): All objects depend on them.
index a7867cff7319d647757f8798976a0072f482f9a1..320315cd4292ef7a454f586b76af542a87bfbb37 100644 (file)
@@ -82,3 +82,8 @@ alloca.h: ../../gettext-tools/lib/alloca_.h
        cp $(srcdir)/../../gettext-tools/lib/alloca_.h alloca.h
 MOSTLYCLEANFILES += alloca.h
 # <<< gnulib module alloca.
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-runtime/lib/Makefile.msvc b/gettext-runtime/lib/Makefile.msvc
new file mode 100644 (file)
index 0000000..5ed6da5
--- /dev/null
@@ -0,0 +1,98 @@
+# -*- Makefile -*- for gettext-runtime/lib
+
+#### Start of system configuration section. ####
+
+# Flags that can be set on the nmake command line:
+#   MFLAGS={-ML|-MT|-MD} for defining the compilation model
+#     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
+#     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
+#     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
+#   DEBUG=1   for compiling with debugging information
+!if !defined(DEBUG)
+DEBUG=0
+!endif
+!if !defined(MFLAGS)
+MFLAGS=
+!endif
+
+# Programs used by "make":
+
+CC = cl
+
+# Set to -W3 if you want to see maximum amount of warnings, including stupid
+# ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
+WARN_CFLAGS = -W1
+
+!if $(DEBUG)
+OPTIMFLAGS = -Od -Z7
+!else
+# Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
+OPTIMFLAGS = -D_NDEBUG -O1
+!endif
+
+CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS)
+
+INCLUDES =
+
+AR = lib
+AR_FLAGS = /out:
+
+LN = copy
+RM = -del
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+OBJECTS = basename.obj error.obj getopt.obj getopt1.obj progname.obj relocatable.obj xmalloc.obj xstrdup.obj
+
+all : grt.lib
+
+basename.obj : ..\..\gettext-tools\lib\basename.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c ..\..\gettext-tools\lib\basename.c
+
+error.obj : ..\..\gettext-tools\lib\error.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c ..\..\gettext-tools\lib\error.c
+
+getopt.obj : ..\..\gettext-tools\lib\getopt.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c ..\..\gettext-tools\lib\getopt.c
+
+getopt1.obj : ..\..\gettext-tools\lib\getopt1.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c ..\..\gettext-tools\lib\getopt1.c
+
+progname.obj : ..\..\gettext-tools\lib\progname.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c ..\..\gettext-tools\lib\progname.c
+
+relocatable.obj : ..\..\gettext-tools\lib\relocatable.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c ..\..\gettext-tools\lib\relocatable.c
+
+xmalloc.obj : ..\..\gettext-tools\lib\xmalloc.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c ..\..\gettext-tools\lib\xmalloc.c
+
+xstrdup.obj : ..\..\gettext-tools\lib\xstrdup.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c ..\..\gettext-tools\lib\xstrdup.c
+
+grt.lib : $(OBJECTS)
+       -$(RM) grt.lib
+       $(AR) $(AR_FLAGS)grt.lib $(OBJECTS)
+
+install : all
+
+installdirs :
+
+uninstall :
+
+check :
+
+mostlyclean : clean
+
+clean : force
+       $(RM) *.obj
+       $(RM) *.lib
+       $(RM) core
+
+distclean : clean
+
+maintainer-clean : distclean
+
+force :
index 3bb7b608561e8921d1c5b58c31a63826f9da3412..a1643dfacd483d5920bfeada2af000cf1a3736c8 100644 (file)
@@ -1,3 +1,16 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * autosprintf.h.in: Renamed from autosprintf.h.
+       * Makefile.msvc: New file.
+       * README.woe32: New file.
+       * windows/dllexport.h: New file.
+       * windows/asprintf.rc: New file.
+       * Makefile.am (EXTRA_DIST): Add them and config.h.msvc.
+       (autosprintf.h): New rule.
+       (MOSTLYCLEANFILES): Add autosprintf.h.
+       (config.h.msvc, autosprintf.h.msvc-shared): New rules.
+
 2003-02-22  Bruno Haible  <bruno@clisp.org>
 
        * autosprintf.texi: Add comment about indices.
index 9706deb19ccfc5b760724510a07180e73b7adb71..c49b0fe3e4dee901a92a614dc2cea65c6ddd3b25 100644 (file)
@@ -28,6 +28,11 @@ MOSTLYCLEANFILES =
 
 include_HEADERS = autosprintf.h
 
+all-local $(libasprintf_la_OBJECTS): autosprintf.h
+autosprintf.h: autosprintf.h.in
+       cp $(srcdir)/autosprintf.h.in autosprintf.h
+MOSTLYCLEANFILES += autosprintf.h
+
 
 # Library code.
 
@@ -168,3 +173,22 @@ uninstall-html:
        $(RM) $(DESTDIR)$(htmldir)/autosprintf.html
 
 EXTRA_DIST += texi2html autosprintf.html
+
+
+# Woe32 support.
+
+config.h.msvc: config.h.in
+       (sed -e 's/#undef HAVE_ALLOCA$$/#define HAVE_ALLOCA 1/' \
+            -e 's/#undef HAVE_LONG_DOUBLE$$/#define HAVE_LONG_DOUBLE 1/' \
+            -e 's/#undef HAVE_PTRDIFF_T$$/#define HAVE_PTRDIFF_T 1/' \
+            -e 's/#undef HAVE_SNPRINTF$$/#define HAVE_SNPRINTF 1/' \
+            -e 's/#undef HAVE_STDLIB_H$$/#define HAVE_STDLIB_H 1/' \
+            -e 's/#undef HAVE_STRING_H$$/#define HAVE_STRING_H 1/' \
+            -e 's/#undef HAVE_WCHAR_T$$/#define HAVE_WCHAR_T 1/' \
+            -e 's/#undef HAVE_WINT_T$$/#define HAVE_WINT_T 1/' \
+          < $<; echo; echo '#define snprintf _snprintf') > $@
+
+autosprintf.h.msvc-shared: autosprintf.h.in windows/dllexport.h
+       sed -e 's/extern \([^"]\)/extern LIBASPRINTF_DLL_EXPORTED \1/' -e '/#define _AUTOSPRINTF_H/r windows/dllexport.h' < $< > $@
+
+EXTRA_DIST += README.woe32 Makefile.msvc config.h.msvc windows/dllexport.h windows/asprintf.rc
diff --git a/gettext-runtime/libasprintf/Makefile.msvc b/gettext-runtime/libasprintf/Makefile.msvc
new file mode 100644 (file)
index 0000000..ea8f30b
--- /dev/null
@@ -0,0 +1,181 @@
+# -*- Makefile -*- for gettext-runtime/libasprintf
+
+#### Start of system configuration section. ####
+
+# Flags that can be set on the nmake command line:
+#   DLL=1     for compiling a .dll with a stub .lib (default is a static .lib)
+#             Note that this works only with MFLAGS=-MD.
+#   MFLAGS={-ML|-MT|-MD} for defining the compilation model
+#     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
+#     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
+#     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
+#   DEBUG=1   for compiling with debugging information
+# Note that nmake command line flags are automatically passed to subdirectory
+# Makefiles. Therefore we don't need to pass them explicitly to subdirectory
+# Makefiles, but the subdirectory Makefiles need to have the same defaults.
+!if !defined(DLL)
+DLL=0
+!endif
+!if !defined(DEBUG)
+DEBUG=0
+!endif
+!if !defined(MFLAGS)
+!if !$(DLL)
+MFLAGS=
+!else
+MFLAGS=-MD
+!endif
+!endif
+
+# Directories used by "make install":
+prefix = c:\usr
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)\bin
+libdir = $(exec_prefix)\lib
+includedir = $(prefix)\include
+# For this subpackage only.
+sub_docdir = $(prefix)\doc\libasprintf
+
+# Programs used by "make":
+
+CC = cl
+CXX = cl -TP
+
+# Set to -W3 if you want to see maximum amount of warnings, including stupid
+# ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
+WARN_CFLAGS = -W1
+
+!if !$(DLL)
+PICFLAGS =
+!else
+# "-GD" (msvc5) optimizes for DLL.
+# mscv4 doesn't know about this flag and ignores it.
+PICFLAGS = -GD
+!endif
+
+!if $(DEBUG)
+OPTIMFLAGS = -Od -Z7
+!else
+# Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
+OPTIMFLAGS = -D_NDEBUG -O1
+!endif
+
+# -DBUILDING_LIBASPRINTF: Change expansion of LIBASPRINTF_DLL_EXPORTED macro.
+CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H -DBUILDING_LIBASPRINTF
+CXXFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H -DBUILDING_LIBASPRINTF
+
+INCLUDES = -I.
+
+AR = lib
+AR_FLAGS = /out:
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+OBJECTS = lib-asprintf.obj autosprintf.obj
+
+RESOURCES = asprintf.res
+
+all : autosprintf.h asprintf.lib
+
+autosprintf.h :
+!if !$(DLL)
+       $(LN) autosprintf.h.in autosprintf.h
+!else
+       $(LN) autosprintf.h.msvc-shared autosprintf.h
+!endif
+
+config.h : config.h.msvc
+       -$(RM) config.h
+       $(LN) config.h.msvc config.h
+
+alloca.h : alloca_.h
+       -$(RM) alloca.h
+       $(LN) alloca_.h alloca.h
+
+lib-asprintf.obj : lib-asprintf.c config.h printf-args.h printf-args.c printf-parse.h printf-parse.c alloca.h vasnprintf.h vasnprintf.c asnprintf.c vasprintf.h vasprintf.c asprintf.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c lib-asprintf.c
+
+autosprintf.obj : autosprintf.cc autosprintf.h config.h lib-asprintf.h
+       $(CXX) $(INCLUDES) $(CXXFLAGS) $(PICFLAGS) -c autosprintf.cc
+
+!if !$(DLL)
+
+asprintf.lib : $(OBJECTS)
+       -$(RM) asprintf.lib
+       $(AR) $(AR_FLAGS)asprintf.lib $(OBJECTS)
+
+!else
+
+# asprintf.dll and asprintf.lib are created together.
+asprintf.lib : $(OBJECTS) $(RESOURCES)
+       $(CC) $(MFLAGS) -LD $(OBJECTS) $(RESOURCES) -Feasprintf.dll
+
+asprintf.res : windows/asprintf.rc
+       rc -Fo asprintf.res windows/asprintf.rc
+
+!endif
+
+install : all force
+       -mkdir $(prefix)
+       -mkdir $(includedir)
+       $(INSTALL_DATA) autosprintf.h $(includedir)\autosprintf.h
+       -mkdir $(exec_prefix)
+!if $(DLL)
+       -mkdir $(bindir)
+       $(INSTALL_DATA) asprintf.dll $(bindir)\asprintf.dll
+!endif
+       -mkdir $(libdir)
+       $(INSTALL_DATA) asprintf.lib $(libdir)\asprintf.lib
+       -mkdir $(prefix)\doc
+       -mkdir $(sub_docdir)
+       $(INSTALL_DATA) doc\autosprintf.html $(sub_docdir)\autosprintf.html
+
+installdirs : force
+       -mkdir $(prefix)
+       -mkdir $(includedir)
+       -mkdir $(exec_prefix)
+!if $(DLL)
+       -mkdir $(bindir)
+!endif
+       -mkdir $(libdir)
+       -mkdir $(prefix)\doc
+       -mkdir $(sub_docdir)
+
+uninstall : force
+       $(RM) $(includedir)\autosprintf.h
+!if $(DLL)
+       $(RM) $(bindir)\asprintf.dll
+!endif
+       $(RM) $(libdir)\asprintf.lib
+       $(RM) $(sub_docdir)\autosprintf.html
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+       $(RM) autosprintf.h
+       $(RM) config.h
+       $(RM) alloca.h
+       $(RM) *.obj
+       $(RM) *.lib
+       $(RM) *.exp
+       $(RM) *.dll
+       $(RM) asprintf.res
+       $(RM) core
+
+distclean : clean
+
+maintainer-clean : distclean
+
+force :
diff --git a/gettext-runtime/libasprintf/README.woe32 b/gettext-runtime/libasprintf/README.woe32
new file mode 100644 (file)
index 0000000..83a161f
--- /dev/null
@@ -0,0 +1,39 @@
+Installation on Woe32 (WinNT/2000/XP, Win95/98/ME):
+
+- Requires MS Visual C/C++ 4.0 or 5.0 or 6.0 or 7.0.
+
+- Cannot build in a separate directory.
+
+- Build instructions:
+
+   Make sure that the MSVC4.0 or MSVC5.0 or MSVC6.0 utilities ("cl" etc.) are
+   found in PATH.
+
+   For shared library (DLL):
+
+        nmake -f Makefile.msvc DLL=1 MFLAGS=-MD
+
+   For static library:
+
+        nmake -f Makefile.msvc
+
+   If you want to build both the shared and static library, you have to
+   unpack the gettext sources twice in different directories. Don't mix
+   the two formats; you cannot use the autosprintf.h generated for the static
+   library together with the shared library or vice versa.
+
+- Installation:
+
+   Either:
+
+        Copy autosprintf.h to your header file repository.
+        Copy asprintf.lib to your library repository.
+        If you built for shared library, also copy asprintf.dll into one of
+        the directories listed in your PATH, or into the directory containing
+        the executable which shall make use of autosprintf.
+
+   Or:
+
+        nmake -f Makefile.msvc DLL=1 MFLAGS=-MD install prefix=InstallBaseDirectory
+   or
+        nmake -f Makefile.msvc install prefix=InstallBaseDirectory
diff --git a/gettext-runtime/libasprintf/autosprintf.h.in b/gettext-runtime/libasprintf/autosprintf.h.in
new file mode 100644 (file)
index 0000000..ac21ff2
--- /dev/null
@@ -0,0 +1,66 @@
+/* Class autosprintf - formatted output to an ostream.
+   Copyright (C) 2002 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _AUTOSPRINTF_H
+#define _AUTOSPRINTF_H
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+#  define __attribute__(Spec) /* empty */
+# endif
+/* The __-protected variants of `format' and `printf' attributes
+   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#  define __format__ format
+#  define __printf__ printf
+# endif
+#endif
+
+#include <string>
+#include <iostream>
+
+namespace gnu
+{
+  /* A temporary object, usually allocated on the stack, representing
+     the result of an asprintf() call.  */
+  class autosprintf
+  {
+  public:
+    /* Constructor: takes a format string and the printf arguments.  */
+    autosprintf (const char *format, ...)
+                __attribute__ ((__format__ (__printf__, 2, 3)));
+    /* Copy constructor.  */
+    autosprintf (const autosprintf& src);
+    /* Destructor: frees the temporarily allocated string.  */
+    ~autosprintf ();
+    /* Conversion to string.  */
+    operator char * () const;
+    operator std::string () const;
+    /* Output to an ostream.  */
+    friend inline std::ostream& operator<< (std::ostream& stream, const autosprintf& tmp)
+    {
+      stream << (tmp.str ? tmp.str : "(error in autosprintf)");
+      return stream;
+    }
+  private:
+    char *str;
+  };
+}
+
+#endif /* _AUTOSPRINTF_H */
diff --git a/gettext-runtime/libasprintf/windows/asprintf.rc b/gettext-runtime/libasprintf/windows/asprintf.rc
new file mode 100644 (file)
index 0000000..a4337fe
--- /dev/null
@@ -0,0 +1,37 @@
+/* Resources for asprintf.dll */
+/* There are 4 occurrences of the version number in this file. */
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,0
+ PRODUCTVERSION 1,0,0,0
+ FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */
+#ifdef _DEBUG
+ FILEFLAGS 0x1L  /* VS_FF_DEBUG */
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x10004L  /* VOS_DOS_WINDOWS32 */
+ FILETYPE 0x2L  /* VFT_DLL */
+ FILESUBTYPE 0x0L  /* VFT2_UNKNOWN */
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "04090000"  /* Lang = US English, Charset = ASCII */
+        BEGIN
+            VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\0"
+            VALUE "CompanyName", "Free Software Foundation\0"
+            VALUE "FileDescription", "LGPLed libasprintf for Windows NT/2000/XP and Windows 95/98/ME\0"
+            VALUE "FileVersion", "1.0\0"
+            VALUE "InternalName", "asprintf.dll\0"
+            VALUE "LegalCopyright", "Copyright (C) 1999-2003\0"
+            VALUE "LegalTrademarks", "\0"
+            VALUE "OriginalFilename", "asprintf.dll\0"
+            VALUE "ProductName", "libasprintf: automatic formatted output to strings\0"
+            VALUE "ProductVersion", "1.0\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x0409, 0  /* US English, ASCII */
+    END
+END
diff --git a/gettext-runtime/libasprintf/windows/dllexport.h b/gettext-runtime/libasprintf/windows/dllexport.h
new file mode 100644 (file)
index 0000000..6a02992
--- /dev/null
@@ -0,0 +1,6 @@
+
+#ifdef BUILDING_LIBASPRINTF
+#define LIBASPRINTF_DLL_EXPORTED __declspec(dllexport)
+#else
+#define LIBASPRINTF_DLL_EXPORTED __declspec(dllimport)
+#endif
index d2837def5a4ca68d1717c96799b9f74f86eddd9e..1f3a62c494286c10d67c66784a2c26cda7558adb 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-02-22  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am (installdirs): Remove dependency, redundant with
index 04a8e604e47b1baeb670ff52282570933c31a194..2ce67ae835ba8ca6e949813b6caea2e742bfef31 100644 (file)
@@ -25,6 +25,7 @@ htmldir = $(docdir)
 localedir = $(datadir)/locale
 
 AUTOMAKE_OPTIONS = 1.2 gnits
+EXTRA_DIST =
 
 # A manual page for each of the bin_PROGRAMS in src/Makefile.am.
 
@@ -49,7 +50,7 @@ gettext.3.html ngettext.3.html \
 textdomain.3.html bindtextdomain.3.html bind_textdomain_codeset.3.html
 man_HTML = $(man_HTMLGEN) $(man_HTMLOTHER)
 
-EXTRA_DIST = help2man $(man_aux) $(man_MAN1IN) $(man_MAN3) $(man_MAN3IN) $(man_MAN3LINK) $(man_HTMLIN) $(man_HTMLOTHER)
+EXTRA_DIST += help2man $(man_aux) $(man_MAN1IN) $(man_MAN3) $(man_MAN3IN) $(man_MAN3LINK) $(man_HTMLIN) $(man_HTMLOTHER)
 CLEANFILES = $(man_MAN1GEN) $(man_HTMLGEN)
 MAINTAINERCLEANFILES = $(man_MAN1IN) $(man_MAN3) $(man_HTMLIN) $(man_HTMLOTHER)
 
@@ -159,3 +160,8 @@ uninstall-html:
        for file in $(man_HTML); do \
          $(RM) $(DESTDIR)$(htmldir)/$$file; \
        done
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-runtime/man/Makefile.msvc b/gettext-runtime/man/Makefile.msvc
new file mode 100644 (file)
index 0000000..2d27ba8
--- /dev/null
@@ -0,0 +1,92 @@
+# -*- Makefile -*- for gettext-runtime/man
+
+#### Start of system configuration section. ####
+
+# Directories used by "make install":
+prefix = c:\usr
+mandir = $(prefix)\man
+man1dir = $(mandir)\man1
+man3dir = $(mandir)\man3
+docdir = $(prefix)\doc\gettext
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all :
+
+install : all force
+       -mkdir $(prefix)
+       -mkdir $(mandir)
+       -mkdir $(man1dir)
+       $(INSTALL_DATA) gettext.1.in $(man1dir)\gettext.1
+       $(INSTALL_DATA) ngettext.1.in $(man1dir)\ngettext.1
+       -mkdir $(man3dir)
+       $(INSTALL_DATA) gettext.3 $(man3dir)\gettext.3
+       $(INSTALL_DATA) ngettext.3 $(man3dir)\ngettext.3
+       $(INSTALL_DATA) textdomain.3 $(man3dir)\textdomain.3
+       $(INSTALL_DATA) bindtextdomain.3 $(man3dir)\bindtextdomain.3
+       $(INSTALL_DATA) bind_textdomain_codeset.3 $(man3dir)\bind_textdomain_codeset.3
+       $(INSTALL_DATA) dgettext.3 $(man3dir)\dgettext.3
+       $(INSTALL_DATA) dcgettext.3 $(man3dir)\dcgettext.3
+       $(INSTALL_DATA) dngettext.3 $(man3dir)\dngettext.3
+       $(INSTALL_DATA) dcngettext.3 $(man3dir)\dcngettext.3
+       -mkdir $(prefix)\doc
+       -mkdir $(docdir)
+       $(INSTALL_DATA) gettext.1.html.in $(docdir)\gettext.1.html
+       $(INSTALL_DATA) ngettext.1.html.in $(docdir)\ngettext.1.html
+       $(INSTALL_DATA) gettext.3.html $(docdir)\gettext.3.html
+       $(INSTALL_DATA) ngettext.3.html $(docdir)\ngettext.3.html
+       $(INSTALL_DATA) textdomain.3.html $(docdir)\textdomain.3.html
+       $(INSTALL_DATA) bindtextdomain.3.html $(docdir)\bindtextdomain.3.html
+       $(INSTALL_DATA) bind_textdomain_codeset.3.html $(docdir)\bind_textdomain_codeset.3.html
+
+installdirs : force
+       -mkdir $(prefix)
+       -mkdir $(mandir)
+       -mkdir $(man1dir)
+       -mkdir $(man3dir)
+       -mkdir $(prefix)\doc
+       -mkdir $(docdir)
+
+uninstall : force
+       $(RM) $(man1dir)\gettext.1
+       $(RM) $(man1dir)\ngettext.1
+       $(RM) $(man3dir)\gettext.3
+       $(RM) $(man3dir)\ngettext.3
+       $(RM) $(man3dir)\textdomain.3
+       $(RM) $(man3dir)\bindtextdomain.3
+       $(RM) $(man3dir)\bind_textdomain_codeset.3
+       $(RM) $(man3dir)\dgettext.3
+       $(RM) $(man3dir)\dcgettext.3
+       $(RM) $(man3dir)\dngettext.3
+       $(RM) $(man3dir)\dcngettext.3
+       $(RM) $(docdir)\gettext.1.html
+       $(RM) $(docdir)\ngettext.1.html
+       $(RM) $(docdir)\gettext.3.html
+       $(RM) $(docdir)\ngettext.3.html
+       $(RM) $(docdir)\textdomain.3.html
+       $(RM) $(docdir)\bindtextdomain.3.html
+       $(RM) $(docdir)\bind_textdomain_codeset.3.html
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+       $(RM) core
+
+distclean : clean
+       $(RM) Makefile
+
+maintainer-clean : distclean
+
+force :
index d8f8375b32a154578f61ea429f5fbf083d315499..f9cdbf752921ae4034cb436dcc1a63b35ff57d82 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc.sh: New file.
+       * Rules-msvc: New file.
+
 2003-03-29  Bruno Haible  <bruno@clisp.org>
 
        * id.po: Update from Tedi Heriyanto <tedi_h@gmx.net>.
diff --git a/gettext-runtime/po/Makefile.msvc.sh b/gettext-runtime/po/Makefile.msvc.sh
new file mode 100755 (executable)
index 0000000..6e43ffc
--- /dev/null
@@ -0,0 +1,87 @@
+#!/bin/sh
+# Creates Makefile.msvc.
+domain=$1
+catalogs=$2
+
+cat <<\EOF
+# -*- Makefile -*- for po subdirectory
+
+#### Start of system configuration section. ####
+
+# Directories used by "make":
+srcdir = .
+
+# Directories used by "make install":
+prefix = c:\usr
+datadir = $(prefix)\share
+localedir = $(datadir)\locale
+
+# Programs used by "make":
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all :
+
+install : all force
+       -mkdir $(prefix)
+       -mkdir $(datadir)
+       -mkdir $(localedir)
+EOF
+for cat in $catalogs; do
+  cat=`basename $cat`
+  lang=`echo $cat | sed -e 's/\.gmo$//'`
+cat <<EOF
+       -mkdir \$(localedir)\\${cat}
+       -mkdir \$(localedir)\\${cat}\\LC_MESSAGES
+       \$(INSTALL_DATA) ${cat}.gmo \$(localedir)\\${cat}\\LC_MESSAGES\\${domain}.mo
+EOF
+done
+cat <<\EOF
+
+installdirs : force
+       -mkdir $(prefix)
+       -mkdir $(datadir)
+       -mkdir $(localedir)
+EOF
+for cat in $catalogs; do
+  cat=`basename $cat`
+  lang=`echo $cat | sed -e 's/\.gmo$//'`
+cat <<EOF
+       -mkdir \$(localedir)\\${cat}
+       -mkdir \$(localedir)\\${cat}\\LC_MESSAGES
+EOF
+done
+cat <<\EOF
+
+uninstall : force
+EOF
+for cat in $catalogs; do
+  cat=`basename $cat`
+  lang=`echo $cat | sed -e 's/\.gmo$//'`
+cat <<EOF
+       \$(RM) \$(localedir)\\${cat}\\LC_MESSAGES\\${domain}.mo
+EOF
+done
+cat <<\EOF
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+       $(RM) core
+
+distclean : clean
+
+maintainer-clean : distclean
+
+force :
+EOF
diff --git a/gettext-runtime/po/Rules-msvc b/gettext-runtime/po/Rules-msvc
new file mode 100644 (file)
index 0000000..bac93f9
--- /dev/null
@@ -0,0 +1,14 @@
+# Special Makefile rules for generating a Makefile.msvc.
+
+DISTFILES.extra3 = Rules-msvc Makefile.msvc.sh Makefile.msvc
+
+dist distdir: $(srcdir)/Makefile.msvc
+
+# Makefile.msvc needs to be redone when LINGUAS has changed. When rebuilding
+# it, ensure that we use the updated value of CATALOGS.
+$(srcdir)/Makefile.msvc: LINGUAS
+       $(MAKE) Makefile
+       $(MAKE) -f Makefile Makefile.msvc-update
+
+Makefile.msvc-update:
+       $(SHELL) $(srcdir)/Makefile.msvc.sh $(DOMAIN) '$(GMOFILES)' > $(srcdir)/Makefile.msvc
index 8458099e1f115c881da915ea88bb8404d08c873f..4d55cd5667366a15a3cce17b32683d45d782c759 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-02-28  Bruno Haible  <bruno@clisp.org>
 
        Support for relocatable installation.
index 2383e71643673a2a49c68d767118a0a136216843..8e32c9164286e9a3e52cdf3ff63dc2ecf1f133c6 100644 (file)
@@ -18,6 +18,7 @@
 ## Process this file with automake to produce Makefile.in.
 
 AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
+EXTRA_DIST =
 
 bin_PROGRAMS = gettext ngettext
 
@@ -52,3 +53,8 @@ RELOCATABLE_SRC_DIR = $(top_srcdir)/../gettext-tools/lib
 RELOCATABLE_BUILD_DIR = ../lib
 RELOCATABLE_CONFIG_H_DIR = ..
 @SET_RELOCATABLE@
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-runtime/src/Makefile.msvc b/gettext-runtime/src/Makefile.msvc
new file mode 100644 (file)
index 0000000..7af3d0e
--- /dev/null
@@ -0,0 +1,120 @@
+# -*- Makefile -*- for gettext-runtime/src
+
+#### Start of system configuration section. ####
+
+# Flags that can be set on the nmake command line:
+#   DLL=1     for compiling a .dll with a stub .lib (default is a static .lib)
+#             Note that this works only with MFLAGS=-MD.
+#   MFLAGS={-ML|-MT|-MD} for defining the compilation model
+#     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
+#     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
+#     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
+#   DEBUG=1   for compiling with debugging information
+!if !defined(DLL)
+DLL=0
+!endif
+!if !defined(DEBUG)
+DEBUG=0
+!endif
+!if !defined(MFLAGS)
+!if !$(DLL)
+MFLAGS=
+!else
+MFLAGS=-MD
+!endif
+!endif
+
+# Directories used by "make install":
+prefix = c:\usr
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)\bin
+
+# Programs used by "make":
+
+CC = cl
+
+# Set to -W3 if you want to see maximum amount of warnings, including stupid
+# ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
+WARN_CFLAGS = -W1
+
+!if !$(DLL)
+PICFLAGS =
+!else
+# "-GD" (msvc5) optimizes for DLL.
+# mscv4 doesn't know about this flag and ignores it.
+PICFLAGS = -GD
+!endif
+
+!if $(DEBUG)
+OPTIMFLAGS = -Od -Z7
+!else
+# Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
+OPTIMFLAGS = -D_NDEBUG -O1
+!endif
+
+CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS)
+
+INCLUDES =
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+PROGRAMS = gettext.exe ngettext.exe
+
+gettext_OBJECTS = gettext.obj
+ngettext_OBJECTS = ngettext.obj
+LDADD = ..\lib\grt.lib
+
+all : $(PROGRAMS)
+
+gettext.obj : gettext.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c gettext.c
+
+ngettext.obj : ngettext.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c ngettext.c
+
+gettext.exe : $(gettext_OBJECTS)
+       $(CC) $(gettext_OBJECTS) $(LDADD) -Fegettext.exe
+
+ngettext.exe : $(ngettext_OBJECTS)
+       $(CC) $(ngettext_OBJECTS) $(LDADD) -Fengettext.exe
+
+install : all force
+       -mkdir $(prefix)
+       -mkdir $(exec_prefix)
+       -mkdir $(bindir)
+       $(INSTALL_PROGRAM) gettext.exe $(bindir)\gettext.exe
+       $(INSTALL_PROGRAM) ngettext.exe $(bindir)\ngettext.exe
+
+installdirs : force
+       -mkdir $(prefix)
+       -mkdir $(exec_prefix)
+       -mkdir $(bindir)
+
+uninstall : force
+       $(RM) $(bindir)\gettext.exe
+       $(RM) $(bindir)\ngettext.exe
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+       $(RM) *.obj
+       $(RM) $(PROGRAMS)
+       $(RM) core
+
+distclean : clean
+
+maintainer-clean : distclean
+
+force :
diff --git a/gettext-runtime/windows/dllexport.h b/gettext-runtime/windows/dllexport.h
new file mode 100644 (file)
index 0000000..67bb9ca
--- /dev/null
@@ -0,0 +1,6 @@
+
+#ifdef BUILDING_LIBINTL
+#define LIBINTL_DLL_EXPORTED __declspec(dllexport)
+#else
+#define LIBINTL_DLL_EXPORTED __declspec(dllimport)
+#endif
diff --git a/gettext-runtime/windows/intl.rc b/gettext-runtime/windows/intl.rc
new file mode 100644 (file)
index 0000000..d07a160
--- /dev/null
@@ -0,0 +1,37 @@
+/* Resources for intl.dll */
+/* There are 4 occurrences of the version number in this file. */
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 0,12,0,0
+ PRODUCTVERSION 0,12,0,0
+ FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */
+#ifdef _DEBUG
+ FILEFLAGS 0x1L  /* VS_FF_DEBUG */
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x10004L  /* VOS_DOS_WINDOWS32 */
+ FILETYPE 0x2L  /* VFT_DLL */
+ FILESUBTYPE 0x0L  /* VFT2_UNKNOWN */
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "04090000"  /* Lang = US English, Charset = ASCII */
+        BEGIN
+            VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\0"
+            VALUE "CompanyName", "Free Software Foundation\0"
+            VALUE "FileDescription", "LGPLed libintl for Windows NT/2000/XP and Windows 95/98/ME\0"
+            VALUE "FileVersion", "0.12\0"
+            VALUE "InternalName", "intl.dll\0"
+            VALUE "LegalCopyright", "Copyright (C) 1995-2003\0"
+            VALUE "LegalTrademarks", "\0"
+            VALUE "OriginalFilename", "intl.dll\0"
+            VALUE "ProductName", "libintl: accessing NLS message catalogs\0"
+            VALUE "ProductVersion", "0.12\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x0409, 0  /* US English, ASCII */
+    END
+END
index 9caf58674e71535cf055cf9c635ad1dc900f7fc6..63405fe971f1e4265439227119f0c47e565319e7 100644 (file)
@@ -1,3 +1,15 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * README.woe32: New file.
+       * windows/gettextlib.exp: New file.
+       * windows/gettextlib.rc: New file.
+       * windows/gettextsrc.exp: New file.
+       * windows/gettextsrc.rc: New file.
+       * Makefile.am (EXTRA_DIST): Add them and config.h.msvc.
+       (config.h.msvc, intl/libgnuintl.h.msvc-shared): New rules.
+
 2003-02-28  Bruno Haible  <bruno@clisp.org>
 
        Support for relocatable installation.
index 5c05af4f462dc9fc46d1de9d4ce1bb58991ebf6e..e2045d138c1e73b043674238aa73e05b08ee35fb 100644 (file)
@@ -42,3 +42,58 @@ $(srcdir)/ABOUT-NLS: $(srcdir)/../gettext-runtime/ABOUT-NLS
 
 html:
        cd doc && $(MAKE) html
+
+
+# Woe32 support.
+
+config.h.msvc: config.h.in
+       sed -e 's/#undef ENABLE_NLS$$/#define ENABLE_NLS 1/' \
+           -e 's/#undef ENABLE_RELOCATABLE$$/#define ENABLE_RELOCATABLE 1/' \
+           -e 's/#undef HAVE_ALLOCA$$/#define HAVE_ALLOCA 1/' \
+           -e 's/#undef HAVE_ENVIRON_DECL$$/#define HAVE_ENVIRON_DECL 1/' \
+           -e 's/#undef HAVE_ERRNO_DECL$$/#define HAVE_ERRNO_DECL 1/' \
+           -e 's/#undef HAVE_FCNTL_H$$/#define HAVE_FCNTL_H 1/' \
+           -e 's/#undef HAVE_GETCWD$$/#define HAVE_GETCWD 1/' \
+           -e 's/#undef HAVE_GETHOSTBYNAME$$/#define HAVE_GETHOSTBYNAME 1/' \
+           -e 's/#undef HAVE_GETHOSTNAME$$/#define HAVE_GETHOSTNAME 1/' \
+           -e 's/#undef HAVE_GETCWD$$/#define HAVE_GETCWD 1/' \
+           -e 's/#undef HAVE_ICONV$$/#define HAVE_ICONV 1/' \
+           -e 's/#undef HAVE_ISASCII$$/#define HAVE_ISASCII 1/' \
+           -e 's/#undef HAVE_ISWCNTRL$$/#define HAVE_ISWCNTRL 1/' \
+           -e 's/#undef HAVE_ISWPRINT$$/#define HAVE_ISWPRINT 1/' \
+           -e 's/#undef HAVE_LIMITS_H$$/#define HAVE_LIMITS_H 1/' \
+           -e 's/#undef HAVE_LOCALE_H$$/#define HAVE_LOCALE_H 1/' \
+           -e 's/#undef HAVE_LONG_FILE_NAMES$$/#define HAVE_LONG_FILE_NAMES 1/' \
+           -e 's/#undef HAVE_MEMMOVE$$/#define HAVE_MEMMOVE 1/' \
+           -e 's/#undef HAVE_MEMSET$$/#define HAVE_MEMSET 1/' \
+           -e 's/#undef HAVE_PTRDIFF_T$$/#define HAVE_PTRDIFF_T 1/' \
+           -e 's/#undef HAVE_PUTENV$$/#define HAVE_PUTENV 1/' \
+           -e 's/#undef HAVE_RAISE$$/#define HAVE_RAISE 1/' \
+           -e 's/#undef HAVE_SEARCH_H$$/#define HAVE_SEARCH_H 1/' \
+           -e 's/#undef HAVE_SETLOCALE$$/#define HAVE_SETLOCALE 1/' \
+           -e 's/#undef HAVE_STDDEF_H$$/#define HAVE_STDDEF_H 1/' \
+           -e 's/#undef HAVE_STDLIB_H$$/#define HAVE_STDLIB_H 1/' \
+           -e 's/#undef HAVE_STRCSPN$$/#define HAVE_STRCSPN 1/' \
+           -e 's/#undef HAVE_STRDUP$$/#define HAVE_STRDUP 1/' \
+           -e 's/#undef HAVE_STRERROR$$/#define HAVE_STRERROR 1/' \
+           -e 's/#undef HAVE_STRING_H$$/#define HAVE_STRING_H 1/' \
+           -e 's/#undef HAVE_STRSTR$$/#define HAVE_STRSTR 1/' \
+           -e 's/#undef HAVE_STRTOUL$$/#define HAVE_STRTOUL 1/' \
+           -e 's/#undef HAVE_SYS_STAT_H$$/#define HAVE_SYS_STAT_H 1/' \
+           -e 's/#undef HAVE_SYS_TYPES_H$$/#define HAVE_SYS_TYPES_H 1/' \
+           -e 's/#undef HAVE_TIME_H$$/#define HAVE_TIME_H 1/' \
+           -e 's/#undef HAVE_VPRINTF$$/#define HAVE_VPRINTF 1/' \
+           -e 's/#undef HAVE_WCHAR_H$$/#define HAVE_WCHAR_H 1/' \
+           -e 's/#undef ICONV_CONST$$/#define ICONV_CONST const/' \
+           -e 's/#undef SETLOCALE_CONST$$/#define SETLOCALE_CONST const/' \
+           -e 's/#undef STACK_DIRECTION$$/#define STACK_DIRECTION -1/' \
+           -e 's/#undef STDC_HEADERS$$/#define STDC_HEADERS 1/' \
+           -e 's/#undef fnmatch$$/#define fnmatch rpl_fnmatch/' \
+           -e 's/#undef getline$$/#define getline rpl_getline/' \
+           -e 's/#undef pid_t$$/#define pid_t int/' \
+           -e 's/#undef ssize_t$$/#define ssize_t int/' \
+           -e 's/#undef uintmax_t$$/#define uintmax_t unsigned long/' \
+           -e '/#undef INSTALLPREFIX$$/d' \
+         < $< > $@
+
+EXTRA_DIST += README.woe32 Makefile.msvc config.h.msvc windows/gettextlib.exp windows/gettextsrc.exp windows/gettextlib.rc windows/gettextsrc.rc
diff --git a/gettext-tools/Makefile.msvc b/gettext-tools/Makefile.msvc
new file mode 100644 (file)
index 0000000..a0e2916
--- /dev/null
@@ -0,0 +1,378 @@
+# -*- Makefile -*- for gettext-tools
+
+#### Start of system configuration section. ####
+
+# Flags that can be set on the nmake command line:
+#   DLL=1     for compiling a .dll with a stub .lib (default is a static .lib)
+#             Note that this works only with MFLAGS=-MD.
+#   MFLAGS={-ML|-MT|-MD} for defining the compilation model
+#     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
+#     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
+#     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
+#   DEBUG=1   for compiling with debugging information
+# Note that nmake command line flags are automatically passed to subdirectory
+# Makefiles. Therefore we don't need to pass them explicitly to subdirectory
+# Makefiles, but the subdirectory Makefiles need to have the same defaults.
+!if !defined(DLL)
+DLL=0
+!endif
+!if !defined(DEBUG)
+DEBUG=0
+!endif
+!if !defined(MFLAGS)
+!if !$(DLL)
+MFLAGS=
+!else
+MFLAGS=-MD
+!endif
+!endif
+
+# Directories used by "make install":
+prefix = c:\usr
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)\bin
+libdir = $(exec_prefix)\lib
+includedir = $(prefix)\include
+datadir = $(prefix)\share
+localedir = $(datadir)\locale
+pkgdatadir = $(datadir)\gettext
+mandir = $(prefix)\man
+docdir = $(prefix)\doc\gettext
+emacsdir = $(datadir)\emacs
+lispdir = $(emacsdir)\site-lisp
+
+# Programs used by "make":
+
+CC = cl
+CXX = cl -TP
+
+# Set to -W3 if you want to see maximum amount of warnings, including stupid
+# ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
+WARN_CFLAGS = -W1
+
+!if !$(DLL)
+PICFLAGS =
+!else
+# "-GD" (msvc5) optimizes for DLL.
+# mscv4 doesn't know about this flag and ignores it.
+PICFLAGS = -GD
+!endif
+
+!if $(DEBUG)
+OPTIMFLAGS = -Od -Z7
+!else
+# Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
+OPTIMFLAGS = -D_NDEBUG -O1
+!endif
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all : config.h force
+       cd doc
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd intl
+       $(MAKE) -f ..\..\gettext-runtime\intl\Makefile.msvc srcdir=..\..\gettext-runtime\intl all
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd libuniname
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd projects
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd misc
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+       cd tests
+       $(MAKE) -f Makefile.msvc all
+       cd ..
+
+config.h : config.h.msvc
+       -$(RM) config.h
+       $(LN) config.h.msvc config.h
+
+install : force
+       cd doc
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd intl
+       $(MAKE) -f ..\..\gettext-runtime\intl\Makefile.msvc srcdir=..\..\gettext-runtime\intl install
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd libuniname
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd projects
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd misc
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+       cd tests
+       $(MAKE) -f Makefile.msvc install
+       cd ..
+
+installdirs : force
+       cd doc
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd intl
+       $(MAKE) -f ..\..\gettext-runtime\intl\Makefile.msvc srcdir=..\..\gettext-runtime\intl installdirs
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd libuniname
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd projects
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd misc
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+       cd tests
+       $(MAKE) -f Makefile.msvc installdirs
+       cd ..
+
+uninstall : force
+       cd doc
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd intl
+       $(MAKE) -f ..\..\gettext-runtime\intl\Makefile.msvc srcdir=..\..\gettext-runtime\intl uninstall
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd libuniname
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd projects
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd misc
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+       cd tests
+       $(MAKE) -f Makefile.msvc uninstall
+       cd ..
+
+check : all force
+       cd doc
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd intl
+       $(MAKE) -f ..\..\gettext-runtime\intl\Makefile.msvc srcdir=..\..\gettext-runtime\intl check
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd libuniname
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd projects
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd misc
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+       cd tests
+       $(MAKE) -f Makefile.msvc check
+       cd ..
+
+mostlyclean : force
+       cd doc
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd intl
+       $(MAKE) -f ..\..\gettext-runtime\intl\Makefile.msvc srcdir=..\..\gettext-runtime\intl mostlyclean
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd libuniname
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd projects
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd misc
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       cd tests
+       $(MAKE) -f Makefile.msvc mostlyclean
+       cd ..
+       $(RM) config.h
+
+clean : force
+       cd doc
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd intl
+       $(MAKE) -f ..\..\gettext-runtime\intl\Makefile.msvc srcdir=..\..\gettext-runtime\intl clean
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd libuniname
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd projects
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd misc
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       cd tests
+       $(MAKE) -f Makefile.msvc clean
+       cd ..
+       $(RM) config.h
+
+distclean : force
+       cd doc
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd intl
+       $(MAKE) -f ..\..\gettext-runtime\intl\Makefile.msvc srcdir=..\..\gettext-runtime\intl distclean
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd libuniname
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd projects
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd misc
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       cd tests
+       $(MAKE) -f Makefile.msvc distclean
+       cd ..
+       $(RM) config.h
+       $(RM) config.status config.log config.cache Makefile
+
+maintainer-clean : force
+       cd doc
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd intl
+       $(MAKE) -f ..\..\gettext-runtime\intl\Makefile.msvc srcdir=..\..\gettext-runtime\intl maintainer-clean
+       cd ..
+       cd lib
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd libuniname
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd src
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd po
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd projects
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd misc
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd man
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       cd tests
+       $(MAKE) -f Makefile.msvc maintainer-clean
+       cd ..
+       $(RM) config.h
+       $(RM) config.status config.log config.cache Makefile
+
+force :
diff --git a/gettext-tools/README.woe32 b/gettext-tools/README.woe32
new file mode 100644 (file)
index 0000000..08dbf89
--- /dev/null
@@ -0,0 +1,29 @@
+Installation on Woe32 (WinNT/2000/XP, Win95/98/ME):
+
+- Requires MS Visual C/C++ 4.0 or 5.0 or 6.0 or 7.0.
+
+- Cannot build in a separate directory.
+
+- Build instructions:
+
+   Make sure that the MSVC4.0 or MSVC5.0 or MSVC6.0 utilities ("cl" etc.) are
+   found in PATH.
+
+   For shared library (DLL):
+
+        nmake -f Makefile.msvc DLL=1 MFLAGS=-MD
+
+   For static library:
+
+        nmake -f Makefile.msvc
+
+   If you want to build both the shared and static library, you have to
+   unpack the gettext sources twice in different directories. Don't mix
+   the two formats; you cannot use the libintl.h generated for the static
+   library together with the shared library or vice versa.
+
+- Installation:
+
+        nmake -f Makefile.msvc DLL=1 MFLAGS=-MD install prefix=InstallBaseDirectory
+   or
+        nmake -f Makefile.msvc install prefix=InstallBaseDirectory
index d73e0387b1697825282735d96f3e6a3812aa9de5..95c2213cbc1568292639b56265823267271a55a7 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-03-10  Bruno Haible  <bruno@clisp.org>
 
        * msggrep.texi: Document option -C completely.
index b4cd17cd2666ba86fe9dcbb734de43690f5159c8..6ec79495ccc86fa445946e27bcc69641f9d9727f 100644 (file)
@@ -24,6 +24,7 @@ pdfdir = $(docdir)
 htmldir = $(docdir)
 
 AUTOMAKE_OPTIONS = 1.2 gnits
+EXTRA_DIST =
 MOSTLYCLEANFILES =
 
 SED = sed
@@ -39,7 +40,7 @@ gettext_TEXINFOS = \
   msgattrib.texi msgen.texi msgexec.texi msgfmt.texi msgunfmt.texi \
   gettextize.texi autopoint.texi iso-639.texi iso-3166.texi
 
-EXTRA_DIST = \
+EXTRA_DIST += \
   iso-639.sed iso-3166.sed ISO_639 ISO_3166 ISO_3166_de texi2html \
   ChangeLog.0
 
@@ -196,3 +197,8 @@ dist-html-split:
        for file in `cd $$d && echo gettext_*.html`; do \
          cp -p $$d/$$file $(distdir)/$$file || exit 1; \
        done
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-tools/doc/Makefile.msvc b/gettext-tools/doc/Makefile.msvc
new file mode 100644 (file)
index 0000000..04d79f2
--- /dev/null
@@ -0,0 +1,49 @@
+# -*- Makefile -*- for gettext-tools/doc
+
+#### Start of system configuration section. ####
+
+# Directories used by "make install":
+prefix = c:\usr
+docdir = $(prefix)\doc\gettext
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all :
+
+install : all force
+       -mkdir $(prefix)
+       -mkdir $(prefix)\doc
+       -mkdir $(docdir)
+       $(INSTALL_DATA) gettext_*.html $(docdir)
+
+installdirs : force
+       -mkdir $(prefix)
+       -mkdir $(prefix)\doc
+       -mkdir $(docdir)
+
+uninstall : force
+       $(RM) $(docdir)\gettext_*.html
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+       $(RM) core
+
+distclean : clean
+       $(RM) Makefile
+
+maintainer-clean : distclean
+
+force :
index 3bfcd20a0c64d7cc1c05180367f7a4e3f045c351..c57b5c7c76b3bab10958678d76629073444f9c32 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-03-28  Bruno Haible  <bruno@clisp.org>
 
        * copy-file.h (copy_file_preserving): Renamed from copy_file.
index 59405335894bd32dc2ddfcbb0c0e70e937a36b33..7c64a5f7026e7b4837431216a304eaf7e08218c8 100644 (file)
@@ -209,3 +209,8 @@ SUFFIXES += .sed .sin
 
 CLEANFILES += charset.alias ref-add.sed ref-del.sed
 # <<< gnulib module localcharset.
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-tools/lib/Makefile.msvc b/gettext-tools/lib/Makefile.msvc
new file mode 100644 (file)
index 0000000..814f0ca
--- /dev/null
@@ -0,0 +1,323 @@
+# -*- Makefile -*- for gettext-tools/lib
+
+#### Start of system configuration section. ####
+
+# Flags that can be set on the nmake command line:
+#   DLL=1     for compiling a .dll with a stub .lib (default is a static .lib)
+#             Note that this works only with MFLAGS=-MD.
+#   MFLAGS={-ML|-MT|-MD} for defining the compilation model
+#     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
+#     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
+#     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
+#   DEBUG=1   for compiling with debugging information
+!if !defined(DLL)
+DLL=0
+!endif
+!if !defined(DEBUG)
+DEBUG=0
+!endif
+!if !defined(MFLAGS)
+!if !$(DLL)
+MFLAGS=
+!else
+MFLAGS=-MD
+!endif
+!endif
+
+# Directories used by "make install":
+prefix = c:\usr
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)\bin
+
+# Programs used by "make":
+
+CC = cl
+
+# Set to -W3 if you want to see maximum amount of warnings, including stupid
+# ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
+WARN_CFLAGS = -W1
+
+!if !$(DLL)
+PICFLAGS =
+!else
+# "-GD" (msvc5) optimizes for DLL.
+# mscv4 doesn't know about this flag and ignores it.
+PICFLAGS = -GD
+!endif
+
+!if $(DEBUG)
+OPTIMFLAGS = -Od -Z7
+!else
+# Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
+OPTIMFLAGS = -D_NDEBUG -O1
+!endif
+
+CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS)
+
+INCLUDES =
+
+AR = lib
+AR_FLAGS = /out:
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+OBJECTS = \
+  argmatch.obj \
+  backupfile.obj addext.obj \
+  basename.obj \
+  c-ctype.obj \
+  classpath.obj \
+  copy-file.obj \
+  error.obj \
+  execute.obj \
+  findprog.obj \
+  fstrcmp.obj \
+  full-write.obj \
+  gcd.obj \
+  getopt.obj getopt1.obj \
+  hash.obj \
+  javacomp.obj \
+  javaexec.obj \
+  linebreak.obj \
+  mbswidth.obj \
+  obstack.obj \
+  concatpath.obj \
+  pipe-bidi.obj pipe-in.obj pipe-out.obj \
+  progname.obj \
+  relocatable.obj \
+  safe-read.obj \
+  safe-write.obj \
+  sh-quote.obj \
+  stpncpy.obj \
+  strtoul.obj \
+  tmpdir.obj \
+  wait-process.obj \
+  xerror.obj \
+  xmalloc.obj xstrdup.obj \
+  xsetenv.obj \
+  \
+  getline.obj \
+  mkdtemp.obj \
+  pfnmatch.obj \
+  relocatable.obj \
+  setenv.obj unsetenv.obj \
+  stpcpy.obj \
+  strcasecmp.obj strncasecmp.obj \
+  strpbrk.obj \
+  vasprintf.obj
+
+RESOURCES = gettextlib.res
+
+all : gettextlib.lib
+
+argmatch.obj : argmatch.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c argmatch.c
+
+backupfile.obj : backupfile.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c backupfile.c
+
+addext.obj : addext.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c addext.c
+
+basename.obj : basename.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c basename.c
+
+c-ctype.obj : c-ctype.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c c-ctype.c
+
+classpath.obj : classpath.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c classpath.c
+
+copy-file.obj : copy-file.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c copy-file.c
+
+error.obj : error.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c error.c
+
+execute.obj : execute.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c execute.c
+
+findprog.obj : findprog.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c findprog.c
+
+fstrcmp.obj : fstrcmp.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c fstrcmp.c
+
+full-write.obj : full-write.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c full-write.c
+
+gcd.obj : gcd.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c gcd.c
+
+getopt.obj : getopt.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c getopt.c
+
+getopt1.obj : getopt1.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c getopt1.c
+
+hash.obj : hash.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c hash.c
+
+javacomp.obj : javacomp.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c javacomp.c
+
+javaexec.obj : javaexec.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c javaexec.c
+
+linebreak.obj : linebreak.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c linebreak.c
+
+mbswidth.obj : mbswidth.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c mbswidth.c
+
+obstack.obj : obstack.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c obstack.c
+
+concatpath.obj : concatpath.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c concatpath.c
+
+pipe-bidi.obj : pipe-bidi.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c pipe-bidi.c
+
+pipe-in.obj : pipe-in.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c pipe-in.c
+
+pipe-out.obj : pipe-out.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c pipe-out.c
+
+progname.obj : progname.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c progname.c
+
+relocatable.obj : relocatable.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c relocatable.c
+
+safe-read.obj : safe-read.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c safe-read.c
+
+safe-write.obj : safe-write.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c safe-write.c
+
+sh-quote.obj : sh-quote.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c sh-quote.c
+
+stpncpy.obj : stpncpy.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c stpncpy.c
+
+strtoul.obj : strtoul.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c strtoul.c
+
+tmpdir.obj : tmpdir.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c tmpdir.c
+
+wait-process.obj : wait-process.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c wait-process.c
+
+xerror.obj : xerror.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xerror.c
+
+xmalloc.obj : xmalloc.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xmalloc.c
+
+xstrdup.obj : xstrdup.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xstrdup.c
+
+xsetenv.obj : xsetenv.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xsetenv.c
+
+getline.obj : getline.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c getline.c
+
+mkdtemp.obj : mkdtemp.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c mkdtemp.c
+
+pfnmatch.obj : pfnmatch.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c pfnmatch.c
+
+relocatable.obj : relocatable.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c relocatable.c
+
+setenv.obj : setenv.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c setenv.c
+
+unsetenv.obj : unsetenv.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c unsetenv.c
+
+stpcpy.obj : stpcpy.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c stpcpy.c
+
+strcasecmp.obj : strcasecmp.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c strcasecmp.c
+
+strncasecmp.obj : strncasecmp.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c strncasecmp.c
+
+strpbrk.obj : strpbrk.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c strpbrk.c
+
+vasprintf.obj : vasprintf.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c vasprintf.c
+
+!if !$(DLL)
+
+gettextlib.lib : $(OBJECTS)
+       -$(RM) gettextlib.lib
+       $(AR) $(AR_FLAGS)gettextlib.lib $(OBJECTS)
+
+!else
+
+# gettextlib.dll and gettextlib.lib are created together.
+gettextlib.lib : $(OBJECTS) $(RESOURCES)
+       $(CC) $(MFLAGS) -LD $(OBJECTS) $(RESOURCES)
+
+gettextlib.res : ../windows/gettextlib.rc
+       rc -Fo gettextlib.res ../windows/gettextlib.rc
+
+!endif
+
+install : all force
+       -mkdir $(prefix)
+       -mkdir $(exec_prefix)
+!if $(DLL)
+       -mkdir $(bindir)
+       $(INSTALL_DATA) gettextlib.dll $(bindir)\gettextlib.dll
+!endif
+
+installdirs : force
+       -mkdir $(prefix)
+       -mkdir $(exec_prefix)
+!if $(DLL)
+       -mkdir $(bindir)
+!endif
+
+uninstall : force
+!if $(DLL)
+       $(RM) $(bindir)\gettextlib.dll
+!endif
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+       $(RM) *.obj
+       $(RM) *.lib
+       $(RM) *.exp
+       $(RM) *.dll
+       $(RM) gettextlib.res
+       $(RM) core
+
+distclean : clean
+
+maintainer-clean : distclean
+
+force :
index e4b22232212b4c22fe9e0b829a3391e27f7b93a5..636fcee28a199de5739d70810edbc712701e9f7d 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-01-12  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am: Make use of += for variables.
index 2907ca5622e6afdaf02bfb7d13720dac8583af2c..48ce186b99c61000a117754ea2980733700380bf 100644 (file)
@@ -37,3 +37,8 @@ noinst_PROGRAMS = test-names
 test_names_LDADD = libuniname.a ../lib/libgettextlib.la
 
 EXTRA_DIST += $(TESTS) UnicodeDataNames.txt
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-tools/libuniname/Makefile.msvc b/gettext-tools/libuniname/Makefile.msvc
new file mode 100644 (file)
index 0000000..274d19a
--- /dev/null
@@ -0,0 +1,91 @@
+# -*- Makefile -*- for gettext-tools/libuniname
+
+#### Start of system configuration section. ####
+
+# Flags that can be set on the nmake command line:
+#   DLL=1     for compiling a .dll with a stub .lib (default is a static .lib)
+#             Note that this works only with MFLAGS=-MD.
+#   MFLAGS={-ML|-MT|-MD} for defining the compilation model
+#     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
+#     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
+#     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
+#   DEBUG=1   for compiling with debugging information
+!if !defined(DLL)
+DLL=0
+!endif
+!if !defined(DEBUG)
+DEBUG=0
+!endif
+!if !defined(MFLAGS)
+!if !$(DLL)
+MFLAGS=
+!else
+MFLAGS=-MD
+!endif
+!endif
+
+# Programs used by "make":
+
+CC = cl
+
+# Set to -W3 if you want to see maximum amount of warnings, including stupid
+# ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
+WARN_CFLAGS = -W1
+
+!if !$(DLL)
+PICFLAGS =
+!else
+# "-GD" (msvc5) optimizes for DLL.
+# mscv4 doesn't know about this flag and ignores it.
+PICFLAGS = -GD
+!endif
+
+!if $(DEBUG)
+OPTIMFLAGS = -Od -Z7
+!else
+# Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
+OPTIMFLAGS = -D_NDEBUG -O1
+!endif
+
+CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS)
+
+INCLUDES =
+
+LN = copy
+RM = -del
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+OBJECTS = uniname.obj
+
+all : uniname.lib
+
+uniname.obj : uniname.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c uniname.c
+
+uniname.lib : $(OBJECTS)
+       -$(RM) uniname.lib
+       $(AR) $(AR_FLAGS)uniname.lib $(OBJECTS)
+
+install : all
+
+installdirs :
+
+uninstall :
+
+check :
+
+mostlyclean : clean
+
+clean : force
+       $(RM) *.obj
+       $(RM) *.lib
+       $(RM) core
+
+distclean : clean
+
+maintainer-clean : distclean
+
+force :
index 0dd1df9d3d0fd8f76c7062b06e495b2c916153c9..ff75553f98c325339b2b67d86d82aabf4d3b21da 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-02-22  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am (installdirs): Remove dependency, redundant with
index bc9f077b96d1650021a8cedee9417969e941ee28..02d54919d17f6ad53fab9239b60d599d0f8f1fcf 100644 (file)
@@ -25,6 +25,7 @@ htmldir = $(docdir)
 localedir = $(datadir)/locale
 
 AUTOMAKE_OPTIONS = 1.2 gnits
+EXTRA_DIST =
 
 # A manual page for each of the bin_PROGRAMS in src/Makefile.am
 # and for each of the bin_SCRIPTS in misc/Makefile.am.
@@ -49,7 +50,7 @@ msgattrib.1.html msgcat.1.html msgcomm.1.html msgconv.1.html msgen.1.html msgexe
 gettextize.1.html autopoint.1.html
 man_HTML = $(man_HTMLOTHER)
 
-EXTRA_DIST = help2man $(man_aux) $(man_MAN1OTHER) $(man_HTMLOTHER) ChangeLog.0
+EXTRA_DIST += help2man $(man_aux) $(man_MAN1OTHER) $(man_HTMLOTHER) ChangeLog.0
 MAINTAINERCLEANFILES = $(man_MAN1OTHER) $(man_HTMLOTHER)
 
 PERL = @PERL@
@@ -188,3 +189,8 @@ uninstall-html:
        for file in $(man_HTML); do \
          $(RM) $(DESTDIR)$(htmldir)/$$file; \
        done
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-tools/man/Makefile.msvc b/gettext-tools/man/Makefile.msvc
new file mode 100644 (file)
index 0000000..8746e55
--- /dev/null
@@ -0,0 +1,113 @@
+# -*- Makefile -*- for gettext-tools/man
+
+#### Start of system configuration section. ####
+
+# Directories used by "make install":
+prefix = c:\usr
+mandir = $(prefix)\man
+man1dir = $(mandir)\man1
+docdir = $(prefix)\doc\gettext
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all :
+
+install : all force
+       -mkdir $(prefix)
+       -mkdir $(mandir)
+       -mkdir $(man1dir)
+       $(INSTALL_DATA) msgcmp.1 $(man1dir)\msgcmp.1
+       $(INSTALL_DATA) msgfmt.1 $(man1dir)\msgfmt.1
+       $(INSTALL_DATA) msgmerge.1 $(man1dir)\msgmerge.1
+       $(INSTALL_DATA) msgunfmt.1 $(man1dir)\msgunfmt.1
+       $(INSTALL_DATA) xgettext.1 $(man1dir)\xgettext.1
+       $(INSTALL_DATA) msgattrib.1 $(man1dir)\msgattrib.1
+       $(INSTALL_DATA) msgcat.1 $(man1dir)\msgcat.1
+       $(INSTALL_DATA) msgcomm.1 $(man1dir)\msgcomm.1
+       $(INSTALL_DATA) msgconv.1 $(man1dir)\msgconv.1
+       $(INSTALL_DATA) msgen.1 $(man1dir)\msgen.1
+       $(INSTALL_DATA) msgexec.1 $(man1dir)\msgexec.1
+       $(INSTALL_DATA) msgfilter.1 $(man1dir)\msgfilter.1
+       $(INSTALL_DATA) msggrep.1 $(man1dir)\msggrep.1
+       $(INSTALL_DATA) msginit.1 $(man1dir)\msginit.1
+       $(INSTALL_DATA) msguniq.1 $(man1dir)\msguniq.1
+       -mkdir $(prefix)\doc
+       -mkdir $(docdir)
+       $(INSTALL_DATA) msgcmp.1.html $(docdir)\msgcmp.1.html
+       $(INSTALL_DATA) msgfmt.1.html $(docdir)\msgfmt.1.html
+       $(INSTALL_DATA) msgmerge.1.html $(docdir)\msgmerge.1.html
+       $(INSTALL_DATA) msgunfmt.1.html $(docdir)\msgunfmt.1.html
+       $(INSTALL_DATA) xgettext.1.html $(docdir)\xgettext.1.html
+       $(INSTALL_DATA) msgattrib.1.html $(docdir)\msgattrib.1.html
+       $(INSTALL_DATA) msgcat.1.html $(docdir)\msgcat.1.html
+       $(INSTALL_DATA) msgcomm.1.html $(docdir)\msgcomm.1.html
+       $(INSTALL_DATA) msgconv.1.html $(docdir)\msgconv.1.html
+       $(INSTALL_DATA) msgen.1.html $(docdir)\msgen.1.html
+       $(INSTALL_DATA) msgexec.1.html $(docdir)\msgexec.1.html
+       $(INSTALL_DATA) msgfilter.1.html $(docdir)\msgfilter.1.html
+       $(INSTALL_DATA) msggrep.1.html $(docdir)\msggrep.1.html
+       $(INSTALL_DATA) msginit.1.html $(docdir)\msginit.1.html
+       $(INSTALL_DATA) msguniq.1.html $(docdir)\msguniq.1.html
+
+installdirs : force
+       -mkdir $(prefix)
+       -mkdir $(mandir)
+       -mkdir $(man1dir)
+       -mkdir $(prefix)\doc
+       -mkdir $(docdir)
+
+uninstall : force
+       $(RM) $(man1dir)\msgcmp.1
+       $(RM) $(man1dir)\msgfmt.1
+       $(RM) $(man1dir)\msgmerge.1
+       $(RM) $(man1dir)\msgunfmt.1
+       $(RM) $(man1dir)\xgettext.1
+       $(RM) $(man1dir)\msgattrib.1
+       $(RM) $(man1dir)\msgcat.1
+       $(RM) $(man1dir)\msgcomm.1
+       $(RM) $(man1dir)\msgconv.1
+       $(RM) $(man1dir)\msgen.1
+       $(RM) $(man1dir)\msgexec.1
+       $(RM) $(man1dir)\msgfilter.1
+       $(RM) $(man1dir)\msggrep.1
+       $(RM) $(man1dir)\msginit.1
+       $(RM) $(man1dir)\msguniq.1
+       $(RM) $(docdir)\msgcmp.1.html
+       $(RM) $(docdir)\msgfmt.1.html
+       $(RM) $(docdir)\msgmerge.1.html
+       $(RM) $(docdir)\msgunfmt.1.html
+       $(RM) $(docdir)\xgettext.1.html
+       $(RM) $(docdir)\msgattrib.1.html
+       $(RM) $(docdir)\msgcat.1.html
+       $(RM) $(docdir)\msgcomm.1.html
+       $(RM) $(docdir)\msgconv.1.html
+       $(RM) $(docdir)\msgen.1.html
+       $(RM) $(docdir)\msgexec.1.html
+       $(RM) $(docdir)\msgfilter.1.html
+       $(RM) $(docdir)\msggrep.1.html
+       $(RM) $(docdir)\msginit.1.html
+       $(RM) $(docdir)\msguniq.1.html
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+       $(RM) core
+
+distclean : clean
+       $(RM) Makefile
+
+maintainer-clean : distclean
+
+force :
index a5a9ea9cc5a03d829cc043df58b4f124b8ec877e..e5025d572b4387155f30eec12abb803e284f077d 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-02-28  Bruno Haible  <bruno@clisp.org>
 
        Support for relocatable installation.
index d56998190abfd07902a1ccc58056b9600ef8a772..9b9cfb46a697c8750313f91e4c524082ad3b4e68 100644 (file)
@@ -57,3 +57,8 @@ EXTRA_DIST += tcl_gettext.c README-Tcl
 # Old Perl interface.
 
 EXTRA_DIST += gettext.perl
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-tools/misc/Makefile.msvc b/gettext-tools/misc/Makefile.msvc
new file mode 100644 (file)
index 0000000..c462704
--- /dev/null
@@ -0,0 +1,56 @@
+# -*- Makefile -*- for gettext-tools/misc
+
+#### Start of system configuration section. ####
+
+# Directories used by "make install":
+prefix = c:\usr
+exec_prefix = $(prefix)
+datadir = $(prefix)\share
+emacsdir = $(datadir)\emacs
+lispdir = $(emacsdir)\site-lisp
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all :
+
+install : all force
+       -mkdir $(prefix)
+       -mkdir $(datadir)
+       -mkdir $(emacsdir)
+       -mkdir $(lispdir)
+       $(INSTALL_DATA) po-mode.el $(lispdir)\po-mode.el
+       $(INSTALL_DATA) po-compat.el $(lispdir)\po-compat.el
+
+installdirs : force
+       -mkdir $(prefix)
+       -mkdir $(datadir)
+       -mkdir $(emacsdir)
+       -mkdir $(lispdir)
+
+uninstall : force
+       $(RM) $(lispdir)\po-mode.el
+       $(RM) $(lispdir)\po-compat.el
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+       $(RM) core
+
+distclean : clean
+       $(RM) Makefile
+
+maintainer-clean : distclean
+
+force :
index 4c9019a9a83d8a51626d0e10006d363fac90248f..86ff9ad20fa411485786161f137127ab0519f67b 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc.sh: New file.
+       * Rules-msvc: New file.
+
 2003-03-29  Bruno Haible  <bruno@clisp.org>
 
        * da.po: Update from Keld Simonsen <keld@dkuug.dk>.
diff --git a/gettext-tools/po/Makefile.msvc.sh b/gettext-tools/po/Makefile.msvc.sh
new file mode 100755 (executable)
index 0000000..6e43ffc
--- /dev/null
@@ -0,0 +1,87 @@
+#!/bin/sh
+# Creates Makefile.msvc.
+domain=$1
+catalogs=$2
+
+cat <<\EOF
+# -*- Makefile -*- for po subdirectory
+
+#### Start of system configuration section. ####
+
+# Directories used by "make":
+srcdir = .
+
+# Directories used by "make install":
+prefix = c:\usr
+datadir = $(prefix)\share
+localedir = $(datadir)\locale
+
+# Programs used by "make":
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all :
+
+install : all force
+       -mkdir $(prefix)
+       -mkdir $(datadir)
+       -mkdir $(localedir)
+EOF
+for cat in $catalogs; do
+  cat=`basename $cat`
+  lang=`echo $cat | sed -e 's/\.gmo$//'`
+cat <<EOF
+       -mkdir \$(localedir)\\${cat}
+       -mkdir \$(localedir)\\${cat}\\LC_MESSAGES
+       \$(INSTALL_DATA) ${cat}.gmo \$(localedir)\\${cat}\\LC_MESSAGES\\${domain}.mo
+EOF
+done
+cat <<\EOF
+
+installdirs : force
+       -mkdir $(prefix)
+       -mkdir $(datadir)
+       -mkdir $(localedir)
+EOF
+for cat in $catalogs; do
+  cat=`basename $cat`
+  lang=`echo $cat | sed -e 's/\.gmo$//'`
+cat <<EOF
+       -mkdir \$(localedir)\\${cat}
+       -mkdir \$(localedir)\\${cat}\\LC_MESSAGES
+EOF
+done
+cat <<\EOF
+
+uninstall : force
+EOF
+for cat in $catalogs; do
+  cat=`basename $cat`
+  lang=`echo $cat | sed -e 's/\.gmo$//'`
+cat <<EOF
+       \$(RM) \$(localedir)\\${cat}\\LC_MESSAGES\\${domain}.mo
+EOF
+done
+cat <<\EOF
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+       $(RM) core
+
+distclean : clean
+
+maintainer-clean : distclean
+
+force :
+EOF
diff --git a/gettext-tools/po/Rules-msvc b/gettext-tools/po/Rules-msvc
new file mode 100644 (file)
index 0000000..bac93f9
--- /dev/null
@@ -0,0 +1,14 @@
+# Special Makefile rules for generating a Makefile.msvc.
+
+DISTFILES.extra3 = Rules-msvc Makefile.msvc.sh Makefile.msvc
+
+dist distdir: $(srcdir)/Makefile.msvc
+
+# Makefile.msvc needs to be redone when LINGUAS has changed. When rebuilding
+# it, ensure that we use the updated value of CATALOGS.
+$(srcdir)/Makefile.msvc: LINGUAS
+       $(MAKE) Makefile
+       $(MAKE) -f Makefile Makefile.msvc-update
+
+Makefile.msvc-update:
+       $(SHELL) $(srcdir)/Makefile.msvc.sh $(DOMAIN) '$(GMOFILES)' > $(srcdir)/Makefile.msvc
index ce50e693ea3277ddc7cae2ae70a2c1f4250699a8..3b03d28bf0075b186ade95616bff1e05cca5bf31 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-02-22  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am (installdirs): Remove dependency, redundant with
index 26652b2c13a871d282072abd983f4e3755bcd5ce..9f2f6c8b95e29c57f8d39280f40f9be25a04fafb 100644 (file)
@@ -18,6 +18,7 @@
 ## Process this file with automake to produce Makefile.in.
 
 AUTOMAKE_OPTIONS = 1.2 gnits
+EXTRA_DIST =
 
 RM = rm -f
 
@@ -33,7 +34,7 @@ DATAFILES = index \
        TP/teams.url TP/teams.html \
        KDE/teams.url KDE/teams.html \
        GNOME/teams.url GNOME/teams.html
-EXTRA_DIST = $(SCRIPTFILES) $(DATAFILES)
+EXTRA_DIST += $(SCRIPTFILES) $(DATAFILES)
 
 install-data-local:
        $(mkinstalldirs) $(DESTDIR)$(projectsdir)
@@ -66,3 +67,8 @@ uninstall-local:
          echo "$(RM) $(DESTDIR)$(projectsdir)/$$f"; \
          $(RM) $(DESTDIR)$(projectsdir)/$$f; \
        done
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-tools/projects/Makefile.msvc b/gettext-tools/projects/Makefile.msvc
new file mode 100644 (file)
index 0000000..e75f44a
--- /dev/null
@@ -0,0 +1,27 @@
+# -*- Makefile -*- for gettext-tools/projects
+
+#### Start of system configuration section. ####
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all :
+
+install : all
+
+installdirs :
+
+uninstall :
+
+check :
+
+mostlyclean : clean
+
+clean : force
+
+distclean : clean
+
+maintainer-clean : distclean
+
+force :
index b5e6084f8237108eca7002925c4de9db16dd56de..4d3bb739ae4189c9422243c9126506bd7b1660d8 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-03-28  Bruno Haible  <bruno@clisp.org>
 
        * msgmerge.c (main): Use copy_file_preserving instead of copy_file.
index 1a3beeed5c6925b46b505f397434224cf1da9166..d0bf63aaf46e52fd05ef06abe325cc11f4e89880 100644 (file)
@@ -337,3 +337,8 @@ RELOCATABLE_SRC_DIR = $(top_srcdir)/lib
 RELOCATABLE_BUILD_DIR = ../lib
 RELOCATABLE_CONFIG_H_DIR = ..
 @SET_RELOCATABLE@
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-tools/src/Makefile.msvc b/gettext-tools/src/Makefile.msvc
new file mode 100644 (file)
index 0000000..84557e4
--- /dev/null
@@ -0,0 +1,488 @@
+# -*- Makefile -*- for gettext-tools/src
+
+#### Start of system configuration section. ####
+
+# Flags that can be set on the nmake command line:
+#   DLL=1     for compiling a .dll with a stub .lib (default is a static .lib)
+#             Note that this works only with MFLAGS=-MD.
+#   MFLAGS={-ML|-MT|-MD} for defining the compilation model
+#     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
+#     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
+#     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
+#   DEBUG=1   for compiling with debugging information
+!if !defined(DLL)
+DLL=0
+!endif
+!if !defined(DEBUG)
+DEBUG=0
+!endif
+!if !defined(MFLAGS)
+!if !$(DLL)
+MFLAGS=
+!else
+MFLAGS=-MD
+!endif
+!endif
+
+# Directories used by "make install":
+prefix = c:\usr
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)\bin
+libdir = $(exec_prefix)\lib
+includedir = $(prefix)\include
+datadir = $(prefix)\share
+localedir = $(datadir)\locale
+aliaspath =
+pkgdatadir = $(datadir)\gettext
+
+# Programs used by "make":
+
+CC = cl
+
+# Set to -W3 if you want to see maximum amount of warnings, including stupid
+# ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
+WARN_CFLAGS = -W1
+
+!if !$(DLL)
+PICFLAGS =
+!else
+# "-GD" (msvc5) optimizes for DLL.
+# mscv4 doesn't know about this flag and ignores it.
+PICFLAGS = -GD
+!endif
+
+!if $(DEBUG)
+OPTIMFLAGS = -Od -Z7
+!else
+# Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
+OPTIMFLAGS = -D_NDEBUG -O1
+!endif
+
+CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS)
+
+INCLUDES =
+
+AR = lib
+AR_FLAGS = /out:
+
+LN = copy
+RM = -del
+
+# Programs used by "make install":
+INSTALL = copy
+INSTALL_PROGRAM = copy
+INSTALL_DATA = copy
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+PROGRAMS = \
+msgcmp.exe msgfmt.exe msgmerge.exe msgunfmt.exe xgettext.exe \
+msgattrib.exe msgcat.exe msgcomm.exe msgconv.exe msgen.exe msgexec.exe msgfilter.exe msggrep.exe msginit.exe msguniq.exe
+
+OBJECTS = \
+  message.obj \
+  po.obj \
+  po-lex.obj \
+  po-gram-gen.obj \
+  po-hash-gen.obj \
+  po-charset.obj \
+  open-po.obj \
+  dir-list.obj \
+  str-list.obj \
+  read-po.obj \
+  write-po.obj \
+  msgl-ascii.obj \
+  msgl-iconv.obj \
+  msgl-equal.obj \
+  msgl-cat.obj \
+  msgl-english.obj \
+  file-list.obj \
+  msgl-charset.obj \
+  po-time.obj \
+  plural.obj \
+  plural-table.obj \
+  format.obj \
+  format-c.obj \
+  format-python.obj \
+  format-lisp.obj \
+  format-elisp.obj \
+  format-librep.obj \
+  format-java.obj \
+  format-awk.obj \
+  format-pascal.obj \
+  format-ycp.obj \
+  format-tcl.obj \
+  format-php.obj
+
+msgcmp_OBJECTS = msgcmp.obj
+msgfmt_OBJECTS = msgfmt.obj write-mo.obj write-java.obj write-tcl.obj plural-eval.obj
+msgmerge_OBJECTS = msgmerge.obj
+msgunfmt_OBJECTS = msgunfmt.obj read-mo.obj read-java.obj read-tcl.obj
+xgettext_OBJECTS = xgettext.obj x-c.obj x-po.obj x-python.obj x-lisp.obj x-elisp.obj x-librep.obj x-smalltalk.obj x-java.obj x-awk.obj x-ycp.obj x-tcl.obj x-php.obj x-rst.obj x-glade.obj
+msgattrib_OBJECTS = msgattrib.obj
+msgcat_OBJECTS = msgcat.obj
+msgcomm_OBJECTS = msgcomm.obj
+msgconv_OBJECTS = msgconv.obj
+msgen_OBJECTS = msgen.obj
+msgexec_OBJECTS = msgexec.obj
+msgfilter_OBJECTS = msgfilter.obj
+msggrep_OBJECTS = msggrep.obj
+msginit_OBJECTS = msginit.obj localealias.obj
+msguniq_OBJECTS = msguniq.obj
+
+RESOURCES = gettextsrc.res
+
+all : gettextsrc.lib $(PROGRAMS)
+
+# Compilation rules for $(OBJECTS), with $(PICFLAGS).
+
+message.obj : message.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c message.c
+
+po.obj : po.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c po.c
+
+po-lex.obj : po-lex.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c po-lex.c
+
+po-gram-gen.obj : po-gram-gen.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c po-gram-gen.c
+
+po-hash-gen.obj : po-hash-gen.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c po-hash-gen.c
+
+po-charset.obj : po-charset.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c po-charset.c
+
+open-po.obj : open-po.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c open-po.c
+
+dir-list.obj : dir-list.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c dir-list.c
+
+str-list.obj : str-list.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c str-list.c
+
+read-po.obj : read-po.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c read-po.c
+
+write-po.obj : write-po.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c write-po.c
+
+msgl-ascii.obj : msgl-ascii.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c msgl-ascii.c
+
+msgl-iconv.obj : msgl-iconv.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c msgl-iconv.c
+
+msgl-equal.obj : msgl-equal.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c msgl-equal.c
+
+msgl-cat.obj : msgl-cat.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c msgl-cat.c
+
+msgl-english.obj : msgl-english.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c msgl-english.c
+
+file-list.obj : file-list.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c file-list.c
+
+msgl-charset.obj : msgl-charset.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c msgl-charset.c
+
+po-time.obj : po-time.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c po-time.c
+
+plural.obj : plural.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c plural.c
+
+plural-table.obj : plural-table.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c plural-table.c
+
+format.obj : format.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format.c
+
+format-c.obj : format-c.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-c.c
+
+format-python.obj : format-python.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-python.c
+
+format-lisp.obj : format-lisp.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-lisp.c
+
+format-elisp.obj : format-elisp.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-elisp.c
+
+format-librep.obj : format-librep.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-librep.c
+
+format-java.obj : format-java.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-java.c
+
+format-awk.obj : format-awk.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-awk.c
+
+format-pascal.obj : format-pascal.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-pascal.c
+
+format-ycp.obj : format-ycp.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-ycp.c
+
+format-tcl.obj : format-tcl.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-tcl.c
+
+format-php.obj : format-php.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-php.c
+
+!if !$(DLL)
+
+gettextsrc.lib : $(OBJECTS)
+       -$(RM) gettextsrc.lib
+       $(AR) $(AR_FLAGS)gettextsrc.lib $(OBJECTS)
+
+!else
+
+# gettextsrc.dll and gettextsrc.lib are created together.
+gettextsrc.lib : $(OBJECTS) $(RESOURCES)
+       $(CC) $(MFLAGS) -LD $(OBJECTS) $(RESOURCES)
+
+gettextsrc.res : ../windows/gettextsrc.rc
+       rc -Fo gettextsrc.res ../windows/gettextsrc.rc
+
+!endif
+
+# Compilation rules for $(program_OBJECTS), without $(PICFLAGS).
+
+msgcmp.obj : msgcmp.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msgcmp.c
+
+msgfmt.obj : msgfmt.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msgfmt.c
+
+write-mo.obj : write-mo.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c write-mo.c
+
+write-java.obj : write-java.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c write-java.c
+
+write-tcl.obj : write-tcl.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c write-tcl.c
+
+plural-eval.obj : plural-eval.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c plural-eval.c
+
+msgmerge.obj : msgmerge.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msgmerge.c
+
+msgunfmt.obj : msgunfmt.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msgunfmt.c
+
+read-mo.obj : read-mo.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c read-mo.c
+
+read-java.obj : read-java.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c read-java.c
+
+read-tcl.obj : read-tcl.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c read-tcl.c
+
+xgettext.obj : xgettext.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c xgettext.c
+
+x-c.obj : x-c.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-c.c
+
+x-po.obj : x-po.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-po.c
+
+x-python.obj : x-python.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-python.c
+
+x-lisp.obj : x-lisp.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-lisp.c
+
+x-elisp.obj : x-elisp.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-elisp.c
+
+x-librep.obj : x-librep.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-librep.c
+
+x-smalltalk.obj : x-smalltalk.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-smalltalk.c
+
+x-java.obj : x-java.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-java.c
+
+x-awk.obj : x-awk.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-awk.c
+
+x-ycp.obj : x-ycp.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-ycp.c
+
+x-tcl.obj : x-tcl.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-tcl.c
+
+x-php.obj : x-php.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-php.c
+
+x-rst.obj : x-rst.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-rst.c
+
+x-glade.obj : x-glade.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-glade.c
+
+msgattrib.obj : msgattrib.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msgattrib.c
+
+msgcat.obj : msgcat.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msgcat.c
+
+msgcomm.obj : msgcomm.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msgcomm.c
+
+msgconv.obj : msgconv.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msgconv.c
+
+msgen.obj : msgen.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msgen.c
+
+msgexec.obj : msgexec.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msgexec.c
+
+msgfilter.obj : msgfilter.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msgfilter.c
+
+msggrep.obj : msggrep.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msggrep.c
+
+msginit.obj : msginit.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msginit.c
+
+localealias.obj : ..\..\gettext-runtime\intl\localealias.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" -c ..\..\gettext-runtime\intl\localealias.c
+
+msguniq.obj : msguniq.c
+       $(CC) $(INCLUDES) $(CFLAGS) -DINSTALLPREFIX=\"$(prefix)\" -DINSTALLDIR=\"$(bindir)\" -c msguniq.c
+
+msgcmp.exe : $(msgcmp_OBJECTS)
+       $(CC) $(msgcmp_OBJECTS) -lgettextsrc -Femsgcmp.exe
+
+msgfmt.exe : $(msgfmt_OBJECTS)
+       $(CC) $(msgfmt_OBJECTS) -lgettextsrc -Fmsgfmte.exe
+
+msgmerge.exe : $(msgmerge_OBJECTS)
+       $(CC) $(msgmerge_OBJECTS) -lgettextsrc -Femsgmerge.exe
+
+msgunfmt.exe : $(msgunfmt_OBJECTS)
+       $(CC) $(msgunfmt_OBJECTS) -lgettextsrc -Femsgunfmt.exe
+
+xgettext.exe : $(xgettext_OBJECTS)
+       $(CC) $(xgettext_OBJECTS) ..\libuniname\uniname.lib -lgettextsrc -Fexgettext.exe
+
+msgattrib.exe : $(msgattrib_OBJECTS)
+       $(CC) $(msgattrib_OBJECTS) -lgettextsrc -Femsgattrib.exe
+
+msgcat.exe : $(msgcat_OBJECTS)
+       $(CC) $(msgcat_OBJECTS) -lgettextsrc -Femsgcat.exe
+
+msgcomm.exe : $(msgcomm_OBJECTS)
+       $(CC) $(msgcomm_OBJECTS) -lgettextsrc -Femsgcomm.exe
+
+msgconv.exe : $(msgconv_OBJECTS)
+       $(CC) $(msgconv_OBJECTS) -lgettextsrc -Femsgconv.exe
+
+msgen.exe : $(msgen_OBJECTS)
+       $(CC) $(msgen_OBJECTS) -lgettextsrc -Femsgen.exe
+
+msgexec.exe : $(msgexec_OBJECTS)
+       $(CC) $(msgexec_OBJECTS) -lgettextsrc -Femsgexec.exe
+
+msgfilter.exe : $(msgfilter_OBJECTS)
+       $(CC) $(msgfilter_OBJECTS) -lgettextsrc -Femsgfilter.exe
+
+msggrep.exe : $(msggrep_OBJECTS)
+       $(CC) $(msggrep_OBJECTS) -lgettextsrc -Femsggrep.exe
+
+msginit.exe : $(msginit_OBJECTS)
+       $(CC) $(msginit_OBJECTS) ..\intl\localename.obj -lgettextsrc -Femsginit.exe
+
+msguniq.exe : $(msguniq_OBJECTS)
+       $(CC) $(msguniq_OBJECTS) -lgettextsrc -Femsguniq.exe
+
+install : all force
+       -mkdir $(prefix)
+       -mkdir $(exec_prefix)
+!if $(DLL)
+       -mkdir $(bindir)
+       $(INSTALL_DATA) gettextsrc.dll $(bindir)\gettextsrc.dll
+!endif
+       $(INSTALL_PROGRAM) msgcmp.exe $(bindir)\msgcmp.exe
+       $(INSTALL_PROGRAM) msgfmt.exe $(bindir)\msgfmt.exe
+       $(INSTALL_PROGRAM) msgmerge.exe $(bindir)\msgmerge.exe
+       $(INSTALL_PROGRAM) msgunfmt.exe $(bindir)\msgunfmt.exe
+       $(INSTALL_PROGRAM) xgettext.exe $(bindir)\xgettext.exe
+       $(INSTALL_PROGRAM) msgattrib.exe $(bindir)\msgattrib.exe
+       $(INSTALL_PROGRAM) msgcat.exe $(bindir)\msgcat.exe
+       $(INSTALL_PROGRAM) msgcomm.exe $(bindir)\msgcomm.exe
+       $(INSTALL_PROGRAM) msgconv.exe $(bindir)\msgconv.exe
+       $(INSTALL_PROGRAM) msgen.exe $(bindir)\msgen.exe
+       $(INSTALL_PROGRAM) msgexec.exe $(bindir)\msgexec.exe
+       $(INSTALL_PROGRAM) msgfilter.exe $(bindir)\msgfilter.exe
+       $(INSTALL_PROGRAM) msggrep.exe $(bindir)\msggrep.exe
+       $(INSTALL_PROGRAM) msginit.exe $(bindir)\msginit.exe
+       $(INSTALL_PROGRAM) msguniq.exe $(bindir)\msguniq.exe
+       -mkdir $(datadir)
+       -mkdir $(pkgdatadir)
+       $(INSTALL_DATA) msgunfmt.tcl $(pkgdatadir)\msgunfmt.tcl
+
+installdirs : force
+       -mkdir $(prefix)
+       -mkdir $(exec_prefix)
+!if $(DLL)
+       -mkdir $(bindir)
+!endif
+       -mkdir $(datadir)
+       -mkdir $(pkgdatadir)
+
+uninstall : force
+!if $(DLL)
+       $(RM) $(bindir)\gettextsrc.dll
+!endif
+       $(RM) $(bindir)\msgcmp.exe
+       $(RM) $(bindir)\msgfmt.exe
+       $(RM) $(bindir)\msgmerge.exe
+       $(RM) $(bindir)\msgunfmt.exe
+       $(RM) $(bindir)\xgettext.exe
+       $(RM) $(bindir)\msgattrib.exe
+       $(RM) $(bindir)\msgcat.exe
+       $(RM) $(bindir)\msgcomm.exe
+       $(RM) $(bindir)\msgconv.exe
+       $(RM) $(bindir)\msgen.exe
+       $(RM) $(bindir)\msgexec.exe
+       $(RM) $(bindir)\msgfilter.exe
+       $(RM) $(bindir)\msggrep.exe
+       $(RM) $(bindir)\msginit.exe
+       $(RM) $(bindir)\msguniq.exe
+       $(RM) $(pkgdatadir)\msgunfmt.tcl
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+       $(RM) *.obj
+       $(RM) *.lib
+       $(RM) *.exp
+       $(RM) *.dll
+       $(RM) gettextsrc.res
+       $(RM) $(PROGRAMS)
+       $(RM) core
+
+distclean : clean
+
+maintainer-clean : distclean
+
+force :
index 25fbca0b03ce9c5d21e72af241d8454389945035..aed7dc78dc2b95e75763970123d8894896b1e85f 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-17  Bruno Haible  <bruno@clisp.org>
+
+       Native Woe32/MSVC support.
+       * Makefile.msvc: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-02-28  Bruno Haible  <bruno@clisp.org>
 
        Support for relocatable installation.
index a5e33a4d5abc1c4e6e30d47e18e3e4c23152cfed..0a04e722b6202b6430cb28a3dd6af51b868f407e 100644 (file)
@@ -18,6 +18,7 @@
 ## Process this file with automake to produce Makefile.in.
 
 AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
+EXTRA_DIST =
 
 TESTS = gettext-1 gettext-2 \
        msgattrib-1 msgattrib-2 msgattrib-3 msgattrib-4 msgattrib-5 \
@@ -65,7 +66,7 @@ TESTS = gettext-1 gettext-2 \
        lang-ycp lang-tcl lang-php lang-po \
        lang-rst
 
-EXTRA_DIST = $(TESTS) \
+EXTRA_DIST += $(TESTS) \
        test.mo xg-test1.ok.po mex-test2.ok msguniq-a.in msguniq-a.out \
        ChangeLog.0
 
@@ -130,3 +131,8 @@ fc4_LDADD = ../lib/libgettextlib.la $(LDADD)
 # Clean up after Solaris cc.
 clean-am:
        rm -rf SunWS_cache
+
+
+# Woe32 support.
+
+EXTRA_DIST += Makefile.msvc
diff --git a/gettext-tools/tests/Makefile.msvc b/gettext-tools/tests/Makefile.msvc
new file mode 100644 (file)
index 0000000..81ee8d8
--- /dev/null
@@ -0,0 +1,27 @@
+# -*- Makefile -*- for gettext-tools/tests
+
+#### Start of system configuration section. ####
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+all :
+
+install : all
+
+installdirs :
+
+uninstall :
+
+check :
+
+mostlyclean : clean
+
+clean : force
+
+distclean : clean
+
+maintainer-clean : distclean
+
+force :
diff --git a/gettext-tools/windows/gettextlib.exp b/gettext-tools/windows/gettextlib.exp
new file mode 100644 (file)
index 0000000..964573f
--- /dev/null
@@ -0,0 +1,79 @@
+argmatch_die
+error_message_count
+error_with_progname
+program_name
+simple_backup_suffix
+__xargmatch_internal
+addext
+argmatch
+argmatch_invalid
+argmatch_to_argument
+argmatch_valid
+c_isalnum
+c_isalpha
+c_isascii
+c_isblank
+c_iscntrl
+c_isdigit
+c_isgraph
+c_islower
+c_isprint
+c_ispunct
+c_isspace
+c_isupper
+c_isxdigit
+c_tolower
+c_toupper
+compile_java_class
+concatenated_pathname
+copy_file
+create_pipe_bidi
+create_pipe_in
+create_pipe_out
+delete_hash
+error
+error_at_line
+execute
+execute_java_class
+find_backup_file_name
+find_entry
+find_in_path
+fstrcmp
+full_write
+gcd
+get_version
+gnu_mbswidth
+init_hash
+insert_entry
+iterate_table
+locale_charset
+maybe_print_progname
+mbs_width_linebreaks
+mbsnwidth
+multiline_error
+multiline_warning
+new_classpath
+next_prime
+path_search
+reset_classpath
+safe_read
+safe_write
+set_classpath
+set_program_name
+shell_quote
+shell_quote_argv
+shell_quote_copy
+shell_quote_length
+u8_possible_linebreaks
+u8_width_linebreaks
+uc_width
+wait_subprocess
+xalloc_die
+xasprintf
+xcalloc
+xget_version
+xmalloc
+xreadlink
+xrealloc
+xsetenv
+xstrdup
diff --git a/gettext-tools/windows/gettextlib.rc b/gettext-tools/windows/gettextlib.rc
new file mode 100644 (file)
index 0000000..6a54b23
--- /dev/null
@@ -0,0 +1,37 @@
+/* Resources for gettextlib.dll */
+/* There are 4 occurrences of the version number in this file. */
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 0,12,0,0
+ PRODUCTVERSION 0,12,0,0
+ FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */
+#ifdef _DEBUG
+ FILEFLAGS 0x1L  /* VS_FF_DEBUG */
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x10004L  /* VOS_DOS_WINDOWS32 */
+ FILETYPE 0x2L  /* VFT_DLL */
+ FILESUBTYPE 0x0L  /* VFT2_UNKNOWN */
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "04090000"  /* Lang = US English, Charset = ASCII */
+        BEGIN
+            VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License. You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\0"
+            VALUE "CompanyName", "Free Software Foundation\0"
+            VALUE "FileDescription", "GPLed libgettextlib for Windows NT/2000/XP and Windows 95/98/ME\0"
+            VALUE "FileVersion", "0.12\0"
+            VALUE "InternalName", "gettextlib.dll\0"
+            VALUE "LegalCopyright", "Copyright (C) 1995-2003\0"
+            VALUE "LegalTrademarks", "\0"
+            VALUE "OriginalFilename", "gettextlib.dll\0"
+            VALUE "ProductName", "libgettextlib: subroutines for gettext-tools\0"
+            VALUE "ProductVersion", "0.12\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x0409, 0  /* US English, ASCII */
+    END
+END
diff --git a/gettext-tools/windows/gettextsrc.exp b/gettext-tools/windows/gettextsrc.exp
new file mode 100644 (file)
index 0000000..eabae6f
--- /dev/null
@@ -0,0 +1,127 @@
+allow_duplicates
+format_language
+format_language_pretty
+formatstring_awk
+formatstring_c
+formatstring_elisp
+formatstring_java
+formatstring_librep
+formatstring_lisp
+formatstring_parsers
+formatstring_pascal
+formatstring_php
+formatstring_python
+formatstring_smalltalk
+formatstring_tcl
+formatstring_ycp
+gram_max_allowed_errors
+gram_pos
+gram_pos_column
+less_than
+line_comment
+more_than
+msgcomm_mode
+omit_header
+pass_obsolete_entries
+plural_table
+plural_table_size
+po_charset_ascii
+po_charset_utf8
+po_gram_lval
+po_lex_charset
+po_lex_iconv
+po_lex_weird_cjk
+use_first
+catenate_msgdomain_list
+compare_po_locale_charsets
+convert_string
+dir_list_append
+dir_list_nth
+dir_list_restore
+dir_list_save_reset
+extract_plural_expression
+get_c99_format_directives
+iconv_message_list
+iconv_msgdomain_list
+is_ascii_message
+is_ascii_message_list
+is_ascii_string
+is_ascii_string_list
+lex_close
+lex_end
+lex_open
+lex_start
+message_alloc
+message_comment_append
+message_comment_dot_append
+message_comment_filepos
+message_copy
+message_equal
+message_free
+message_list_alloc
+message_list_append
+message_list_equal
+message_list_free
+message_list_list_alloc
+message_list_list_append
+message_list_list_append_list
+message_list_list_search
+message_list_list_search_fuzzy
+message_list_prepend
+message_list_remove_if_not
+message_list_search
+message_list_search_fuzzy
+message_page_width_ignore
+message_page_width_set
+message_print_style_escape
+message_print_style_indent
+message_print_style_uniforum
+msgdomain_alloc
+msgdomain_free
+msgdomain_list_alloc
+msgdomain_list_append
+msgdomain_list_english
+msgdomain_list_equal
+msgdomain_list_free
+msgdomain_list_print
+msgdomain_list_sort_by_filepos
+msgdomain_list_sort_by_msgid
+msgdomain_list_sublist
+open_po_file
+parse_plural_expression
+po_alloc
+po_callback_comment
+po_callback_comment_filepos
+po_callback_domain
+po_callback_message
+po_charset_ascii_compatible
+po_charset_canonicalize
+po_free
+po_gram_lex
+po_gram_parse
+po_hash
+po_is_charset_weird
+po_is_charset_weird_cjk
+po_lex_charset_close
+po_lex_charset_init
+po_lex_charset_set
+po_lex_pass_comments
+po_lex_pass_obsolete_entries
+po_parse_comment_special
+po_scan
+po_scan_file
+po_strftime
+possible_format_p
+read_names_from_file
+read_po
+read_po_file
+string_list_alloc
+string_list_append
+string_list_append_unique
+string_list_concat
+string_list_concat_destroy
+string_list_destroy
+string_list_equal
+string_list_free
+string_list_init
+string_list_member
diff --git a/gettext-tools/windows/gettextsrc.rc b/gettext-tools/windows/gettextsrc.rc
new file mode 100644 (file)
index 0000000..a5f51db
--- /dev/null
@@ -0,0 +1,37 @@
+/* Resources for gettextsrc.dll */
+/* There are 4 occurrences of the version number in this file. */
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 0,12,0,0
+ PRODUCTVERSION 0,12,0,0
+ FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */
+#ifdef _DEBUG
+ FILEFLAGS 0x1L  /* VS_FF_DEBUG */
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x10004L  /* VOS_DOS_WINDOWS32 */
+ FILETYPE 0x2L  /* VFT_DLL */
+ FILESUBTYPE 0x0L  /* VFT2_UNKNOWN */
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "04090000"  /* Lang = US English, Charset = ASCII */
+        BEGIN
+            VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License. You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\0"
+            VALUE "CompanyName", "Free Software Foundation\0"
+            VALUE "FileDescription", "GPLed libgettextsrc for Windows NT/2000/XP and Windows 95/98/ME\0"
+            VALUE "FileVersion", "0.12\0"
+            VALUE "InternalName", "gettextsrc.dll\0"
+            VALUE "LegalCopyright", "Copyright (C) 1995-2003\0"
+            VALUE "LegalTrademarks", "\0"
+            VALUE "OriginalFilename", "gettextsrc.dll\0"
+            VALUE "ProductName", "libgettextsrc: subroutines for gettext-tools\0"
+            VALUE "ProductVersion", "0.12\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x0409, 0  /* US English, ASCII */
+    END
+END