From 809484570008da67b0dcd291af7673481fff52f6 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:59:33 +0000 Subject: gettext stuff Author: jgg Date: 2002-10-16 05:24:02 GMT gettext stuff --- buildlib/apti18n.h.in | 9 ++++++--- buildlib/defaults.mak | 6 +++++- buildlib/environment.mak.in | 12 ++++++++++++ buildlib/library.mak | 8 ++++++-- buildlib/program.mak | 3 +++ 5 files changed, 32 insertions(+), 6 deletions(-) (limited to 'buildlib') diff --git a/buildlib/apti18n.h.in b/buildlib/apti18n.h.in index 49c5b0cd4..9bdd6bbca 100644 --- a/buildlib/apti18n.h.in +++ b/buildlib/apti18n.h.in @@ -1,5 +1,5 @@ // -*- mode: cpp; mode: fold -*- -// $Id: apti18n.h.in,v 1.3 2002/01/09 04:16:33 jgg Exp $ +// $Id: apti18n.h.in,v 1.4 2002/10/16 05:24:02 jgg Exp $ /* Internationalization macros for apt. This header should be included last in each C file. */ @@ -10,10 +10,13 @@ #if USE_NLS==yes && USE_INCLUDED_LIBINTL==no // apt will use the gettext implementation of the C library # include -# define _(x) gettext(x) +# ifdef DOMAIN +# define _(x) dgettext(DOMAIN,x) +# else +# define _(x) gettext(x) +# endif #else // apt will not use any gettext # define setlocale(a, b) -# define textdomain(a) # define _(x) x #endif diff --git a/buildlib/defaults.mak b/buildlib/defaults.mak index 3ecf4ba27..4d05e5eaf 100644 --- a/buildlib/defaults.mak +++ b/buildlib/defaults.mak @@ -70,6 +70,9 @@ LIB := $(BIN) OBJ := $(BUILD)/obj/$(SUBDIR) DEP := $(OBJ) DOC := $(BUILD)/docs +PO := $(BUILD)/po +LOCALE := $(BUILD)/locale +PO_DOMAINS := $(BUILD)/po/domains # Module types LIBRARY_H = $(BASE)/buildlib/library.mak @@ -81,6 +84,7 @@ COPY_H = $(BASE)/buildlib/copy.mak YODL_MANPAGE_H = $(BASE)/buildlib/yodl_manpage.mak SGML_MANPAGE_H = $(BASE)/buildlib/sgml_manpage.mak FAIL_H = $(BASE)/buildlib/fail.mak +PODOMAIN_H = $(BASE)/buildlib/podomain.mak include $(BUILD)/environment.mak @@ -109,7 +113,7 @@ CPPFLAGS+= -I$(INCLUDE) LDFLAGS+= -L$(LIB) # Directors to create -MKDIRS := $(BIN) +MKDIRS := $(BIN) # Phony rules. Other things hook these by appending to the dependency # list diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in index eab60c1bc..bf676e643 100644 --- a/buildlib/environment.mak.in +++ b/buildlib/environment.mak.in @@ -1,6 +1,8 @@ # This file contains everything that autoconf guessed for your system. # if you want you can edit it, just don't re-run configure. +PACKAGE = @PACKAGE@ + # C++ compiler options CC = @CC@ CPPFLAGS+= @CPPFLAGS@ @DEFS@ -D_REENTRANT @@ -31,6 +33,16 @@ NSGMLS = @NSGMLS@ SGMLSPL = @SGMLSPL@ DOCBOOK2MAN := $(wildcard /usr/lib/perl5/sgmlspl-specs/docbook2man-spec.pl) +# Gettext settings +GMSGFMT = @GMSGFMT@ +XGETTEXT = @XGETTEXT@ +MSGCOMM:=$(dir $(XGETTEXT))/msgcomm +MSGMERGE:=$(dir $(XGETTEXT))/msgmerge +CATALOGS = @CATALOGS@ +USE_NLS = @USE_NLS@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +BASH = @BASH@ + # Various library checks PTHREADLIB = @PTHREADLIB@ PYTHONLIB = @PYTHONLIB@ diff --git a/buildlib/library.mak b/buildlib/library.mak index fb944cfbc..9f8b78541 100644 --- a/buildlib/library.mak +++ b/buildlib/library.mak @@ -8,6 +8,7 @@ # $(LIBRARY) - The name of the library without lib or .so # $(MAJOR) - The major version number of this library # $(MINOR) - The minor version number of this library +# $(DOMAIN) - The text domain for this library # All output is writtin to .opic files in the build directory to # signify the PIC output. @@ -23,6 +24,9 @@ $(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) $(LOCAL)-SLIBS := $(SLIBS) $(LOCAL)-LIBRARY := $(LIBRARY) +TYPE = src +include $(PODOMAIN_H) + # Install the command hooks headers: $($(LOCAL)-HEADERS) library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) @@ -45,7 +49,7 @@ $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MA ln -sf $( /dev/null @@ -66,4 +70,4 @@ $(OBJ)/%.opic: %.cc The_DFiles = $(wildcard $($(LOCAL)-DEP)) ifneq ($(words $(The_DFiles)),0) include $(The_DFiles) -endif +endif diff --git a/buildlib/program.mak b/buildlib/program.mak index a89dc5ea1..e0e76316c 100644 --- a/buildlib/program.mak +++ b/buildlib/program.mak @@ -24,6 +24,9 @@ program: $(BIN)/$(PROGRAM) clean: clean/$(LOCAL) veryclean: veryclean/$(LOCAL) +TYPE = src +include $(PODOMAIN_H) + # Make Directories MKDIRS += $(OBJ) $(DEP) $(BIN) -- cgit v1.2.3