Home | History | Annotate | Line # | Download | only in intl
      1  1.1  christos # Makefile for directory with message catalog handling in GNU NLS Utilities.
      2  1.1  christos # Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
      3  1.1  christos #
      4  1.1  christos # This program is free software; you can redistribute it and/or modify it
      5  1.1  christos # under the terms of the GNU Library General Public License as published
      6  1.1  christos # by the Free Software Foundation; either version 2, or (at your option)
      7  1.1  christos # any later version.
      8  1.1  christos #
      9  1.1  christos # This program is distributed in the hope that it will be useful,
     10  1.1  christos # but WITHOUT ANY WARRANTY; without even the implied warranty of
     11  1.1  christos # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12  1.1  christos # Library General Public License for more details.
     13  1.1  christos #
     14  1.1  christos # You should have received a copy of the GNU Library General Public
     15  1.1  christos # License along with this program; if not, write to the Free Software
     16  1.1  christos # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
     17  1.1  christos # USA.
     18  1.1  christos 
     19  1.1  christos PACKAGE = grep
     20  1.1  christos VERSION = 2.5.1
     21  1.1  christos 
     22  1.1  christos SHELL = /bin/sh
     23  1.1  christos 
     24  1.1  christos srcdir = .
     25  1.1  christos top_srcdir = ..
     26  1.1  christos top_builddir = ..
     27  1.1  christos 
     28  1.1  christos 
     29  1.1  christos prefix = /usr/local
     30  1.1  christos exec_prefix = ${prefix}
     31  1.1  christos transform = s,x,x,
     32  1.1  christos libdir = ${exec_prefix}/lib
     33  1.1  christos includedir = ${prefix}/include
     34  1.1  christos datadir = ${prefix}/share
     35  1.1  christos localedir = $(datadir)/locale
     36  1.1  christos gettextsrcdir = $(datadir)/gettext/intl
     37  1.1  christos aliaspath = $(localedir)
     38  1.1  christos subdir = intl
     39  1.1  christos 
     40  1.1  christos INSTALL = /usr/bin/install -c
     41  1.1  christos INSTALL_DATA = ${INSTALL} -m 644
     42  1.1  christos MKINSTALLDIRS = ./mkinstalldirs
     43  1.1  christos mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
     44  1.1  christos 
     45  1.1  christos l = 
     46  1.1  christos 
     47  1.1  christos AR = ar
     48  1.1  christos CC = gcc
     49  1.1  christos LIBTOOL = @LIBTOOL@
     50  1.1  christos RANLIB = ranlib
     51  1.1  christos YACC = bison -y -d
     52  1.1  christos YFLAGS = --name-prefix=__gettext
     53  1.1  christos 
     54  1.1  christos DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
     55  1.1  christos -DLIBDIR=\"$(libdir)\" -DIN_LIBINTL -DHAVE_CONFIG_H
     56  1.1  christos CPPFLAGS = 
     57  1.1  christos CFLAGS = -g -O2 -I/usr/include/pcre
     58  1.1  christos LDFLAGS = 
     59  1.1  christos 
     60  1.1  christos COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
     61  1.1  christos 
     62  1.1  christos HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h
     63  1.1  christos COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h
     64  1.1  christos SOURCES = $(COMSRCS) intl-compat.c
     65  1.1  christos COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
     66  1.1  christos finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
     67  1.1  christos explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
     68  1.1  christos plural-exp.c localcharset.c localename.c osdep.c os2compat.c
     69  1.1  christos OBJECTS =  bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
     70  1.1  christos finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
     71  1.1  christos explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
     72  1.1  christos plural.$lo plural-exp.$lo localcharset.$lo localename.$lo osdep.$lo
     73  1.1  christos GETTOBJS = intl-compat.$lo
     74  1.1  christos DISTFILES.common = Makefile.in \
     75  1.1  christos config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
     76  1.1  christos DISTFILES.generated = plural.c
     77  1.1  christos DISTFILES.normal = VERSION
     78  1.1  christos DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc
     79  1.1  christos DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
     80  1.1  christos COPYING.LIB-2 gettext.h libgettext.h plural-eval.c
     81  1.1  christos 
     82  1.1  christos # Libtool's library version information for libintl.
     83  1.1  christos # Before making a gettext release, the gettext maintainer must change this
     84  1.1  christos # according to the libtool documentation, section "Library interface versions".
     85  1.1  christos # Maintainers of other packages that include the intl directory must *not*
     86  1.1  christos # change these values.
     87  1.1  christos LTV_CURRENT=2
     88  1.1  christos LTV_REVISION=0
     89  1.1  christos LTV_AGE=0
     90  1.1  christos 
     91  1.1  christos .SUFFIXES:
     92  1.1  christos .SUFFIXES: .c .y .o .lo .sin .sed
     93  1.1  christos .c.o:
     94  1.1  christos 	$(COMPILE) $<
     95  1.1  christos .c.lo:
     96  1.1  christos 	$(LIBTOOL) --mode=compile $(COMPILE) $<
     97  1.1  christos 
     98  1.1  christos .y.c:
     99  1.1  christos 	$(YACC) $(YFLAGS) --output $@ $<
    100  1.1  christos 	rm -f $*.h
    101  1.1  christos 
    102  1.1  christos .sin.sed:
    103  1.1  christos 	sed -e '/^#/d' -e 's/@''PACKAGE''@/grep/g' $< > t-$@
    104  1.1  christos 	mv t-$@ $@
    105  1.1  christos 
    106  1.1  christos INCLUDES = -I.. -I. -I$(top_srcdir)/intl
    107  1.1  christos 
    108  1.1  christos all: all-no
    109  1.1  christos all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
    110  1.1  christos all-no: all-no-no
    111  1.1  christos all-no-yes: libgnuintl.$la
    112  1.1  christos all-no-no:
    113  1.1  christos 
    114  1.1  christos libintl.a libgnuintl.a: $(OBJECTS)
    115  1.1  christos 	rm -f $@
    116  1.1  christos 	$(AR) cru $@ $(OBJECTS)
    117  1.1  christos 	$(RANLIB) $@
    118  1.1  christos 
    119  1.1  christos libintl.la libgnuintl.la: $(OBJECTS)
    120  1.1  christos 	$(LIBTOOL) --mode=link \
    121  1.1  christos 	  $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
    122  1.1  christos 	  $(OBJECTS) @LTLIBICONV@ -lc \
    123  1.1  christos 	  -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
    124  1.1  christos 	  -rpath $(libdir) \
    125  1.1  christos 	  -no-undefined
    126  1.1  christos 
    127  1.1  christos libintl.h: libgnuintl.h
    128  1.1  christos 	cp $(srcdir)/libgnuintl.h libintl.h
    129  1.1  christos 
    130  1.1  christos charset.alias: config.charset
    131  1.1  christos 	$(SHELL) $(srcdir)/config.charset 'i686-pc-linux-gnu' > t-$@
    132  1.1  christos 	mv t-$@ $@
    133  1.1  christos 
    134  1.1  christos check: all
    135  1.1  christos 
    136  1.1  christos # This installation goal is only used in GNU gettext.  Packages which
    137  1.1  christos # only use the library should use install instead.
    138  1.1  christos 
    139  1.1  christos # We must not install the libintl.h/libintl.a files if we are on a
    140  1.1  christos # system which has the GNU gettext() function in its C library or in a
    141  1.1  christos # separate library.
    142  1.1  christos # If you want to use the one which comes with this version of the
    143  1.1  christos # package, you have to use `configure --with-included-gettext'.
    144  1.1  christos install: install-exec install-data
    145  1.1  christos install-exec: all
    146  1.1  christos 	if test "$(PACKAGE)" = "gettext" \
    147  1.1  christos 	   && test '' = '$(GETTOBJS)'; then \
    148  1.1  christos 	  $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
    149  1.1  christos 	  $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
    150  1.1  christos 	  $(LIBTOOL) --mode=install \
    151  1.1  christos 	    $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
    152  1.1  christos 	else \
    153  1.1  christos 	  : ; \
    154  1.1  christos 	fi
    155  1.1  christos 	if test 'no' = yes; then \
    156  1.1  christos 	  test yes != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
    157  1.1  christos 	  temp=$(DESTDIR)$(libdir)/t-charset.alias; \
    158  1.1  christos 	  dest=$(DESTDIR)$(libdir)/charset.alias; \
    159  1.1  christos 	  if test -f $(DESTDIR)$(libdir)/charset.alias; then \
    160  1.1  christos 	    orig=$(DESTDIR)$(libdir)/charset.alias; \
    161  1.1  christos 	    sed -f ref-add.sed $$orig > $$temp; \
    162  1.1  christos 	    $(INSTALL_DATA) $$temp $$dest; \
    163  1.1  christos 	    rm -f $$temp; \
    164  1.1  christos 	  else \
    165  1.1  christos 	    if test yes = no; then \
    166  1.1  christos 	      orig=charset.alias; \
    167  1.1  christos 	      sed -f ref-add.sed $$orig > $$temp; \
    168  1.1  christos 	      $(INSTALL_DATA) $$temp $$dest; \
    169  1.1  christos 	      rm -f $$temp; \
    170  1.1  christos 	    fi; \
    171  1.1  christos 	  fi; \
    172  1.1  christos 	  $(mkinstalldirs) $(DESTDIR)$(localedir); \
    173  1.1  christos 	  test -f $(DESTDIR)$(localedir)/locale.alias \
    174  1.1  christos 	    && orig=$(DESTDIR)$(localedir)/locale.alias \
    175  1.1  christos 	    || orig=$(srcdir)/locale.alias; \
    176  1.1  christos 	  temp=$(DESTDIR)$(localedir)/t-locale.alias; \
    177  1.1  christos 	  dest=$(DESTDIR)$(localedir)/locale.alias; \
    178  1.1  christos 	  sed -f ref-add.sed $$orig > $$temp; \
    179  1.1  christos 	  $(INSTALL_DATA) $$temp $$dest; \
    180  1.1  christos 	  rm -f $$temp; \
    181  1.1  christos 	else \
    182  1.1  christos 	  : ; \
    183  1.1  christos 	fi
    184  1.1  christos install-data: all
    185  1.1  christos 	if test "$(PACKAGE)" = "gettext"; then \
    186  1.1  christos 	  $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
    187  1.1  christos 	  $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
    188  1.1  christos 	  $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
    189  1.1  christos 	  dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
    190  1.1  christos 	  for file in $$dists; do \
    191  1.1  christos 	    $(INSTALL_DATA) $(srcdir)/$$file \
    192  1.1  christos 			    $(DESTDIR)$(gettextsrcdir)/$$file; \
    193  1.1  christos 	  done; \
    194  1.1  christos 	  chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
    195  1.1  christos 	  dists="$(DISTFILES.generated)"; \
    196  1.1  christos 	  for file in $$dists; do \
    197  1.1  christos 	    if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
    198  1.1  christos 	    $(INSTALL_DATA) $$dir/$$file \
    199  1.1  christos 			    $(DESTDIR)$(gettextsrcdir)/$$file; \
    200  1.1  christos 	  done; \
    201  1.1  christos 	  dists="$(DISTFILES.obsolete)"; \
    202  1.1  christos 	  for file in $$dists; do \
    203  1.1  christos 	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
    204  1.1  christos 	  done; \
    205  1.1  christos 	else \
    206  1.1  christos 	  : ; \
    207  1.1  christos 	fi
    208  1.1  christos 
    209  1.1  christos install-strip: install
    210  1.1  christos 
    211  1.1  christos installdirs:
    212  1.1  christos 	if test "$(PACKAGE)" = "gettext" \
    213  1.1  christos 	   && test '' = '$(GETTOBJS)'; then \
    214  1.1  christos 	  $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
    215  1.1  christos 	else \
    216  1.1  christos 	  : ; \
    217  1.1  christos 	fi
    218  1.1  christos 	if test 'no' = yes; then \
    219  1.1  christos 	  test yes != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
    220  1.1  christos 	  $(mkinstalldirs) $(DESTDIR)$(localedir); \
    221  1.1  christos 	else \
    222  1.1  christos 	  : ; \
    223  1.1  christos 	fi
    224  1.1  christos 	if test "$(PACKAGE)" = "gettext"; then \
    225  1.1  christos 	  $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
    226  1.1  christos 	else \
    227  1.1  christos 	  : ; \
    228  1.1  christos 	fi
    229  1.1  christos 
    230  1.1  christos # Define this as empty until I found a useful application.
    231  1.1  christos installcheck:
    232  1.1  christos 
    233  1.1  christos uninstall:
    234  1.1  christos 	if test "$(PACKAGE)" = "gettext" \
    235  1.1  christos 	   && test '' = '$(GETTOBJS)'; then \
    236  1.1  christos 	  rm -f $(DESTDIR)$(includedir)/libintl.h; \
    237  1.1  christos 	  $(LIBTOOL) --mode=uninstall \
    238  1.1  christos 	    rm -f $(DESTDIR)$(libdir)/libintl.$la; \
    239  1.1  christos 	else \
    240  1.1  christos 	  : ; \
    241  1.1  christos 	fi
    242  1.1  christos 	if test 'no' = yes; then \
    243  1.1  christos 	  if test -f $(DESTDIR)$(libdir)/charset.alias; then \
    244  1.1  christos 	    temp=$(DESTDIR)$(libdir)/t-charset.alias; \
    245  1.1  christos 	    dest=$(DESTDIR)$(libdir)/charset.alias; \
    246  1.1  christos 	    sed -f ref-del.sed $$dest > $$temp; \
    247  1.1  christos 	    if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
    248  1.1  christos 	      rm -f $$dest; \
    249  1.1  christos 	    else \
    250  1.1  christos 	      $(INSTALL_DATA) $$temp $$dest; \
    251  1.1  christos 	    fi; \
    252  1.1  christos 	    rm -f $$temp; \
    253  1.1  christos 	  fi; \
    254  1.1  christos 	  if test -f $(DESTDIR)$(localedir)/locale.alias; then \
    255  1.1  christos 	    temp=$(DESTDIR)$(localedir)/t-locale.alias; \
    256  1.1  christos 	    dest=$(DESTDIR)$(localedir)/locale.alias; \
    257  1.1  christos 	    sed -f ref-del.sed $$dest > $$temp; \
    258  1.1  christos 	    if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
    259  1.1  christos 	      rm -f $$dest; \
    260  1.1  christos 	    else \
    261  1.1  christos 	      $(INSTALL_DATA) $$temp $$dest; \
    262  1.1  christos 	    fi; \
    263  1.1  christos 	    rm -f $$temp; \
    264  1.1  christos 	  fi; \
    265  1.1  christos 	else \
    266  1.1  christos 	  : ; \
    267  1.1  christos 	fi
    268  1.1  christos 	if test "$(PACKAGE)" = "gettext"; then \
    269  1.1  christos 	  for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
    270  1.1  christos 	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
    271  1.1  christos 	  done; \
    272  1.1  christos 	else \
    273  1.1  christos 	  : ; \
    274  1.1  christos 	fi
    275  1.1  christos 
    276  1.1  christos info dvi:
    277  1.1  christos 
    278  1.1  christos $(OBJECTS): ../config.h libgnuintl.h
    279  1.1  christos bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: gettextP.h gmo.h loadinfo.h
    280  1.1  christos dcigettext.$lo: hash-string.h
    281  1.1  christos explodename.$lo l10nflist.$lo: loadinfo.h
    282  1.1  christos dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: plural-exp.h
    283  1.1  christos dcigettext.$lo: eval-plural.h
    284  1.1  christos 
    285  1.1  christos tags: TAGS
    286  1.1  christos 
    287  1.1  christos TAGS: $(HEADERS) $(SOURCES)
    288  1.1  christos 	here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
    289  1.1  christos 
    290  1.1  christos id: ID
    291  1.1  christos 
    292  1.1  christos ID: $(HEADERS) $(SOURCES)
    293  1.1  christos 	here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
    294  1.1  christos 
    295  1.1  christos 
    296  1.1  christos mostlyclean:
    297  1.1  christos 	rm -f *.a *.la *.o *.lo core core.*
    298  1.1  christos 	rm -f libintl.h charset.alias ref-add.sed ref-del.sed
    299  1.1  christos 	rm -f -r .libs _libs
    300  1.1  christos 
    301  1.1  christos clean: mostlyclean
    302  1.1  christos 
    303  1.1  christos distclean: clean
    304  1.1  christos 	rm -f Makefile ID TAGS
    305  1.1  christos 	if test "$(PACKAGE)" = gettext; then \
    306  1.1  christos 	  rm -f ChangeLog.inst $(DISTFILES.normal); \
    307  1.1  christos 	else \
    308  1.1  christos 	  : ; \
    309  1.1  christos 	fi
    310  1.1  christos 
    311  1.1  christos maintainer-clean: distclean
    312  1.1  christos 	@echo "This command is intended for maintainers to use;"
    313  1.1  christos 	@echo "it deletes files that may require special tools to rebuild."
    314  1.1  christos 
    315  1.1  christos 
    316  1.1  christos # GNU gettext needs not contain the file `VERSION' but contains some
    317  1.1  christos # other files which should not be distributed in other packages.
    318  1.1  christos distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
    319  1.1  christos dist distdir: Makefile
    320  1.1  christos 	if test "$(PACKAGE)" = gettext; then \
    321  1.1  christos 	  additional="$(DISTFILES.gettext)"; \
    322  1.1  christos 	else \
    323  1.1  christos 	  additional="$(DISTFILES.normal)"; \
    324  1.1  christos 	fi; \
    325  1.1  christos 	$(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
    326  1.1  christos 	for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
    327  1.1  christos 	  if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
    328  1.1  christos 	  cp -p $$dir/$$file $(distdir); \
    329  1.1  christos 	done
    330  1.1  christos 
    331  1.1  christos Makefile: Makefile.in ../config.status
    332  1.1  christos 	cd .. \
    333  1.1  christos 	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
    334  1.1  christos 
    335  1.1  christos # Tell versions [3.59,3.63) of GNU make not to export all variables.
    336  1.1  christos # Otherwise a system limit (for SysV at least) may be exceeded.
    337  1.1  christos .NOEXPORT:
    338