1# Generated automatically from Makefile.in.in by configure.
2# Makefile for program source directory in GNU NLS utilities package.
3# Copyright (C) 1995 Free Software Foundation, Inc.
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2, or (at your option)
8# any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19PACKAGE = sharutils
20VERSION = 4.2.1
21
22SHELL = /bin/sh
23
24
25srcdir = .
26top_srcdir = ..
27
28prefix = /usr/local
29exec_prefix = ${prefix}
30datadir = $(prefix)/share
31localedir = $(datadir)/locale
32gnulocaledir = $(prefix)/share/locale
33gettextsrcdir = $(prefix)/share/gettext
34subdir = po
35
36INSTALL = /bin/install -c
37INSTALL_DATA = ${INSTALL} -m 644
38
39CC = gcc
40GENCAT = 
41GMSGFMT = msgfmt
42MSGFMT = msgfmt
43XGETTEXT = xgettext
44TUPDATE = tupdate
45
46DEFS = -DHAVE_CONFIG_H
47CFLAGS = -g -O
48CPPFLAGS = 
49
50INCLUDES = -I.. -I$(top_srcdir)/intl
51
52COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
53
54SOURCES = cat-id-tbl.c
55POFILES =  de.po fr.po ja_JP.EUC.po nl.po pt.po sv.po
56GMOFILES =  de.gmo fr.gmo ja_JP.EUC.gmo nl.gmo pt.gmo sv.gmo
57DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
58stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
59
60POTFILES = \
61	../lib/error.c \
62	../lib/getopt.c \
63	../lib/xmalloc.c \
64	../src/shar.c \
65	../src/unshar.c \
66	../src/uudecode.c \
67	../src/uuencode.c
68
69CATALOGS =  de.gmo fr.gmo ja_JP.EUC.gmo nl.gmo pt.gmo sv.gmo
70CATOBJEXT = .gmo
71INSTOBJEXT = .mo
72
73.SUFFIXES:
74.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
75
76.c.o:
77	$(COMPILE) $<
78
79.po.pox:
80	$(MAKE) $(PACKAGE).pot
81	$(TUPDATE) $(srcdir)/$(PACKAGE).pot $< > $*.pox
82
83.po.mo:
84	$(MSGFMT) -o $@ $<
85
86.po.gmo:
87	file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
88	  && rm -f $$file && $(GMSGFMT) -o $$file $<
89
90.po.cat:
91	sed -f ../intl/po2msg.sed < $< > $*.msg \
92	  && rm -f $@ && $(GENCAT) $@ $*.msg
93
94
95all: cat-id-tbl.c $(CATALOGS)
96
97$(PACKAGE).pot: $(POTFILES)
98	$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
99	  --add-comments --keyword=_ --keyword=N_ \
100	  --files-from=$(srcdir)/POTFILES.in
101	if cmp -s $(PACKAGE).po $(srcdir)/$(PACKAGE).pot; then \
102	  rm -f $(PACKAGE).po; \
103	else \
104	  rm -f $(srcdir)/$(PACKAGE).pot \
105	    && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot; \
106	fi
107
108cat-id-tbl.c: stamp-cat-id
109stamp-cat-id: $(PACKAGE).pot
110	rm -f cat-id-tbl.tmp.c
111	sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
112		| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp.c
113	if cmp -s cat-id-tbl.tmp.c $(srcdir)/cat-id-tbl.c; then \
114	  rm cat-id-tbl.tmp.c; \
115	else \
116	  echo cat-id-tbl.c changed; \
117	  rm -f $(srcdir)/cat-id-tbl.c; \
118	  mv cat-id-tbl.tmp.c $(srcdir)/cat-id-tbl.c; \
119	fi
120	cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
121
122
123install: install-exec install-data
124install-exec:
125install-data: all
126	$(top_srcdir)/mkinstalldirs $(datadir)
127	catalogs='$(CATALOGS)'; \
128	for cat in $$catalogs; do \
129	  if test "`echo $$cat | sed 's/.*\(\..*\)/\1/'`" = ".gmo"; then \
130	    destdir=$(gnulocaledir); \
131	  else \
132	    destdir=$(localedir); \
133	  fi; \
134	  lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
135	  dir=$$destdir/$$lang/LC_MESSAGES; \
136	  $(top_srcdir)/mkinstalldirs $$dir; \
137	  if test -r $$cat; then \
138	    $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
139	  else \
140	    $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
141	  fi; \
142	done
143
144# This installation goal is only used in GNU gettext.  Packages which
145# only use the library should use install instead.
146install-src: install
147	$(top_srcdir)/mkinstalldirs $(gettextsrcdir)
148	cd $(srcdir) && \
149	  $(INSTALL_DATA) Makefile.in.in $(gettextsrcdir)/po-Makefile.in.in
150
151uninstall:
152	catalogs='$(CATALOGS)'; \
153	for cat in $$catalogs; do \
154	  lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
155	  rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
156	  rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
157	done
158	rm -f $(gettextsrcdir)/po-Makefile.in.in
159
160check: all
161
162cat-id-tbl.o: ../intl/libgettext.h
163
164TAGS ID:
165
166mostlyclean:
167	rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp.c
168
169clean: mostlyclean
170
171distclean: clean
172	rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat
173
174maintainer-clean: distclean
175	@echo "This command is intended for maintainers to use;"
176	@echo "it deletes files that may require special tools to rebuild."
177
178distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
179dist dist-gettext: update-po $(DISTFILES)
180	for file in $(DISTFILES); do \
181	  ln $(srcdir)/$$file $(distdir) 2> /dev/null \
182	    || cp -p $(srcdir)/$$file $(distdir); \
183	done
184
185update-po: Makefile
186	$(MAKE) $(PACKAGE).pot
187	cd $(srcdir); \
188	catalogs='$(CATALOGS)'; \
189	for cat in $$catalogs; do \
190	  lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
191	  mv $$lang.po $$lang.old.po; \
192	  if $(TUPDATE) $(PACKAGE).pot $$lang.old.po > $$lang.po; then \
193	    rm -f $$lang.old.po; \
194	  else \
195	    echo "tupdate for $$cat failed!"; \
196	    rm -f $$lang.po; \
197	    mv $$lang.old.po $$lang.po; \
198	  fi; \
199	done
200
201POTFILES: POTFILES.in
202	( if test 'x$(srcdir)' != 'x.'; then \
203	    posrcprefix='$(top_srcdir)/'; \
204	  else \
205	    posrcprefix="../"; \
206	  fi; \
207	  sed -e '/^#/d' -e '/^[ 	]*$$/d' \
208	      -e "s@.*@	$$posrcprefix& \\\\@" \
209	      -e '$$s/\(.*\) \\/\1/' < $(srcdir)/POTFILES.in > POTFILES )
210
211Makefile: Makefile.in.in ../config.status POTFILES
212	cd .. && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= ./config.status
213
214# Tell versions [3.59,3.63) of GNU make not to export all variables.
215# Otherwise a system limit (for SysV at least) may be exceeded.
216.NOEXPORT:
217