1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-24 10:39:57 +01:00
gnupg/po/Makefile.in.in

197 lines
5.1 KiB
Makefile
Raw Normal View History

1998-01-26 22:09:01 +00:00
# Makefile for program source directory in GNU NLS utilities package.
2001-05-28 12:46:28 +00:00
# Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
1998-01-26 22:09:01 +00:00
#
1998-09-14 15:48:36 +00:00
# This file file be copied and used freely without restrictions. It can
1998-02-26 16:56:31 +00:00
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
1998-01-26 22:09:01 +00:00
PACKAGE = @PACKAGE@
VERSION = @VERSION@
2001-05-28 12:46:28 +00:00
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
1998-01-26 22:09:01 +00:00
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
2001-05-28 12:46:28 +00:00
datadir = @datadir@
1998-01-26 22:09:01 +00:00
localedir = $(datadir)/locale
2001-05-28 12:46:28 +00:00
gettextsrcdir = $(datadir)/gettext/po
1998-01-26 22:09:01 +00:00
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
2001-05-28 12:46:28 +00:00
MKINSTALLDIRS = @MKINSTALLDIRS@
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
1998-01-26 22:09:01 +00:00
CC = @CC@
2001-05-28 12:46:28 +00:00
GMSGFMT = @GMSGFMT@
1998-01-26 22:09:01 +00:00
MSGFMT = @MSGFMT@
2001-05-28 12:46:28 +00:00
XGETTEXT = @XGETTEXT@
MSGMERGE = msgmerge
1998-01-26 22:09:01 +00:00
DEFS = @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
INCLUDES = -I.. -I$(top_srcdir)/intl
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
2001-05-28 12:46:28 +00:00
$(POFILES) $(GMOFILES)
1998-01-26 22:09:01 +00:00
POTFILES = \
CATALOGS = @CATALOGS@
.SUFFIXES:
2001-05-28 12:46:28 +00:00
.SUFFIXES: .c .o .po .pox .gmo .mo
1998-01-26 22:09:01 +00:00
.c.o:
$(COMPILE) $<
.po.pox:
$(MAKE) $(PACKAGE).pot
1998-02-26 16:56:31 +00:00
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
1998-01-26 22:09:01 +00:00
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
2001-05-28 12:46:28 +00:00
&& rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
1998-01-26 22:09:01 +00:00
1998-02-26 16:56:31 +00:00
all: all-@USE_NLS@
2001-05-28 12:46:28 +00:00
all-yes: $(CATALOGS)
1998-02-26 16:56:31 +00:00
all-no:
1998-01-26 22:09:01 +00:00
2001-05-28 12:46:28 +00:00
# Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
1998-01-26 22:09:01 +00:00
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
1998-09-14 15:48:36 +00:00
--files-from=$(srcdir)/POTFILES.in \
&& test ! -f $(PACKAGE).po \
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
1998-01-26 22:09:01 +00:00
install: install-exec install-data
install-exec:
1998-02-26 16:56:31 +00:00
install-data: install-data-@USE_NLS@
2001-05-28 12:46:28 +00:00
if test "$(PACKAGE)" = "gettext"; then \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
1998-02-26 16:56:31 +00:00
else \
2001-05-28 12:46:28 +00:00
: ; \
1998-02-26 16:56:31 +00:00
fi
2001-05-28 12:46:28 +00:00
install-data-no: all
install-data-yes: all
$(mkinstalldirs) $(DESTDIR)$(datadir)
1998-02-26 16:56:31 +00:00
@catalogs='$(CATALOGS)'; \
1998-01-26 22:09:01 +00:00
for cat in $$catalogs; do \
1998-02-26 16:56:31 +00:00
cat=`basename $$cat`; \
2001-05-28 12:46:28 +00:00
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
1998-01-26 22:09:01 +00:00
if test -r $$cat; then \
2001-05-28 12:46:28 +00:00
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
1998-01-26 22:09:01 +00:00
else \
2001-05-28 12:46:28 +00:00
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
1998-02-26 16:56:31 +00:00
echo "installing $(srcdir)/$$cat as" \
2001-05-28 12:46:28 +00:00
"$(DESTDIR)$$dir/$(PACKAGE).mo"; \
1998-01-26 22:09:01 +00:00
fi; \
done
1998-02-26 16:56:31 +00:00
# Define this as empty until I found a useful application.
installcheck:
1998-01-26 22:09:01 +00:00
uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
1998-02-26 16:56:31 +00:00
cat=`basename $$cat`; \
2001-05-28 12:46:28 +00:00
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
1998-01-26 22:09:01 +00:00
done
2001-05-28 12:46:28 +00:00
if test "$(PACKAGE)" = "gettext"; then \
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
1998-01-26 22:09:01 +00:00
check: all
1998-02-26 16:56:31 +00:00
dvi info tags TAGS ID:
1998-01-26 22:09:01 +00:00
mostlyclean:
2001-05-28 12:46:28 +00:00
rm -f core core.* *.pox $(PACKAGE).po *.new.po
1998-02-26 16:56:31 +00:00
rm -fr *.o
1998-01-26 22:09:01 +00:00
clean: mostlyclean
distclean: clean
2001-05-28 12:46:28 +00:00
rm -f Makefile Makefile.in POTFILES *.mo
1998-01-26 22:09:01 +00:00
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
1998-02-26 16:56:31 +00:00
rm -f $(GMOFILES)
2001-05-28 12:46:28 +00:00
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
$(MAKE) update-po
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: $(DISTFILES)
1998-02-26 16:56:31 +00:00
dists="$(DISTFILES)"; \
for file in $$dists; do \
2001-05-28 12:46:28 +00:00
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
cp -p $$dir/$$file $(distdir); \
1998-01-26 22:09:01 +00:00
done
update-po: Makefile
$(MAKE) $(PACKAGE).pot
2001-05-28 12:46:28 +00:00
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
1998-01-26 22:09:01 +00:00
cd $(srcdir); \
2001-05-28 12:46:28 +00:00
catalogs='$(GMOFILES)'; \
1998-01-26 22:09:01 +00:00
for cat in $$catalogs; do \
1998-02-26 16:56:31 +00:00
cat=`basename $$cat`; \
2001-05-28 12:46:28 +00:00
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
1998-02-26 16:56:31 +00:00
echo "$$lang:"; \
2001-05-28 12:46:28 +00:00
if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
mv -f $$lang.new.po $$lang.po; \
1998-01-26 22:09:01 +00:00
else \
1998-02-26 16:56:31 +00:00
echo "msgmerge for $$cat failed!"; \
2001-05-28 12:46:28 +00:00
rm -f $$lang.new.po; \
1998-01-26 22:09:01 +00:00
fi; \
done
2001-05-28 12:46:28 +00:00
$(MAKE) update-gmo
1998-01-26 22:09:01 +00:00
2001-05-28 12:46:28 +00:00
update-gmo: Makefile $(GMOFILES)
@:
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
cd $(top_builddir) \
1998-02-26 16:56:31 +00:00
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
1998-01-26 22:09:01 +00:00
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: