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