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