Browse Source

gettext stuff

Author: jgg
Date: 2002-10-16 05:24:02 GMT
gettext stuff
debian/1.8.y
Arch Librarian 19 years ago
parent
commit
8094845700
  1. 1
      Makefile
  2. 9
      buildlib/apti18n.h.in
  3. 6
      buildlib/defaults.mak
  4. 12
      buildlib/environment.mak.in
  5. 8
      buildlib/library.mak
  6. 3
      buildlib/program.mak
  7. 15
      configure.in
  8. 4
      methods/makefile

1
Makefile

@ -18,6 +18,7 @@ all headers library clean veryclean binary program doc dirs:
$(MAKE) -C ftparchive $@
$(MAKE) -C dselect $@
$(MAKE) -C doc $@
$(MAKE) -C po $@
# Some very common aliases
.PHONY: maintainer-clean dist-clean distclean pristine sanity

9
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 <libintl.h>
# 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

6
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

12
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@

8
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 $(<F) $@
$(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
ln -sf $(<F) $@
# The binary build rule
$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
-rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null
@ -66,4 +70,4 @@ $(OBJ)/%.opic: %.cc
The_DFiles = $(wildcard $($(LOCAL)-DEP))
ifneq ($(words $(The_DFiles)),0)
include $(The_DFiles)
endif
endif

3
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)

15
configure.in

@ -17,8 +17,10 @@ AC_CONFIG_AUX_DIR(buildlib)
AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
dnl -- SET THIS TO THE RELEASE VERSION --
AC_DEFINE_UNQUOTED(VERSION,"0.5.4")
AC_DEFINE_UNQUOTED(PACKAGE,"apt")
AC_DEFINE_UNQUOTED(VERSION,"")
PACKAGE="apt"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_SUBST(PACKAGE)
dnl Check the archs, we want the target type.
AC_CANONICAL_SYSTEM
@ -163,4 +165,13 @@ rc_GLIBC_VER
rc_LIBSTDCPP_VER
ah_GCC3DEP
dnl FIXME: There is no reason for this bit to do all the configure tests it
dnl ends up doing. Maybe replace it with a simple AC_CHECK_HEADER and
dnl AC_PATH_PROG.
ALL_LINGUAS="da de en_GB es fr hu it nl no_NO pl pt_BR ru sv zh_TW"
AM_GNU_GETTEXT
AC_DEFINE_UNQUOTED(USE_NLS, $USE_NLS)
AC_DEFINE_UNQUOTED(USE_INCLUDED_LIBINTL, $USE_INCLUDED_LIBINTL)
AC_PATH_PROG(BASH, bash)
AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make -s dirs)

4
methods/makefile

@ -6,6 +6,10 @@ SUBDIR=methods
include ../buildlib/defaults.mak
BIN := $(BIN)/methods
# FIXME..
LIB_APT_PKG_MAJOR = 3.3
DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR)
# The file method
PROGRAM=file
SLIBS = -lapt-pkg

Loading…
Cancel
Save