1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00
gnupg/po/Makefile.in.in

249 lines
6.7 KiB
Makefile
Raw Normal View History

1998-01-26 22:09:01 +00:00
# Makefile for program source directory in GNU NLS utilities package.
1998-02-26 16:56:31 +00:00
# Copyright (C) 1995, 1996, 1997 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@
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = $(prefix)/@DATADIRNAME@
localedir = $(datadir)/locale
gnulocaledir = $(prefix)/share/locale
1998-02-26 16:56:31 +00:00
gettextsrcdir = $(prefix)/share/gettext/po
1998-01-26 22:09:01 +00:00
subdir = po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
1998-01-26 22:09:01 +00:00
CC = @CC@
GENCAT = @GENCAT@
1998-02-26 16:56:31 +00:00
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
1998-01-26 22:09:01 +00:00
MSGFMT = @MSGFMT@
1998-02-26 16:56:31 +00:00
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
MSGMERGE = PATH=../src:$$PATH 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)
SOURCES = cat-id-tbl.c
1998-01-26 22:09:01 +00:00
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
1998-02-26 16:56:31 +00:00
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
1998-01-26 22:09:01 +00:00
POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
INSTOBJEXT = @INSTOBJEXT@
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
.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 \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && $(GENCAT) $@ $*.msg
1998-02-26 16:56:31 +00:00
all: all-@USE_NLS@
all-yes: cat-id-tbl.c $(CATALOGS)
all-no:
1998-01-26 22:09:01 +00:00
1998-02-26 16:56:31 +00:00
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
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
1998-02-26 16:56:31 +00:00
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
rm -f cat-id-tbl.tmp
1998-01-26 22:09:01 +00:00
sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
1998-02-26 16:56:31 +00:00
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
rm cat-id-tbl.tmp; \
1998-01-26 22:09:01 +00:00
else \
echo cat-id-tbl.c changed; \
rm -f $(srcdir)/cat-id-tbl.c; \
1998-02-26 16:56:31 +00:00
mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
1998-01-26 22:09:01 +00:00
fi
cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
install: install-exec install-data
install-exec:
1998-02-26 16:56:31 +00:00
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
1998-09-14 15:48:36 +00:00
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(datadir); \
1998-02-26 16:56:31 +00:00
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
1998-02-26 16:56:31 +00:00
fi
@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`; \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
1998-02-26 16:56:31 +00:00
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$$destdir/$$lang/LC_MESSAGES; \
1998-09-14 15:48:36 +00:00
if test -r "$(MKINSTALLDIRS)"; then \
1998-02-26 16:56:31 +00:00
$(MKINSTALLDIRS) $$dir; \
1998-01-26 22:09:01 +00:00
else \
1998-09-14 15:48:36 +00:00
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
1998-01-26 22:09:01 +00:00
fi; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
1998-02-26 16:56:31 +00:00
echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
1998-01-26 22:09:01 +00:00
else \
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
1998-02-26 16:56:31 +00:00
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
fi; \
if test -r $$cat.m; then \
$(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
true; \
fi; \
1998-01-26 22:09:01 +00:00
fi; \
done
1998-02-26 16:56:31 +00:00
if test "$(PACKAGE)" = "gettext"; then \
1998-09-14 15:48:36 +00:00
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(gettextsrcdir); \
1998-02-26 16:56:31 +00:00
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
1998-02-26 16:56:31 +00:00
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(gettextsrcdir)/Makefile.in.in; \
1998-02-26 16:56:31 +00:00
else \
: ; \
fi
1998-01-26 22:09:01 +00:00
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`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
1998-01-26 22:09:01 +00:00
done
rm -f $(gettextsrcdir)/po-Makefile.in.in
1998-01-26 22:09:01 +00:00
check: all
cat-id-tbl.o: ../intl/libgettext.h
1998-02-26 16:56:31 +00:00
dvi info tags TAGS ID:
1998-01-26 22:09:01 +00:00
mostlyclean:
1998-02-26 16:56:31 +00:00
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
rm -fr *.o
1998-01-26 22:09:01 +00:00
clean: mostlyclean
distclean: clean
1998-02-26 16:56:31 +00:00
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
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)
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: update-po $(DISTFILES)
dists="$(DISTFILES)"; \
for file in $$dists; do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
1998-01-26 22:09:01 +00:00
done
update-po: Makefile
$(MAKE) $(PACKAGE).pot
1998-02-26 16:56:31 +00:00
PATH=`pwd`/../src:$$PATH; \
1998-01-26 22:09:01 +00:00
cd $(srcdir); \
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
1998-02-26 16:56:31 +00:00
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
1998-01-26 22:09:01 +00:00
mv $$lang.po $$lang.old.po; \
1998-02-26 16:56:31 +00:00
echo "$$lang:"; \
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
1998-01-26 22:09:01 +00:00
rm -f $$lang.old.po; \
else \
1998-02-26 16:56:31 +00:00
echo "msgmerge for $$cat failed!"; \
1998-01-26 22:09:01 +00:00
rm -f $$lang.po; \
mv $$lang.old.po $$lang.po; \
fi; \
done
POTFILES: POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
posrcprefix="../"; \
fi; \
1998-02-26 16:56:31 +00:00
rm -f $@-t $@ \
&& (sed -e '/^#/d' -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
1998-02-26 16:56:31 +00:00
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
1998-01-26 22:09:01 +00:00
Makefile: Makefile.in.in ../config.status POTFILES
1998-02-26 16:56:31 +00:00
cd .. \
&& 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: