home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / tar-1.11.8-src.tgz / tar.out / fsf / tar / po / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  4KB  |  136 lines

  1. # Makefile for translation files.
  2. # Copyright (C) 1995 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. PACKAGE = @PACKAGE@
  19. VERSION = @VERSION@
  20.  
  21. SHELL = /bin/sh
  22. @SET_MAKE@
  23.  
  24. srcdir = @srcdir@
  25. top_srcdir = @top_srcdir@
  26. VPATH = @srcdir@
  27.  
  28. prefix = @prefix@
  29. exec_prefix = @exec_prefix@
  30. datadir = $(prefix)/@DATADIRNAME@
  31. localedir = $(prefix)/share/locale
  32. subdir = po
  33.  
  34. INSTALL = @INSTALL@
  35. INSTALL_DATA = @INSTALL_DATA@
  36.  
  37. GENCAT = @GENCAT@
  38. GMSGFMT = @GMSGFMT@ 
  39. MSGFMT = @MSGFMT@ 
  40. TUPDATE = tupdate
  41. XGETTEXT = @XGETTEXT@
  42.  
  43. POFILES = de.po fr.po pt.po sv.po
  44. MOFILES = de.gmo fr.gmo pt.gmo sv.gmo
  45. DISTFILES = Makefile.in POTFILES $(PACKAGE).pot $(POFILES) $(MOFILES)
  46.  
  47. CATALOGS = @CATALOGS@
  48. CATOBJEXT = @CATOBJEXT@
  49. INSTOBJEXT = $(CATOBJEXT:.gmo=.mo)
  50. POTFILES = @POTFILES@
  51.  
  52. .SUFFIXES:
  53. .SUFFIXES: .po .pox .gmo .mo .msg .cat
  54.  
  55. .po.pox:
  56.     $(MAKE) $(PACKAGE).pot
  57.     $(TUPDATE) $(srcdir)/$(PACKAGE).pot $*.po > $*.pox
  58.  
  59. .po.mo:
  60.     $(MSGFMT) -o $@ $<
  61.  
  62. .po.gmo:
  63.     $(GMSGFMT) -o $@ $<
  64.     mv $@.mo $@
  65.     echo $@ | grep / >/dev/null || mv $@ $(srcdir)/$@
  66.  
  67. .po.msg:
  68.     sed -f ../intl/po-to-msg.sed < $(srcdir)/$*.po > $@
  69.  
  70. .msg.cat:
  71.     rm -f $@
  72.     $(GENCAT) $@ $*.msg
  73.  
  74.  
  75. all: $(CATALOGS)
  76.  
  77. $(PACKAGE).pot: $(POTFILES)
  78.     cd $(top_srcdir) && \
  79.       $(XGETTEXT) -ppo -d$(PACKAGE) -n -k -k_ `cat po/POTFILES`
  80.     cd $(srcdir) && \
  81.       if cmp -s $(PACKAGE).po $(PACKAGE).pot; then rm $(PACKAGE).po; \
  82.       else rm -f $(PACKAGE).pot; mv $(PACKAGE).po $(PACKAGE).pot; fi
  83.  
  84. install: install-exec install-data
  85. install-exec:
  86. install-data: all
  87.     for cat in $(CATALOGS); do \
  88.       lang=`echo $$cat | sed 's|.*/||' | sed 's|$(CATOBJEXT)||'`; \
  89.       dir=$(localedir)/$$lang/LC_MESSAGES; \
  90.       $(top_srcdir)/mkinstalldirs $$dir; \
  91.       if test -f $$cat; then \
  92.         $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
  93.       else \
  94.         $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
  95.       fi; \
  96.     done
  97.  
  98. uninstall:
  99.     for cat in $(CATALOGS); do \
  100.       lang=`echo $$cat | sed 's,.*/,,' | sed s'$(CATOBJEXT)$$''`; \
  101.       rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
  102.     done
  103.  
  104. TAGS:
  105.  
  106. mostlyclean:
  107.     rm -f core core.* *.pox
  108.  
  109. clean: mostlyclean
  110.  
  111. distclean: clean
  112.     rm -f Makefile *.mo *.msg *.cat
  113.  
  114. maintainer-clean: distclean
  115.     @echo "This command is intended for maintainers to use;"
  116.     @echo "it deletes files that may require special tools to rebuild."
  117.  
  118. distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
  119. dist: $(DISTFILES)
  120. #    for lang in $(CATALOGS:$(CATOBJEXT)=); do \
  121. #      mv $$lang.po $$lang.old.po; \
  122. #      $(TUPDATE) $(top_srcdir)/$(PACKAGE).pot $$lang.old.po > $$lang.po; \
  123. #      rm -f $$lang.old.po; \
  124. #    done
  125.     for file in $(DISTFILES); do \
  126.       ln $(srcdir)/$$file $(distdir) 2> /dev/null \
  127.         || cp -p $(srcdir)/$$file $(distdir); \
  128.     done
  129.  
  130. Makefile: Makefile.in ../config.status
  131.     cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  132.  
  133. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  134. # Otherwise a system limit (for SysV at least) may be exceeded.
  135. .NOEXPORT:
  136.