Search
lxdream.org :: lxdream/po/Makefile.in.in
lxdream 0.9.1
released Jun 29
Download Now
filename po/Makefile.in.in
changeset 10:c898b37506e0
prev1:eea311cfd33e
author nkeynes
date Thu Apr 17 11:01:29 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Add spanish and italian translations (contributed by segnini75 and ghost22 respectively)
view annotate diff log raw
     1 # Makefile for program source directory in GNU NLS utilities package.
     2 # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
     3 #
     4 # This file file be copied and used freely without restrictions.  It can
     5 # be used in projects which are not available under the GNU Public License
     6 # but which still want to provide support for the GNU gettext functionality.
     7 # Please note that the actual code is *not* freely available.
     8 #
     9 # - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
    10 #   instead of PACKAGE and to look for po2tbl in ./ not in intl/
    11 #
    12 # - Modified by jacob berkman <jacob@ximian.com> to install
    13 #   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
    15 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
    16 PACKAGE = @PACKAGE@
    17 VERSION = @VERSION@
    19 SHELL = /bin/sh
    20 @SET_MAKE@
    22 srcdir = @srcdir@
    23 top_srcdir = @top_srcdir@
    24 VPATH = @srcdir@
    26 prefix = @prefix@
    27 exec_prefix = @exec_prefix@
    28 datadir = @datadir@
    29 libdir = @libdir@
    30 localedir = $(libdir)/locale
    31 gnulocaledir = $(datadir)/locale
    32 gettextsrcdir = $(datadir)/glib-2.0/gettext/po
    33 subdir = po
    35 INSTALL = @INSTALL@
    36 INSTALL_DATA = @INSTALL_DATA@
    37 MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
    39 CC = @CC@
    40 GENCAT = @GENCAT@
    41 GMSGFMT = @GMSGFMT@
    42 MSGFMT = @MSGFMT@
    43 XGETTEXT = @XGETTEXT@
    44 MSGMERGE = msgmerge
    46 DEFS = @DEFS@
    47 CFLAGS = @CFLAGS@
    48 CPPFLAGS = @CPPFLAGS@
    50 INCLUDES = -I.. -I$(top_srcdir)/intl
    52 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
    54 SOURCES = 
    55 POFILES = @POFILES@
    56 GMOFILES = @GMOFILES@
    57 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
    58 $(POFILES) $(GMOFILES) $(SOURCES)
    60 POTFILES = \
    62 CATALOGS = @CATALOGS@
    63 CATOBJEXT = @CATOBJEXT@
    64 INSTOBJEXT = @INSTOBJEXT@
    66 .SUFFIXES:
    67 .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
    69 .c.o:
    70 	$(COMPILE) $<
    72 .po.pox:
    73 	$(MAKE) $(GETTEXT_PACKAGE).pot
    74 	$(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox
    76 .po.mo:
    77 	$(MSGFMT) -o $@ $<
    79 .po.gmo:
    80 	file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
    81 	  && rm -f $$file && $(GMSGFMT) -c -o $$file $<
    83 .po.cat:
    84 	sed -f ../intl/po2msg.sed < $< > $*.msg \
    85 	  && rm -f $@ && $(GENCAT) $@ $*.msg
    88 all: all-@USE_NLS@
    90 all-yes: $(CATALOGS)
    91 all-no:
    93 $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
    94 	$(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
    95 	  --add-comments --keyword=_ --keyword=N_ \
    96           --flag=g_strdup_printf:1:c-format \
    97           --flag=g_string_printf:2:c-format \
    98           --flag=g_string_append_printf:2:c-format \
    99           --flag=g_error_new:3:c-format \
   100           --flag=g_set_error:4:c-format \
   101           --flag=g_markup_printf_escaped:1:c-format \
   102           --flag=g_log:3:c-format \
   103           --flag=g_print:1:c-format \
   104           --flag=g_printerr:1:c-format \
   105           --flag=g_printf:1:c-format \
   106           --flag=g_fprintf:2:c-format \
   107           --flag=g_sprintf:2:c-format \
   108           --flag=g_snprintf:3:c-format \
   109           --flag=g_scanner_error:2:c-format \
   110           --flag=g_scanner_warn:2:c-format \
   111 	  --files-from=$(srcdir)/POTFILES.in \
   112 	&& test ! -f $(GETTEXT_PACKAGE).po \
   113 	   || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
   114 		&& mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
   116 install: install-exec install-data
   117 install-exec:
   118 install-data: install-data-@USE_NLS@
   119 install-data-no: all
   120 install-data-yes: all
   121 	if test -r "$(MKINSTALLDIRS)"; then \
   122 	  $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
   123 	else \
   124 	  $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
   125 	fi
   126 	@catalogs='$(CATALOGS)'; \
   127 	for cat in $$catalogs; do \
   128 	  cat=`basename $$cat`; \
   129 	  case "$$cat" in \
   130 	    *.gmo) destdir=$(gnulocaledir);; \
   131 	    *)     destdir=$(localedir);; \
   132 	  esac; \
   133 	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
   134 	  dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
   135 	  if test -r "$(MKINSTALLDIRS)"; then \
   136 	    $(MKINSTALLDIRS) $$dir; \
   137 	  else \
   138 	    $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
   139 	  fi; \
   140 	  if test -r $$cat; then \
   141 	    $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
   142 	    echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
   143 	  else \
   144 	    $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
   145 	    echo "installing $(srcdir)/$$cat as" \
   146 		 "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
   147 	  fi; \
   148 	  if test -r $$cat.m; then \
   149 	    $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
   150 	    echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
   151 	  else \
   152 	    if test -r $(srcdir)/$$cat.m ; then \
   153 	      $(INSTALL_DATA) $(srcdir)/$$cat.m \
   154 		$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
   155 	      echo "installing $(srcdir)/$$cat as" \
   156 		   "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
   157 	    else \
   158 	      true; \
   159 	    fi; \
   160 	  fi; \
   161 	done
   162 	if test "$(PACKAGE)" = "glib"; then \
   163 	  if test -r "$(MKINSTALLDIRS)"; then \
   164 	    $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
   165 	  else \
   166 	    $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
   167 	  fi; \
   168 	  $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
   169 			  $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
   170 	else \
   171 	  : ; \
   172 	fi
   174 # Define this as empty until I found a useful application.
   175 installcheck:
   177 uninstall:
   178 	catalogs='$(CATALOGS)'; \
   179 	for cat in $$catalogs; do \
   180 	  cat=`basename $$cat`; \
   181 	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
   182 	  rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
   183 	  rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
   184 	  rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
   185 	  rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
   186 	done
   187 	if test "$(PACKAGE)" = "glib"; then \
   188 	  rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
   189 	fi
   191 check: all
   193 dvi info tags TAGS ID:
   195 mostlyclean:
   196 	rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
   197 	rm -fr *.o
   199 clean: mostlyclean
   201 distclean: clean
   202 	rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
   204 maintainer-clean: distclean
   205 	@echo "This command is intended for maintainers to use;"
   206 	@echo "it deletes files that may require special tools to rebuild."
   207 	rm -f $(GMOFILES)
   209 distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
   210 dist distdir: update-po $(DISTFILES)
   211 	dists="$(DISTFILES)"; \
   212 	for file in $$dists; do \
   213 	  ln $(srcdir)/$$file $(distdir) 2> /dev/null \
   214 	    || cp -p $(srcdir)/$$file $(distdir); \
   215 	done
   217 update-po: Makefile
   218 	$(MAKE) $(GETTEXT_PACKAGE).pot
   219 	tmpdir=`pwd`; \
   220 	cd $(srcdir); \
   221 	catalogs='$(CATALOGS)'; \
   222 	for cat in $$catalogs; do \
   223 	  cat=`basename $$cat`; \
   224 	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
   225 	  echo "$$lang:"; \
   226 	  if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \
   227 	    if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
   228 	      rm -f $$tmpdir/$$lang.new.po; \
   229             else \
   230 	      if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
   231 	        :; \
   232 	      else \
   233 	        echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
   234 	        rm -f $$tmpdir/$$lang.new.po; \
   235 	        exit 1; \
   236 	      fi; \
   237 	    fi; \
   238 	  else \
   239 	    echo "msgmerge for $$cat failed!"; \
   240 	    rm -f $$tmpdir/$$lang.new.po; \
   241 	  fi; \
   242 	done
   244 # POTFILES is created from POTFILES.in by stripping comments, empty lines
   245 # and Intltool tags (enclosed in square brackets), and appending a full
   246 # relative path to them
   247 POTFILES: POTFILES.in
   248 	( if test 'x$(srcdir)' != 'x.'; then \
   249 	    posrcprefix='$(top_srcdir)/'; \
   250 	  else \
   251 	    posrcprefix="../"; \
   252 	  fi; \
   253 	  rm -f $@-t $@ \
   254 	    && (sed -e '/^#/d' 						\
   255 		    -e "s/^\[.*\] +//" 					\
   256 		    -e '/^[ 	]*$$/d' 				\
   257 		    -e "s@.*@	$$posrcprefix& \\\\@" < $(srcdir)/$@.in	\
   258 		| sed -e '$$s/\\$$//') > $@-t \
   259 	    && chmod a-w $@-t \
   260 	    && mv $@-t $@ )
   262 Makefile: Makefile.in.in ../config.status POTFILES
   263 	cd .. \
   264 	  && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
   265 	       $(SHELL) ./config.status
   267 # Tell versions [3.59,3.63) of GNU make not to export all variables.
   268 # Otherwise a system limit (for SysV at least) may be exceeded.
   269 .NOEXPORT:
.