1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-10 21:38:50 +01:00
gnupg/po/Makefile.in.in

197 lines
5.1 KiB
Makefile
Raw Normal View History

1998-01-26 23:09:01 +01:00
# Makefile for program source directory in GNU NLS utilities package.
2002-06-29 15:46:34 +02:00
# Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
1998-01-26 23:09:01 +01:00
#
1998-09-14 17:48:36 +02:00
# This file file be copied and used freely without restrictions. It can
2002-06-29 15:46:34 +02:00
# be used in projects which are not available under the GNU General Public License
1998-02-26 17:56:31 +01:00
# 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 23:09:01 +01:00
PACKAGE = @PACKAGE@
VERSION = @VERSION@
2002-06-29 15:46:34 +02:00
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
1998-01-26 23:09:01 +01:00
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
2002-06-29 15:46:34 +02:00
datadir = @datadir@
1998-01-26 23:09:01 +01:00
localedir = $(datadir)/locale
2002-06-29 15:46:34 +02:00
gettextsrcdir = $(datadir)/gettext/po
1998-01-26 23:09:01 +01:00
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
2002-06-29 15:46:34 +02:00
MKINSTALLDIRS = @MKINSTALLDIRS@
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
1998-01-26 23:09:01 +01:00
CC = @CC@
2002-06-29 15:46:34 +02:00
GMSGFMT = @GMSGFMT@
1998-01-26 23:09:01 +01:00
MSGFMT = @MSGFMT@
2002-06-29 15:46:34 +02:00
XGETTEXT = @XGETTEXT@
MSGMERGE = msgmerge
1998-01-26 23:09:01 +01: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 \
2002-06-29 15:46:34 +02:00
$(POFILES) $(GMOFILES)
1998-01-26 23:09:01 +01:00
POTFILES = \
CATALOGS = @CATALOGS@
.SUFFIXES:
2002-06-29 15:46:34 +02:00
.SUFFIXES: .c .o .po .pox .gmo .mo
1998-01-26 23:09:01 +01:00
.c.o:
$(COMPILE) $<
.po.pox:
2002-06-29 15:46:34 +02:00
$(MAKE) $(PACKAGE).pot
1998-02-26 17:56:31 +01:00
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
1998-01-26 23:09:01 +01:00
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
2002-06-29 15:46:34 +02:00
&& rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
1998-01-26 23:09:01 +01:00
1998-02-26 17:56:31 +01:00
all: all-@USE_NLS@
2002-06-29 15:46:34 +02:00
all-yes: $(CATALOGS)
1998-02-26 17:56:31 +01:00
all-no:
1998-01-26 23:09:01 +01:00
2002-06-29 15:46:34 +02: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 23:09:01 +01:00
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
1998-09-14 17:48:36 +02:00
--files-from=$(srcdir)/POTFILES.in \
&& test ! -f $(PACKAGE).po \
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
1998-01-26 23:09:01 +01:00
install: install-exec install-data
install-exec:
1998-02-26 17:56:31 +01:00
install-data: install-data-@USE_NLS@
2002-06-29 15:46:34 +02:00
if test "$(PACKAGE)" = "gettext"; then \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
1998-02-26 17:56:31 +01:00
else \
2002-06-29 15:46:34 +02:00
: ; \
1998-02-26 17:56:31 +01:00
fi
2002-06-29 15:46:34 +02:00
install-data-no: all
install-data-yes: all
$(mkinstalldirs) $(DESTDIR)$(datadir)
1998-02-26 17:56:31 +01:00
@catalogs='$(CATALOGS)'; \
1998-01-26 23:09:01 +01:00
for cat in $$catalogs; do \
1998-02-26 17:56:31 +01:00
cat=`basename $$cat`; \
2002-06-29 15:46:34 +02:00
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
1998-01-26 23:09:01 +01:00
if test -r $$cat; then \
2002-06-29 15:46:34 +02:00
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
1998-01-26 23:09:01 +01:00
else \
2002-06-29 15:46:34 +02:00
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
1998-02-26 17:56:31 +01:00
echo "installing $(srcdir)/$$cat as" \
2002-06-29 15:46:34 +02:00
"$(DESTDIR)$$dir/$(PACKAGE).mo"; \
1998-01-26 23:09:01 +01:00
fi; \
done
1998-02-26 17:56:31 +01:00
# Define this as empty until I found a useful application.
installcheck:
1998-01-26 23:09:01 +01:00
uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
1998-02-26 17:56:31 +01:00
cat=`basename $$cat`; \
2002-06-29 15:46:34 +02:00
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
1998-01-26 23:09:01 +01:00
done
2002-06-29 15:46:34 +02:00
if test "$(PACKAGE)" = "gettext"; then \
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
1998-01-26 23:09:01 +01:00
check: all
1998-02-26 17:56:31 +01:00
dvi info tags TAGS ID:
1998-01-26 23:09:01 +01:00
mostlyclean:
2002-06-29 15:46:34 +02:00
rm -f core core.* *.pox $(PACKAGE).po *.new.po
1998-02-26 17:56:31 +01:00
rm -fr *.o
1998-01-26 23:09:01 +01:00
clean: mostlyclean
distclean: clean
2002-06-29 15:46:34 +02:00
rm -f Makefile Makefile.in POTFILES *.mo
1998-01-26 23:09:01 +01:00
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
2002-06-29 15:46:34 +02:00
rm -f $(GMOFILES)
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 17:56:31 +01:00
dists="$(DISTFILES)"; \
for file in $$dists; do \
2002-06-29 15:46:34 +02:00
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
cp -p $$dir/$$file $(distdir); \
1998-01-26 23:09:01 +01:00
done
update-po: Makefile
2002-06-29 15:46:34 +02:00
$(MAKE) $(PACKAGE).pot
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
1998-01-26 23:09:01 +01:00
cd $(srcdir); \
2002-06-29 15:46:34 +02:00
catalogs='$(GMOFILES)'; \
1998-01-26 23:09:01 +01:00
for cat in $$catalogs; do \
1998-02-26 17:56:31 +01:00
cat=`basename $$cat`; \
2002-06-29 15:46:34 +02:00
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
1998-02-26 17:56:31 +01:00
echo "$$lang:"; \
2002-06-29 15:46:34 +02:00
if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
mv -f $$lang.new.po $$lang.po; \
1998-01-26 23:09:01 +01:00
else \
1998-02-26 17:56:31 +01:00
echo "msgmerge for $$cat failed!"; \
2002-06-29 15:46:34 +02:00
rm -f $$lang.new.po; \
1998-01-26 23:09:01 +01:00
fi; \
done
2002-06-29 15:46:34 +02:00
$(MAKE) update-gmo
1998-01-26 23:09:01 +01:00
2002-06-29 15:46:34 +02:00
update-gmo: Makefile $(GMOFILES)
@:
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
cd $(top_builddir) \
1998-02-26 17:56:31 +01:00
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
1998-01-26 23:09:01 +01: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: