Home | History | Annotate | Line # | Download | only in po
Make-in revision 1.1.1.8
      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.1.1.8  christos # Copyright (C) 2003-2025 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.1.1.4  christos datadir = @datadir@
     24  1.1.1.4  christos localedir = @localedir@
     25  1.1.1.4  christos gnulocaledir = @datarootdir@/locale
     26  1.1.1.4  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.1.6  christos 	  --msgid-bugs-address=https://sourceware.org/bugzilla/ \
     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.1.8  christos install-dvi:
    117      1.1  christos install-pdf:
    118  1.1.1.8  christos install-ps:
    119      1.1  christos install-data: install-data-@USE_NLS@
    120      1.1  christos install-data-no: all
    121      1.1  christos install-data-yes: all
    122      1.1  christos 	if test -r $(MKINSTALLDIRS); then \
    123      1.1  christos 	  $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
    124      1.1  christos 	else \
    125      1.1  christos 	  $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
    126      1.1  christos 	fi
    127      1.1  christos 	@catalogs='$(CATALOGS)'; \
    128      1.1  christos 	for cat in $$catalogs; do \
    129      1.1  christos 	  cat=`basename $$cat`; \
    130      1.1  christos 	  case "$$cat" in \
    131      1.1  christos 	    *.gmo) destdir=$(gnulocaledir);; \
    132      1.1  christos 	    *)     destdir=$(localedir);; \
    133      1.1  christos 	  esac; \
    134      1.1  christos 	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
    135      1.1  christos 	  dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
    136      1.1  christos 	  if test -r $(MKINSTALLDIRS); then \
    137      1.1  christos 	    $(MKINSTALLDIRS) $$dir; \
    138      1.1  christos 	  else \
    139      1.1  christos 	    $(top_srcdir)/mkinstalldirs $$dir; \
    140      1.1  christos 	  fi; \
    141      1.1  christos 	  if test -r $$cat; then \
    142      1.1  christos 	    $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
    143      1.1  christos 	    echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
    144      1.1  christos 	  else \
    145      1.1  christos 	    $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
    146      1.1  christos 	    echo "installing $(srcdir)/$$cat as" \
    147      1.1  christos 		 "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
    148      1.1  christos 	  fi; \
    149      1.1  christos 	  if test -r $$cat.m; then \
    150      1.1  christos 	    $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
    151      1.1  christos 	    echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
    152      1.1  christos 	  else \
    153      1.1  christos 	    if test -r $(srcdir)/$$cat.m ; then \
    154      1.1  christos 	      $(INSTALL_DATA) $(srcdir)/$$cat.m \
    155      1.1  christos 		$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
    156      1.1  christos 	      echo "installing $(srcdir)/$$cat as" \
    157      1.1  christos 		   "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
    158      1.1  christos 	    else \
    159      1.1  christos 	      true; \
    160      1.1  christos 	    fi; \
    161      1.1  christos 	  fi; \
    162      1.1  christos 	done
    163      1.1  christos 	if test "$(PACKAGE)" = "gettext"; then \
    164      1.1  christos 	  if test -r $(MKINSTALLDIRS); then \
    165      1.1  christos 	    $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
    166      1.1  christos 	  else \
    167      1.1  christos 	    $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
    168      1.1  christos 	  fi; \
    169      1.1  christos 	  $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
    170      1.1  christos 			  $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
    171      1.1  christos 	else \
    172      1.1  christos 	  : ; \
    173      1.1  christos 	fi
    174      1.1  christos 
    175      1.1  christos # Define this as empty until I found a useful application.
    176      1.1  christos installcheck:
    177      1.1  christos 
    178      1.1  christos uninstall:
    179      1.1  christos 	catalogs='$(CATALOGS)'; \
    180      1.1  christos 	for cat in $$catalogs; do \
    181      1.1  christos 	  cat=`basename $$cat`; \
    182      1.1  christos 	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
    183      1.1  christos 	  rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
    184      1.1  christos 	  rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
    185      1.1  christos 	  rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
    186      1.1  christos 	  rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
    187      1.1  christos 	done
    188      1.1  christos 	rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
    189      1.1  christos 
    190      1.1  christos check: all
    191      1.1  christos 
    192      1.1  christos cat-id-tbl.o: ../intl/libgettext.h
    193      1.1  christos 
    194      1.1  christos html dvi pdf ps info tags TAGS ID:
    195      1.1  christos 
    196      1.1  christos mostlyclean:
    197      1.1  christos 	rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
    198      1.1  christos 	rm -fr *.o
    199      1.1  christos 
    200      1.1  christos clean: mostlyclean
    201      1.1  christos 
    202      1.1  christos distclean: clean
    203      1.1  christos 	rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
    204      1.1  christos 
    205      1.1  christos maintainer-clean: distclean
    206      1.1  christos 	@echo "This command is intended for maintainers to use;"
    207      1.1  christos 	@echo "it deletes files that may require special tools to rebuild."
    208      1.1  christos 	rm -f $(GMOFILES)
    209      1.1  christos 
    210      1.1  christos distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
    211      1.1  christos dist distdir: update-po $(DISTFILES)
    212      1.1  christos 	dists="$(DISTFILES)"; \
    213      1.1  christos 	for file in $$dists; do \
    214      1.1  christos 	  ln $(srcdir)/$$file $(distdir) 2> /dev/null \
    215      1.1  christos 	    || cp -p $(srcdir)/$$file $(distdir); \
    216      1.1  christos 	done
    217      1.1  christos 
    218      1.1  christos update-po: Makefile
    219      1.1  christos 	$(MAKE) $(PACKAGE).pot
    220      1.1  christos 	PATH=`pwd`/../src:$$PATH; \
    221      1.1  christos 	cd $(srcdir); \
    222      1.1  christos 	catalogs='$(CATALOGS)'; \
    223      1.1  christos 	for cat in $$catalogs; do \
    224      1.1  christos 	  cat=`basename $$cat`; \
    225      1.1  christos 	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
    226      1.1  christos 	  mv $$lang.po $$lang.old.po; \
    227      1.1  christos 	  echo "$$lang:"; \
    228      1.1  christos 	  if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
    229      1.1  christos 	    rm -f $$lang.old.po; \
    230      1.1  christos 	  else \
    231      1.1  christos 	    echo "msgmerge for $$cat failed!"; \
    232      1.1  christos 	    rm -f $$lang.po; \
    233      1.1  christos 	    mv $$lang.old.po $$lang.po; \
    234      1.1  christos 	  fi; \
    235      1.1  christos 	done
    236      1.1  christos 
    237      1.1  christos POTFILES: POTFILES.in
    238      1.1  christos 	( if test 'x$(srcdir)' != 'x.'; then \
    239      1.1  christos 	    posrcprefix='$(top_srcdir)/'; \
    240      1.1  christos 	  else \
    241      1.1  christos 	    posrcprefix="../"; \
    242      1.1  christos 	  fi; \
    243      1.1  christos 	  rm -f $@-t $@ \
    244      1.1  christos 	    && (sed -e '/^#/d' -e '/^[ 	]*$$/d' \
    245      1.1  christos 		    -e "s@.*@	$$posrcprefix& \\\\@" < $(srcdir)/$@.in \
    246      1.1  christos 		| sed -e '$$s/\\$$//') > $@-t \
    247      1.1  christos 	    && chmod a-w $@-t \
    248      1.1  christos 	    && mv $@-t $@ )
    249      1.1  christos 
    250      1.1  christos POTFILES.in: @MAINT@ ../Makefile
    251      1.1  christos 	cd .. && $(MAKE) po/POTFILES.in
    252      1.1  christos 
    253      1.1  christos Makefile: Make-in ../config.status POTFILES
    254      1.1  christos 	cd .. \
    255      1.1  christos 	  && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
    256      1.1  christos 	     CONFIG_HEADERS= $(SHELL) ./config.status
    257      1.1  christos 
    258      1.1  christos # Tell versions [3.59,3.63) of GNU make not to export all variables.
    259      1.1  christos # Otherwise a system limit (for SysV at least) may be exceeded.
    260      1.1  christos .NOEXPORT:
    261