1# Copyright (C) 2003 Graydon Hoare <graydon@pobox.com>
2#
3# This program is made available under the GNU GPL version 2.0 or
4# greater. See the accompanying file COPYING for details.
5#
6# This program is distributed WITHOUT ANY WARRANTY; without even the
7# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8# PURPOSE.
9
10# Makefile for monotone
11
12AUTOMAKE_OPTIONS = subdir-objects -Wno-portability
13ACLOCAL_AMFLAGS  = -I m4
14
15SUBDIRS = doc
16
17CMD_SOURCES =								\
18	src/cmd.hh src/cmd.cc src/cmd_netsync.cc src/cmd_list.cc 	\
19	src/cmd_packet.cc src/cmd_key_cert.cc src/cmd_merging.cc 	\
20	src/cmd_db.cc src/cmd_diff_log.cc src/cmd_ws_commit.cc 		\
21	src/cmd_othervcs.cc src/cmd_automate.cc src/cmd_files.cc	\
22	src/cmd_conflicts.cc
23
24SANITY_CORE_SOURCES =							\
25	src/sanity.cc src/sanity.hh src/quick_alloc.hh src/vector.hh 	\
26	src/base.hh src/simplestring_xform.cc src/simplestring_xform.hh	\
27	src/constants.cc src/constants.hh src/numeric_vocab.hh		\
28	src/platform.hh src/origin_type.hh
29
30LUAEXT_SOURCES = 							\
31	src/vocab.hh src/vocab.cc src/vocab_terms.hh			\
32	src/vocab_macros.hh src/vocab_cast.hh src/charset.cc		\
33	src/charset.hh src/paths.cc src/paths.hh src/interner.hh	\
34	src/hash_map.hh src/vocab_hash.hh src/luaext_mkstemp.cc		\
35	src/luaext_parse_basic_io.cc src/luaext_guess_binary.cc		\
36	src/luaext_platform.cc src/luaext_globish.cc src/lua.cc		\
37	src/lua.hh src/mkstemp.cc src/file_io.cc src/file_io.hh		\
38	src/globish.cc src/globish.hh src/basic_io.cc src/basic_io.hh	\
39	src/char_classifiers.hh
40
41MOST_SOURCES = 								\
42	$(SANITY_CORE_SOURCES) $(LUAEXT_SOURCES)			\
43	src/platform-wrapped.hh src/rev_types.hh src/mtn-sanity.cc	\
44	src/mtn-sanity.hh src/ui.cc src/ui.hh src/app_state.cc		\
45	src/app_state.hh src/automate_ostream.hh			\
46	src/automate_ostream_demuxed.hh	src/automate_reader.hh		\
47	src/automate_reader.cc src/automate_stdio_helpers.hh		\
48	src/botan_pipe_cache.hh	src/cache_logger.hh src/cache_logger.cc	\
49	src/commands.cc src/commands.hh $(CMD_SOURCES)			\
50	src/diff_output.cc src/diff_output.hh				\
51	src/lua_hooks.cc src/lua_hooks.hh 				\
52	src/transforms.cc src/transforms.hh				\
53	src/update.cc src/update.hh					\
54	src/work.cc src/migrate_work.cc src/work.hh			\
55	src/cert.cc src/cert.hh						\
56	src/cow_trie.hh							\
57	src/project.cc src/project.hh					\
58	src/outdated_indicator.cc src/outdated_indicator.hh		\
59	src/database.cc src/database.hh					\
60	src/key_store.cc src/key_store.hh				\
61	src/ssh_agent.cc src/ssh_agent.hh				\
62	src/keys.cc src/keys.hh						\
63	src/packet.cc src/packet.hh					\
64	src/key_packet.cc src/key_packet.hh				\
65	src/rcs_file.cc src/rcs_file.hh					\
66	src/xdelta.cc src/xdelta.hh					\
67	src/migration.hh src/migrate_schema.cc src/migrate_ancestry.cc	\
68	src/refiner.cc src/refiner.hh					\
69	src/enumerator.cc src/enumerator.hh				\
70	src/netsync.hh src/netsync.cc            			\
71	src/network/automate_session.hh src/network/automate_session.cc	\
72	src/network/connection_info.hh src/network/connection_info.cc	\
73	src/network/listener_base.hh src/network/listener_base.cc	\
74	src/network/listener.hh src/network/listener.cc			\
75	src/network/make_server.hh src/network/make_server.cc		\
76	src/network/netsync_session.hh src/network/netsync_session.cc	\
77	src/network/reactable.hh src/network/reactable.cc		\
78	src/network/reactor.hh src/network/reactor.cc			\
79	src/network/session.hh src/network/session.cc			\
80	src/network/session_base.hh src/network/session_base.cc		\
81	src/network/wrapped_session.hh src/network/wrapped_session.cc	\
82	src/netxx_pipe.cc src/netxx_pipe.hh				\
83	src/netcmd.cc src/netcmd.hh					\
84	src/merkle_tree.cc src/merkle_tree.hh 				\
85	src/lcs.cc src/lcs.hh						\
86	src/rcs_import.cc src/rcs_import.hh				\
87	src/git_change.cc src/git_change.hh src/git_export.cc		\
88	src/git_export.hh						\
89	src/revision.cc src/ancestry.cc src/revision.hh			\
90	src/cset.cc src/cset.hh						\
91	src/roster.cc src/roster.hh 					\
92	src/mt_version.cc src/mt_version.hh				\
93	src/automate.cc							\
94	src/database_check.cc						\
95	src/epoch.cc src/epoch.hh					\
96	src/gzip.cc src/gzip.hh						\
97	src/inodeprint.cc src/inodeprint.hh				\
98	src/selectors.cc src/selectors.hh				\
99	src/annotate.cc src/annotate.hh					\
100	src/restrictions.cc src/restrictions.hh				\
101	src/hmac.cc src/hmac.hh						\
102	src/string_queue.hh						\
103	src/maybe_workspace_updater.cc src/maybe_workspace_updater.hh	\
104	src/merge_roster.cc src/merge_conflict.cc src/merge_roster.hh	\
105	src/merge_content.cc src/merge_3way.cc src/merge_content.hh	\
106	src/legacy.cc src/legacy.hh src/uri.cc src/uri.hh		\
107	src/graph.cc src/graph.hh					\
108	src/roster_delta.cc src/roster_delta.hh				\
109	src/sha1.cc							\
110	src/pcrewrap.cc src/pcrewrap.hh					\
111	src/rev_height.cc src/rev_height.hh				\
112	src/rev_output.cc src/rev_output.hh				\
113	src/asciik.cc src/asciik.hh					\
114	src/dates.cc src/dates.hh src/date_format.hh			\
115									\
116	src/lru_writeback_cache.hh src/hybrid_map.hh src/lazy_rng.hh	\
117									\
118	src/cleanup.hh src/cycle_detector.hh src/adler32.hh		\
119	src/netio.hh src/gettext.h					\
120	src/package_revision.cc src/package_full_revision.cc		\
121	src/option.cc src/option.hh src/options.cc src/options.hh	\
122	src/options_list.hh src/options_applicator.hh			\
123	src/options_applicator.cc src/option_reset_info.hh		\
124	src/specialized_lexical_cast.cc src/lexical_cast.hh		\
125	src/parallel_iter.hh src/safe_map.hh src/pch.hh			\
126	src/current_exception.hh
127
128NETXX_SOURCES =								\
129	src/netxx/accept.cxx src/netxx/accept.h src/netxx/address.cxx	\
130	src/netxx/common.h src/netxx/compat.h src/netxx/datagram.cxx	\
131	src/netxx/datagramserver.cxx src/netxx/osutil.cxx		\
132	src/netxx/osutil.h src/netxx/peer.cxx src/netxx/probe.cxx 	\
133	src/netxx/probe_impl.h src/netxx/probe_select.cxx 		\
134	src/netxx/recvfrom.cxx src/netxx/recvfrom.h src/netxx/resolve.h	\
135	src/netxx/serverbase.cxx src/netxx/serverbase.h			\
136	src/netxx/sockaddr.cxx src/netxx/sockaddr.h			\
137	src/netxx/socket.cxx src/netxx/socket.h src/netxx/sockopt.cxx 	\
138	src/netxx/stream.cxx src/netxx/streambase.cxx 			\
139	src/netxx/streamserver.cxx src/netxx/address.h 			\
140	src/netxx/datagram.h src/netxx/datagramserver.h 		\
141	src/netxx/netbuf.h src/netxx/netxx.h src/netxx/peer.h 		\
142	src/netxx/probe.h src/netxx/probeinfo.h src/netxx/sockopt.h 	\
143	src/netxx/stream.h src/netxx/streambase.h 			\
144	src/netxx/streamserver.h src/netxx/timeout.h src/netxx/types.h
145
146BOOST_SANDBOX_SOURCES =							\
147	src/boost/circular_buffer_adaptor.hpp				\
148	src/boost/circular_buffer_base.hpp				\
149	src/boost/circular_buffer_fwd.hpp				\
150	src/boost/circular_buffer.hpp
151
152UNIX_PLATFORM_SOURCES =							\
153	src/unix/read_password.cc src/unix/get_system_flavour.cc	\
154	src/unix/process.cc src/unix/terminal.cc src/unix/inodeprint.cc	\
155	src/unix/fs.cc src/unix/make_io_binary.cc			\
156	src/unix/os_strerror.cc src/unix/cputime.cc 			\
157	src/unix/ssh_agent_platform.cc src/unix/ssh_agent_platform.hh	\
158	src/unix/parse_date.cc
159
160WIN32_PLATFORM_SOURCES =						\
161	src/win32/read_password.cc src/win32/get_system_flavour.cc	\
162	src/win32/process.cc src/win32/terminal.cc			\
163	src/win32/inodeprint.cc	src/win32/fs.cc 			\
164	src/win32/make_io_binary.cc src/win32/os_strerror.cc		\
165	src/win32/cputime.cc src/win32/ssh_agent_platform.cc		\
166	src/win32/ssh_agent_platform.hh src/win32/parse_date.cc
167
168# these files (part of the main program) contain code subject to unit testing
169
170UNIT_TESTEES =								\
171	src/basic_io.cc src/charset.cc src/commands.cc src/cset.cc 	\
172	src/git_change.cc src/globish.cc src/graph.cc src/merge_3way.cc	\
173	src/merge_roster.cc src/mkstemp.cc src/netcmd.cc 		\
174	src/netxx_pipe.cc src/option.cc src/outdated_indicator.cc	\
175	src/pcrewrap.cc src/refiner.cc src/restrictions.cc		\
176	src/revision.cc src/simplestring_xform.cc src/transforms.cc 	\
177	src/uri.cc src/vocab.cc src/xdelta.cc
178
179# these files contain the actual unit tests
180# yes, we have to list them all explicitly, with directory prefix, or
181# automake gets very confused
182UNIT_TESTERS =									\
183	test/unit/tests/basic_io.cc test/unit/tests/charset.cc			\
184	test/unit/tests/commands.cc test/unit/tests/cset.cc			\
185	test/unit/tests/git_change.cc test/unit/tests/globish.cc		\
186	test/unit/tests/graph.cc test/unit/tests/merge_3way.cc			\
187	test/unit/tests/merge_roster.cc test/unit/tests/mkstemp.cc		\
188	test/unit/tests/netcmd.cc test/unit/tests/netxx_pipe.cc			\
189	test/unit/tests/option.cc test/unit/tests/outdated_indicator.cc		\
190	test/unit/tests/pcrewrap.cc test/unit/tests/refiner.cc 			\
191	test/unit/tests/restrictions.cc test/unit/tests/revision.cc		\
192	test/unit/tests/simplestring_xform.cc test/unit/tests/transforms.cc	\
193	test/unit/tests/uri.cc test/unit/tests/vocab.cc				\
194	test/unit/tests/xdelta.cc test/unit/tests/numeric_vocab.cc		\
195	test/unit/tests/sha1.cc test/unit/tests/string_queue.cc			\
196	test/unit/unit_tester.cc
197
198# these files contain unit tests that need access to private interfaces
199# of the code under test, so they #include the code under test.  thus,
200# to avoid multiple-definition errors, for these files the code under
201# test is not part of UNIT_TESTEES.
202
203UNIT_TESTERS_PRIV =						\
204	test/unit/tests/dates.cc test/unit/tests/key_packet.cc 	\
205	test/unit/tests/packet.cc test/unit/tests/paths.cc 	\
206	test/unit/tests/rev_height.cc test/unit/tests/roster.cc
207
208# these files do not contain unit tests, but are required for unit testing
209# note that some are and some aren't part of the main program
210UNIT_TEST_SUPPORT =						\
211	src/constants.cc src/file_io.cc src/gzip.cc src/hmac.cc \
212	src/lcs.cc src/merkle_tree.cc src/roster_delta.cc 	\
213	src/sanity.cc src/specialized_lexical_cast.cc		\
214	test/unit/randomfile.hh test/unit/unit_tests.hh		\
215	test/unit/randomizer.hh test/unit/randomizer.cc		\
216	test/unit/roster_tests.hh
217
218# primaries
219
220bin_PROGRAMS = mtn
221mtn_SOURCES = $(MOST_SOURCES) src/monotone.cc
222nodist_mtn_SOURCES = src/std_hooks.cc src/schema.cc
223
224noinst_PROGRAMS = util/txt2c
225util_txt2c_SOURCES = util/txt2c.cc
226
227EXTRA_PROGRAMS =
228
229bin_SCRIPTS = mtnopt
230dist_bin_SCRIPTS = extra/bin/mtn-cleanup
231noinst_SCRIPTS = extra/building/dump-test-logs.sh
232
233check_PROGRAMS = test/bin/unit_tester test/bin/tester test/bin/check_net
234test_bin_unit_tester_SOURCES = $(UNIT_TESTERS) $(UNIT_TESTERS_PRIV) \
235	$(UNIT_TESTEES) $(UNIT_TEST_SUPPORT)
236test_bin_tester_SOURCES = test/src/tester.cc test/src/tester-plaf.hh src/transforms.cc src/gzip.cc \
237	$(SANITY_CORE_SOURCES) $(LUAEXT_SOURCES) src/pcrewrap.cc \
238	src/specialized_lexical_cast.cc
239nodist_test_bin_tester_SOURCES = test/src/testlib.cc
240
241noinst_LIBRARIES = src/libplatform.a src/lib3rdparty.a
242src_libplatform_a_SOURCES = src/platform.hh
243src_lib3rdparty_a_SOURCES = $(BOOST_SANDBOX_SOURCES) \
244			    $(NETXX_SOURCES)
245
246bashcompdir = $(sysconfdir)/bash_completion.d
247bashcomp_DATA = extra/shell/monotone.bash_completion
248
249monotonedir = $(datadir)/monotone
250
251mtnhooksdir = $(monotonedir)/hooks
252dist_mtnhooks_DATA = \
253	extra/mtn-hooks/authorize_remote_automate.lua			\
254	extra/mtn-hooks/get_passphrase_from_file.lua			\
255	extra/mtn-hooks/monotone-buildbot.lua				\
256	extra/mtn-hooks/monotone-ciabot.lua				\
257	extra/mtn-hooks/monotone-cluster-push.lua			\
258	extra/mtn-hooks/monotone-cvs-ignore.lua				\
259	extra/mtn-hooks/monotone-mail-notify.lua
260
261mtnscriptsdir = $(monotonedir)/scripts
262dist_mtnscripts_SCRIPTS = \
263	extra/mtn-hooks/monotone-ciabot.py				\
264	extra/mtn-hooks/monotone-mail-notify
265
266# Some of the smaller programs do not have --help or --version,
267# make them exempt of the check for those.  This specially applies
268# to programs intended to be called by mtn hooks, for which these
269# options aren't necessary.
270# NOTE: in the expansion of this variable, each filename MUST be
271# surrounded by one space before and after.  Having a tab between
272# two file names will guarantee that they won't be exempt.  This
273# is really a small but serious bug in the automake templates.
274# backslash+newline+whitespace will be reinterpreted as whitespace
275# by make.
276AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = \
277	extra/bin/mtn-cleanup extra/mtn-hooks/monotone-ciabot.py \
278	extra/mtn-hooks/monotone-mail-notify
279
280# flags
281
282# sets DEFS for just this object (autoconf's -DHAVE_CONFIG_H is useless)
283# the variable prevents this from overriding automake's unix/fs.o rule
284DEFS =
285UNIX=src/unix/
286$(UNIX)fs.$(OBJEXT) : DEFS += -DLOCALEDIR="\"$(localedir)\""
287
288if BUILD_PCH
289
290PCH_SOURCE = $(srcdir)/pch.hh
291# the .gch file only will be seen if it's in the same dir as the .hh file,
292# so need to copy it for separate build directories
293PCH_BUILD = pch-build.hh
294PCH_FLAGS = -Winvalid-pch -include $(PCH_BUILD)
295PCH_FILE = $(PCH_BUILD).gch
296sinclude $(PCH_FILE).dep
297
298*.o *.lo *.obj: $(PCH_FILE)
299
300$(PCH_BUILD): $(PCH_SOURCE)
301	cp $(PCH_SOURCE) $(PCH_BUILD)
302
303$(PCH_FILE): $(PCH_BUILD)
304	$(MAKE) PCH_FLAGS= pch-file
305
306pch-file:
307	$(CXXCOMPILE) -x c++-header $(PCH_BUILD) -o $(PCH_FILE) \
308	-MT $(PCH_FILE)  -MD -MP -MF "./$(PCH_FILE).Tdep" \
309	&& mv "./$(PCH_FILE).Tdep" "./$(PCH_FILE).dep" \
310	|| rm "./$(PCH_FILE).Tdep"
311endif
312AM_CXXFLAGS = $(PCH_FLAGS)
313
314SUFFIXES = .gch .merged.po .gmo
315
316AM_CPPFLAGS = $(intl_CFLAGS) $(pcre_CFLAGS) $(botan_CFLAGS)	\
317	      $(lua_CFLAGS) $(sqlite3_CFLAGS) $(idn_CFLAGS)
318
319LDADD = src/libplatform.a src/lib3rdparty.a $(intl_LIBS) $(pcre_LIBS)	\
320	$(botan_LIBS) $(lua_LIBS) $(sqlite3_LIBS) $(idn_LIBS)
321
322if WIN32_PLATFORM
323  src_libplatform_a_SOURCES += $(WIN32_PLATFORM_SOURCES)
324  mtn_SOURCES += src/win32/main.cc
325  test_bin_tester_SOURCES += test/src/win32/tester-plaf.cc
326  test_bin_check_net_SOURCES = test/src/win32/tester-check-net.cc
327  AM_CPPFLAGS += -DWIN32
328  LDADD += -lshfolder -lws2_32 -liconv -liphlpapi
329else
330  src_libplatform_a_SOURCES += $(UNIX_PLATFORM_SOURCES)
331  mtn_SOURCES += src/unix/main.cc
332  test_bin_tester_SOURCES += test/src/unix/tester-plaf.cc
333  test_bin_check_net_SOURCES = test/src/unix/tester-check-net.cc
334endif
335
336if MISSING_INET_PTON
337  src_lib3rdparty_a_SOURCES += src/netxx/inet_pton.cxx src/netxx/inet_pton.h
338  AM_CPPFLAGS += -DNETXX_NO_PTON
339endif
340
341if MISSING_INET_NTOP
342  src_lib3rdparty_a_SOURCES += src/netxx/inet_ntop.cxx src/netxx/inet_ntop.h
343  AM_CPPFLAGS += -DNETXX_NO_NTOP
344endif
345
346if MISSING_GETADDRINFO
347  src_lib3rdparty_a_SOURCES += src/netxx/resolve_gethostbyname.cxx \
348			       src/netxx/resolve_getservbyname.cxx
349else
350  src_lib3rdparty_a_SOURCES += src/netxx/resolve_getaddrinfo.cxx
351endif
352
353if MISSING_INET6
354  AM_CPPFLAGS += -DNETXX_NO_INET6
355endif
356
357# extra files
358
359contribdir = $(docdir)/contrib
360contrib_prefix = contrib
361contrib_data = $(shell cd $(srcdir); find $(contrib_prefix) | sed -e 's,^\./,,')
362
363examplesdir = $(docdir)/examples
364examples_prefix = examples
365examples_data =								\
366	examples/000README.txt						\
367	examples/mirror.rc examples/push.rc examples/read-permissions	\
368	examples/write-permissions					\
369									\
370	examples/server-setup/README examples/server-setup/serverrc	\
371	examples/server-setup/monotone.init				\
372	examples/server-setup/monotone.run				\
373									\
374	examples/user-setup/README examples/user-setup/monotonerc
375
376EXTRA_DIST =								\
377	HACKING INSTALL INSTALL_windows_cygwin.txt			\
378	INSTALL_windows_mingw.txt INSTALL_windows_msvc.txt UPGRADE	\
379	util/audit-includes util/do-editor-vars.sh			\
380	$(wildcard $(srcdir)/m4/*.m4)					\
381									\
382	src/schema.sql src/unix/README src/std_hooks.lua		\
383	src/util/mtnopt.in						\
384									\
385	test/common							\
386	test/func test/func-testsuite.lua				\
387	test/tester test/tester-testsuite.lua				\
388	$(wildcard $(srcdir)/test/unit/*.cc)				\
389	$(wildcard $(srcdir)/test/unit/*.hh)				\
390	$(wildcard $(srcdir)/test/unit/tests/*.cc)			\
391	test/unit-testsuite.lua						\
392	test/extra test/extra-testsuite.lua				\
393	test/src/testlib.lua						\
394									\
395	src/package_revision.txt src/package_full_revision_dist.txt	\
396									\
397	extra/README extra/building/dump-test-logs.sh.in		\
398	extra/shell/monotone.bash_completion.in				\
399	extra/shell/monotone_gen_bash_completion_table.pl		\
400									\
401	innosetup/README.txt						\
402	innosetup/monotone.iss.in innosetup/modpath.iss 		\
403	innosetup/monotone.bmp innosetup/dlls.sh			\
404									\
405	mac/readme-mac.txt mac/package-intro.rtf			\
406	mac/monotone.pmproj mac/monotone-pkg-logo.gif			\
407									\
408	cygport/README.txt						\
409	cygport/monotone.cygwin.patch					\
410	cygport/monotone.cygport					\
411									\
412	notes/release-checklist.txt					\
413	notes/README.testing notes/tester.txt notes/testsuite.txt	\
414									\
415	visualc/monotone.sln						\
416	visualc/monotone.vcproj visualc/botan.vcproj visualc/lua.vcproj	\
417	visualc/netxx.vcproj visualc/pcre.vcproj visualc/sqlite3.vcproj	\
418	visualc/stringprep.vcproj visualc/txt2c.vcproj			\
419	visualc/tester.vcproj visualc/unit_tester.vcproj		\
420	visualc/runtests.bat						\
421	visualc/config.h visualc/mt-stdint.h visualc/stdint.h		\
422	visualc/unistd.h						\
423	visualc/unknown_package.txt					\
424									\
425	$(contrib_data) $(examples_data)
426
427# Message translation support
428# INST_LINGUAS is set by configure, based on the po/LINGUAS file and
429# the user's LINGUAS env. variable.  Additional settings are in
430# po/Makevars.
431#
432# Only the foo.po-update target will overwrite a file in the source
433# po/ directory.
434
435include $(srcdir)/po/Makevars
436ALL_POFILES   := $(wildcard $(srcdir)/po/*.po)
437ALL_LINGUAS   := $(basename $(notdir $(ALL_POFILES)))
438ALL_POREADMES := $(addprefix po/README.,$(ALL_LINGUAS))
439ALL_GMOFILES  := $(addprefix po/,$(addsuffix .gmo, $(ALL_LINGUAS)))
440CLEAN_POFILES := $(addprefix po/,$(addsuffix .merged.po, $(ALL_LINGUAS))) \
441		 po/$(PACKAGE).pot
442DISTCLEAN_GMOFILES:= $(ALL_GMOFILES)
443
444EXTRA_DIST += $(ALL_POFILES) $(ALL_POREADMES) po/LINGUAS po/README
445
446.PHONY: all-nls install-nls uninstall-nls
447if USE_NLS
448# for installation
449GMOFILES := $(addprefix po/,$(addsuffix .gmo, $(INST_LINGUAS)))
450
451all-nls: $(GMOFILES)
452
453install-nls: all-nls
454	@linguas='$(INST_LINGUAS)'; set -e; for lang in $$linguas; do \
455	  dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
456	  echo " $(MKDIR_P) '$$dir'"; \
457	  $(MKDIR_P) $$dir; \
458	  echo " $(INSTALL_DATA) po/$$lang.gmo '$$dir/$(PACKAGE).mo'"; \
459	  $(INSTALL_DATA) po/$$lang.gmo $$dir/$(PACKAGE).mo; \
460	done
461
462uninstall-nls:
463	@linguas='$(INST_LINGUAS)'; set -e; for lang in $$linguas; do \
464	  echo " rm -f '$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo'"; \
465	  rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
466	  echo " rmdir '$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES'; \
467	  rmdir $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES || :; \
468	  echo " rmdir '$(DESTDIR)$(localedir)/$$lang'; \
469	  rmdir $(DESTDIR)$(localedir)/$$lang || :; \
470	done
471else
472# We need to provide these targets because all-local, install-data-local
473# and uninstall-local expects them as dependencies, further down.
474all-nls:
475	@:
476install-nls:
477	@:
478uninstall-nls:
479	@:
480endif
481
482.PHONY: dist-nls
483if REBUILD_NLS
484po/%.gmo: po/%.merged.po
485	$(V_msgfmt)$(MSGFMT) -c --statistics -o $@ $<
486
487po/%.merged.po: $(srcdir)/po/%.po po/$(PACKAGE).pot
488	$(V_msgmerge)$(MSGMERGE) $^ -q -o $@
489
490# for translators' use
491UPDATEPOFILES = $(addprefix po/,$(addsuffix .po-update, $(ALL_LINGUAS)))
492
493po/%.po-update: $(srcdir)/po/%.po po/$(PACKAGE).pot
494	$(MSGMERGE) --update $^
495
496update-po: $(UPDATEPOFILES)
497
498update-gmo: update-po $(ALL_GMOFILES)
499
500# for the template file
501POTFILES = $(filter-out package_%, $(MOST_SOURCES)) \
502	$(UNIX_PLATFORM_SOURCES) $(WIN32_PLATFORM_SOURCES) \
503	src/monotone.cc src/std_hooks.lua
504
505po/$(PACKAGE).pot: $(POTFILES)
506	[ -d po ] || mkdir -p po
507	$(V_xgettext)$(XGETTEXT) -o$@.in -D. -D$(top_srcdir) -cTRANSLATORS: \
508	  --copyright-holder='$(COPYRIGHT_HOLDER)' \
509	  --msgid-bugs-address='$(PACKAGE_BUGREPORT)' \
510	  $(XGETTEXT_PKG_OPTS) $(XGETTEXT_OPTS) \
511	  $(POTFILES)
512        YEAR=$(word 1, $(subst -, ,$(BUILD_DATE)))
513	sed -e 's/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR./Please see po\/README.<lang> for individual copyrights./' \
514	  -e 's/(C) YEAR/(C) 2003 - $(YEAR)/' -e 's/PACKAGE/$(PACKAGE)/' \
515	  -e 's/SOME DESCRIPTIVE TITLE/monotone message string catalogue/' < $@.in > $@
516	rm $@.in
517
518dist-nls: $(ALL_GMOFILES)
519	cp $(ALL_GMOFILES) $(distdir)/po
520else
521
522po/%.gmo: $(srcdir)/po/%.gmo
523	cp $< $@
524
525dist-nls:
526	@echo "*** Cannot 'make dist' without xgettext" >&2; exit 1
527
528endif
529
530_install_data = \
531	list='$(1)'; test -n "$(3)" || list=; \
532	for p in $$list; do \
533	  if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
534	  src="$$d$$p"; \
535	  dest="`if [ "$$p" != "$(2)" ]; then echo $$p | sed -e 's,$(2)/,,'; fi`"; \
536	  if test -d "$$src"; then \
537	    echo " $(MKDIR_P) '$(DESTDIR)$(3)/$$dest'"; \
538	    $(MKDIR_P) "$(DESTDIR)$(3)/$$dest" || exit $$?; \
539	  else \
540	    destd="`dirname $$dest`"; \
541	    if ! test -d "$(DESTDIR)$(3)/$$destd"; then \
542	      echo " $(MKDIR_P) '$(DESTDIR)$(3)/$$destd'"; \
543	      $(MKDIR_P) "$(DESTDIR)$(3)/$$destd" || exit $$?; \
544	    fi; \
545	    echo " $(INSTALL_DATA) $$src '$(DESTDIR)$(3)/$$dest'"; \
546	    $(INSTALL_DATA) $$src "$(DESTDIR)$(3)/$$dest" || exit $$?; \
547	  fi; \
548	done
549_uninstall_data = \
550	list='$(1)'; test -n "$(3)" || list=; \
551	dirs_rev=; \
552	for p in $$list; do \
553	  to_rm="`if [ "$$p" != "$(2)" ]; then echo $$p | sed -e 's,$(2)/,,'; fi`"; \
554	  if [ -n "$$to_rm" ]; then \
555	    if test -d "$(DESTDIR)$(3)/$$to_rm"; then \
556	      dirs_rev="echo '$$to_rm';$${dirs_rev}"; \
557	    else \
558	      echo " rm -f '$(DESTDIR)$(3)/$$to_rm'"; \
559	      rm -f $$src "$(DESTDIR)$(3)/$$to_rm" || exit $$?; \
560	    fi; \
561	  fi; \
562	done; \
563	eval "$$dirs_rev" | while read to_rmdir; do \
564	  echo " rmdir '$(DESTDIR)$(3)/$$to_rmdir'"; \
565	  rmdir "$(DESTDIR)$(3)/$$to_rmdir" || exit $$?; \
566	done
567
568install-contrib-data: $(contrib_data)
569	@$(call _install_data,$(contrib_data),$(contrib_prefix),$(contribdir))
570uninstall-contrib-data:
571	@$(call _uninstall_data,$(contrib_data),$(contrib_prefix),$(contribdir))
572
573install-examples-data: $(examples_data)
574	@$(call _install_data,$(examples_data),$(examples_prefix),$(examplesdir))
575uninstall-examples-data:
576	@$(call _uninstall_data,$(examples_data),$(examples_prefix),$(examplesdir))
577
578# build an OS X installer
579# requires sudo since packagemaker just looks at directory permissions.
580PKG_INST_ROOT = $(PWD)/$(top_builddir)/pkg_inst_root
581monotone-$(PACKAGE_VERSION).pkg: doc/monotone.pdf doc/html
582	sudo rm -rf $(PKG_INST_ROOT)
583	rm -rf "$@"
584	$(MAKE) install-strip DESTDIR=$(PKG_INST_ROOT)
585	mkdir -p $(PKG_INST_ROOT)/Developer/Documentation/monotone
586	cp doc/monotone.pdf $(PKG_INST_ROOT)/Developer/Documentation/monotone/
587	cp -r doc/html $(PKG_INST_ROOT)/Developer/Documentation/monotone/html
588	plutil -convert xml1 -o monotone-xml.pmproj.in $(srcdir)/mac/monotone.pmproj
589	sed "s/__MONOTONE_VERSION__/$(PACKAGE_VERSION)/g" \
590		< monotone-xml.pmproj.in > monotone-xml.pmproj
591	cp $(srcdir)/mac/monotone-pkg-logo.gif $(srcdir)/mac/package-intro.rtf .
592	cp $(srcdir)/COPYING COPYING.txt
593	chmod -R o-w,g-w,a+rX $(PKG_INST_ROOT)
594	sudo chown -R root:wheel $(PKG_INST_ROOT)/usr
595	sudo chown -R root:admin $(PKG_INST_ROOT)/Developer
596	/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker \
597		-build -proj monotone-xml.pmproj -p "$@"
598
599# build an OS X distribution disk image
600dmg: monotone-$(PACKAGE_VERSION).dmg
601
602monotone-$(PACKAGE_VERSION).dmg: monotone-$(PACKAGE_VERSION).pkg
603	rm -rf $(top_builddir)/dmg_root "$@"
604	mkdir $(top_builddir)/dmg_root
605	cp -R $^ $(top_builddir)/dmg_root/
606	chmod -R a+rX $(top_builddir)/dmg_root
607	hdiutil create -srcfolder "$(top_builddir)/dmg_root" \
608		"$@" -format UDZO -scrub -imagekey zlib-level=9 \
609		-volname monotone-$(PACKAGE_VERSION)
610
611# build win32 installer using INNO setup
612ISCC=@ISCC@
613
614win32-installer: monotone-$(PACKAGE_VERSION)-setup.exe
615
616monotone-$(PACKAGE_VERSION)-setup.exe: mtn-stripped.exe html info $(ALL_GMOFILES) linguas.iss dlls.iss monotone.iss
617	$(ISCC) monotone.iss
618
619mtn-stripped.exe: mtn.exe
620	strip $< -o $@
621
622dlls.iss: mtn-stripped.exe ${top_srcdir}/Makefile.am
623	rm -f $@
624	for DLL in $$( ${top_srcdir}/innosetup/dlls.sh mtn-stripped.exe | xargs cmd //c echo) ; do \
625	    echo "Source: \"$$DLL\"; DestDir: \"{app}\"" >> $@ ; \
626	done
627
628linguas.iss: ${top_srcdir}/Makefile.am
629	rm -rf $@
630	for LANG in $(INST_LINGUAS) ; do \
631		echo "Source: \"{#BUILDDIR}\\po\\$${LANG}.gmo\"; DestDir: \"{app}\\locale\\$${LANG}\\LC_MESSAGES\"; DestName: \"monotone.mo\"; Flags: ignoreversion" >> $@ ; \
632	done
633
634
635# testsuite stuff (could this possibly be more ugly?)  To get
636# parallelism, we cannot use Automake's TESTS feature at all.  The
637# shell script embedded in the 'check-testers' rule is partially
638# borrowed from automake 1.9's check.am
639
640.PHONY: check-testers
641check-testers: test/tester.status test/unit.status test/func.status test/extra.status
642	@all=0; failed=0; error=0;					       \
643	for f in $^; do							       \
644	  all=`expr $$all + 1`;						       \
645	  if test -f $$f; then						       \
646	    s=`cat $$f`;						       \
647	    if test "$$s" = 0; then					       \
648	      :;							       \
649	    elif test "$$s" = 1; then					       \
650	      failed=`expr $$failed + 1`;				       \
651	    else							       \
652	      error=`expr $$error + 1`;					       \
653	    fi;								       \
654	  else								       \
655	    error=`expr $$error + 1`;					       \
656	  fi;								       \
657	done;								       \
658	if test "$$failed" = 0 && test "$$error" = 0; then		       \
659	  exit=0;							       \
660	  report="";							       \
661	  banner="All $$all test suites passed";			       \
662	else								       \
663	  exit=1;							       \
664	  report="Please report to $(PACKAGE_BUGREPORT)";		       \
665	  if test "$$error" = 0; then					       \
666	    banner="$$failed of $$all test suites failed";		       \
667	  elif test "$$failed" = 0; then				       \
668	    banner="$$error of $$all test suites malfunctioned";	       \
669	  else								       \
670	    banner="$$failed of $$all test suites failed"		       \
671	    banner="$$banner and $$error malfunctioned";		       \
672	  fi;								       \
673	fi;								       \
674	rl=`echo $$report | wc -c`;					       \
675	bl=`echo $$banner | wc -c`;					       \
676	if test $$rl -gt $$bl; then					       \
677	  dashes=`echo "$$report" | sed s/./=/g`;			       \
678	else								       \
679	  dashes=`echo "$$banner" | sed s/./=/g`;			       \
680	fi;								       \
681	echo $$dashes;							       \
682	echo $$banner;							       \
683	test -z "$$report" || echo "$$report";				       \
684	exit $$exit
685
686run_%_tests: Makefile
687	$(AM_V_GEN){ echo '#!/bin/sh';							  	\
688	  echo 'export LANG=C';								  	\
689	  echo 'PATH="$(PWD)/$(top_builddir):$(PWD)/$(top_builddir)/test/bin:$$PATH"';	  		\
690	  echo '$(top_builddir)/test/bin/tester "$(srcdir)/test/$*-testsuite.lua" "$$@"';	\
691	  echo 'echo $$? > $(top_builddir)/test/$*.status';			  	  	\
692	  echo 'exit 0'; } > $@ && \
693	chmod 755 $@
694
695# The leading + causes Make to treat this as a recursive invocation,
696# allowing it to participate in the jobserver protocol.
697test/%.status: run_%_tests test/%-testsuite.lua test/bin/tester$(EXEEXT) FORCE
698	+$(AM_V_at)./run_$*_tests
699test/unit.status : test/bin/unit_tester$(EXEEXT)
700test/func.status : mtn$(EXEEXT) test/bin/check_net$(EXEEXT)
701
702# Creates the needed artifacts for manual test execution
703.PHONY: testers
704testers: mtn$(EXEEXT) $(check_PROGRAMS)	\
705	 run_tester_tests run_func_tests run_unit_tests run_extra_tests
706
707# We want the tests re-run even if the .status files already exist.
708# .PHONY does not work for that (bad interaction with pattern rules),
709# but the FORCE hack does.
710.PHONY: FORCE
711FORCE:
712.PRECIOUS: run_tester_tests run_unit_tests run_func_tests run_extra_tests
713
714# FIXME: if it annoys anybody, we could clean dvi, pdf and info files
715#        only in a separate maintainer-clean target as suggested by
716#	 automake's man page
717.PHONY: mostlyclean-tests
718mostlyclean-tests:
719	rm -rf test/work
720	@ls test/unit/tests/*/__driver__.lua 2>/dev/null | while read d; do \
721	  echo " rm -f '$$d'"; \
722	  rm -f $$d; \
723	  echo " rmdir '$${d%/*}'"; \
724	  rmdir $${d%/*} || :; \
725	done
726
727# With the MacOS X toolchain, some stuff may be generated in the form of subdirs
728.PHONY: mostlyclean-util
729mostlyclean-util:
730	rm -rf util/txt2c.dSYM
731
732MOSTLYCLEANFILES = mtn.1 \
733	run_tester_tests   run_func_tests   run_unit_tests   run_extra_tests \
734	test/tester.status test/func.status test/unit.status test/extra.status
735
736# we generate some source files to copy data into the executable
737# note that the only things that should go in BUILT_SRCS are things
738# that need to be generated early on 'make all'; this is _not_ true of
739# generated source files, but it is true for the PCH if used.
740
741# package_revision.txt and package_full_revision_dist.txt are shipped
742# in the distribution, so don't delete them here
743CLEAN_SRCS = $(nodist_mtn_SOURCES) $(nodist_test_bin_tester_SOURCES)	\
744	src/package_revision.cc src/package_full_revision.cc		\
745	src/package_revision_raw.txt					\
746	src/package_full_revision.txt src/package_full_revision_raw.txt
747
748BUILT_SOURCES = $(PCH_FILE) $(PCH_BUILD)
749
750CLEANFILES = $(bin_SCRIPTS) $(noinst_SCRIPTS) $(bashcomp_DATA) \
751	$(CLEAN_SRCS) $(CLEAN_POFILES)
752
753DISTCLEANFILES = src/xgettext.opts src/pch-build.hh.gch.dep		\
754	$(DISTCLEAN_GMOFILES)
755
756# a maintainer might still want to get rid of src/package_revision.txt and
757# src/package_full_revision_dist.txt to rebuild them.
758
759MAINTAINERCLEANFILES = \
760	src/package_revision.txt src/package_full_revision_dist.txt
761
762# automake provides no nice way to build a helper program to execute
763# on the build machine, so we need our own rule.  almost all the
764# standard flags variables are inappropriate.
765
766util/txt2c$(EXEEXT): util/txt2c.cc
767	$(V_bcxx)$(CXX_FOR_BUILD) $(CXXFLAGS) -o $@ $^
768
769# files generated using txt2c
770src/std_hooks.cc: src/std_hooks.lua util/txt2c$(EXEEXT)
771	$(V_txt2c)./util/txt2c std_hooks $< $@
772
773src/schema.cc: src/schema.sql util/txt2c$(EXEEXT)
774	$(V_txt2c)./util/txt2c schema $< $@
775
776src/package_revision.cc: src/package_revision.txt util/txt2c$(EXEEXT)
777	$(V_txt2c)./util/txt2c --strip-trailing package_revision $< $@
778
779src/package_full_revision.cc: src/package_full_revision.txt util/txt2c$(EXEEXT)
780	$(V_txt2c)./util/txt2c package_full_revision $< $@
781
782test/src/testlib.cc: test/src/testlib.lua util/txt2c$(EXEEXT)
783	$(V_txt2c)./util/txt2c testlib $< $@
784
785# Support for scripts and extras
786do_subst = sed -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),' \
787	-e 's,[@]sysconfdir[@],$(sysconfdir),'
788
789mtnopt: src/util/mtnopt.in Makefile
790	$(V_subst)$(do_subst) < $< > $@ && chmod +x $@
791
792extra/shell/monotone.bash_completion: extra/shell/monotone.bash_completion.in \
793	$(bin_PROGRAMS) extra/shell/monotone_gen_bash_completion_table.pl \
794	Makefile
795	$(MKDIR_P) extra/shell
796	( sed -e '/^[@]generated-command-list[@]$$/,$$d' < $<; \
797	  MTN=./mtn$(EXEEXT) \
798	    perl $(srcdir)/extra/shell/monotone_gen_bash_completion_table.pl; \
799	  sed -e '1,/^[@]generated-command-list[@]$$/d' < $< ) | \
800	  $(do_subst) > $@
801
802extra/building/dump-test-logs.sh: extra/building/dump-test-logs.sh.in Makefile
803	$(MKDIR_P) extra/building
804	$(V_subst)$(do_subst) < $< > $@ && chmod +x $@
805
806# This is phony, so that we always try to rebuild it.  If it succeeds
807# in calculating changes, it produces its target; otherwise, its
808# target does not exist.
809.PHONY: src/package_revision_raw.txt
810# if both attempts fail, then we need to remove the empty file that >
811# creates, and also make sure that the shell command exits
812# successfully; the rm -f ensures both
813src/package_revision_raw.txt:
814	$(AM_V_GEN)REAL_BLDDIR=$$PWD/$(top_builddir); \
815	(cd $(srcdir) && $$REAL_BLDDIR/mtn --root=. automate get_base_revision_id) 2>/dev/null >$@ \
816	|| (cd $(srcdir) && mtn --root=. automate get_base_revision_id) 2>/dev/null >$@ \
817	|| rm -f $@
818src/package_revision.txt: src/package_revision_raw.txt
819	$(AM_V_GEN)set -e; if [ -f $< ]; then \
820	  cp $< $@; \
821	fi; \
822	if [ ! -f $@ -a -f $(srcdir)/$@ ]; then \
823	  cp $(srcdir)/$@ $@; \
824	fi; \
825	[ -f $@ ] || echo "unknown" > $@
826
827# To avoid a dependency loop here, what we do is:
828#           calculate changes
829#                  |
830#      package_full_revision_raw.txt
831#              |                \  <-- add "generated from cached data" text
832#              |      package_full_revision_dist.txt
833#              |           /
834#          package_full_revision.txt
835
836# See above comment.
837.PHONY: src/package_full_revision_raw.txt
838src/package_full_revision_raw.txt:
839	$(AM_V_GEN)REAL_BLDDIR=$$PWD/$(top_builddir); \
840	(cd $(srcdir) && $$REAL_BLDDIR/mtn --root=. automate get_current_revision) 2>/dev/null >$@ \
841	|| (cd $(srcdir) && mtn --root=. automate get_current_revision) 2>/dev/null >$@ \
842	|| rm -f $@
843# See above comment -- the file this depends on may or may not exist.
844# This file, however, must always exist, so that 'make dist' can
845# include it in the tarball it generates.  So there are three cases:
846#   -- if the raw file does not exist, then
847#      -- if the dist file exists, then we leave it alone
848#      -- if the dist file does not exist, then we say "unknown"
849#   -- if the raw file does exist, then we regenerate the dist file
850src/package_full_revision_dist.txt: src/package_full_revision_raw.txt
851	$(AM_V_GEN)set -e; if [ -f $< ]; then \
852	  cp -f $< $@ \
853	  && (echo ''; \
854	      echo '  Generated from data cached in the distribution;'; \
855	      echo '  further changes may have been made.') >> $@; \
856	fi; \
857	if [ ! -f $@ -a -f $(srcdir)/$@ ]; then \
858	  cp $(srcdir)/$@ $@; \
859	fi; \
860	[ -f $@ ] || echo "unknown" > $@
861# The raw file may not exist, but the dist file definitely does; we
862# just take the first dependency that exists.
863src/package_full_revision.txt: src/package_full_revision_raw.txt src/package_full_revision_dist.txt
864	$(AM_V_GEN)rm -f $@; \
865	for SRC in $^; do \
866	    ([ -f $$SRC -a ! -f $@ ] && cp -f $$SRC $@) || true; \
867	done
868
869# This is a magic directive copy-and-pasted, then modified, from the
870# automake 1.9 manual, section 13.4, "Checking the distribution".
871# Normally, 'distcheck' does a clean build, and then afterwards runs
872# 'distclean', and 'distclean' is supposed to remove everything that
873# the build created.  However, we have some targets
874# (package_revision.txt, package_full_revision_dist.txt) that we
875# distribute, but then always attempt to rebuild optimistically, and
876# then if that fails fall back on the distributed versions.  This
877# means that 'distclean' should _not_ remove those files, since they
878# are distributed, yet building the package will generate those files,
879# thus automake thinks that 'distclean' _should_ remove those files,
880# and 'distcheck' gets cranky if we don't.  So basically what this
881# line does is tell 'distcheck' to shut up and ignore those two files.
882distcleancheck_listfiles = find . -type f -a ! -name package_revision.txt -a ! -name package_full_revision_dist.txt
883
884# the distcheck-base.hh checks for errors in the use of base.hh.
885# It's being used by distcheck-hook further down.
886.PHONY: distcheck-base.hh
887distcheck-base.hh:
888	cd $(srcdir) && $(SHELL) util/audit-includes \
889		$(sort $(mtn_SOURCES) $(test_bin_unit_tester_SOURCES) $(test_bin_tester_SOURCES) \
890                       $(UNIX_PLATFORM_SOURCES) $(WIN32_PLATFORM_SOURCES) \
891                       src/win32/main.cc src/unix/main.cc)
892
893man1_MANS = mtn.1
894dist_man1_MANS = src/util/mtnopt.1 extra/bin/mtn-cleanup.1
895
896# All local variants of automake-supported targets here, depending on all
897# the things we want to do.  This is to support multiple things to do in
898# each of them, as dependencies.
899all-local: all-nls
900install-data-local: install-nls \
901	install-contrib-data install-examples-data
902uninstall-local: uninstall-nls \
903	uninstall-contrib-data uninstall-examples-data
904mostlyclean-local: mostlyclean-tests mostlyclean-util
905check-local: check-testers
906
907# All hooks supported by automake here, depending on all the things we want
908# to hook in.  This is to support multiple things into the same hook, as
909# dependencies.
910distcheck-hook: distcheck-base.hh
911dist-hook: dist-nls
912# Kill off any backup files that got pulled in by one of the
913# recursive subdirectory includes in EXTRA_DIST
914# note use of slightly non-portable "-delete" action
915	find $(distdir) \( -name '*.bak' -o -name '*.orig' -o -name '*.rej' \
916	    -o -name '*~' -o -name '#*#' -o -name '*.swp' \) -delete
917
918mtn.1: mtn$(EXEEXT)
919	$(AM_V_GEN)REAL_BLDDIR=$$PWD/$(top_builddir); \
920	(cd $(srcdir) && $$REAL_BLDDIR/mtn manpage --norc) 2>/dev/null >$@ || rm -f $@
921
922doc/monotone.dvi: dvi
923doc/monotone.pdf: pdf
924doc/monotone.ps: ps
925doc/html doc/monotone.html: html
926
927# Not really phony, but the only way to make sure we wander into
928# the subdirectory and do the build with dependencies and all.
929.PHONY: doc/monotone.dvi doc/monotone.pdf doc/monotone.ps doc/monotone.html \
930	doc/html
931
932# Verbosity goo.
933V_bcxx       = $(V_bcxx_$(V))
934V_bcxx_      = $(V_bcxx_$(AM_DEFAULT_VERBOSITY))
935V_bcxx_0     = @echo "  BCXX  " $@;
936
937V_txt2c      = $(V_txt2c_$(V))
938V_txt2c_     = $(V_txt2c_$(AM_DEFAULT_VERBOSITY))
939V_txt2c_0    = @echo "  TXT2C " $@;
940
941V_subst      = $(V_subst_$(V))
942V_subst_     = $(V_subst_$(AM_DEFAULT_VERBOSITY))
943V_subst_0    = @echo "  SUBST " $@;
944
945V_xgettext   = $(V_xgettext_$(V))
946V_xgettext_  = $(V_xgettext_$(AM_DEFAULT_VERBOSITY))
947V_xgettext_0 = @echo "XGETTEXT" $@;
948
949V_msgfmt     = $(V_msgfmt_$(V))
950V_msgfmt_    = $(V_msgfmt_$(AM_DEFAULT_VERBOSITY))
951V_msgfmt_0   = @echo "  MSGFMT" $@;
952
953V_msgmerge   = $(V_msgmerge_$(V))
954V_msgmerge_  = $(V_msgmerge_$(AM_DEFAULT_VERBOSITY))
955V_msgmerge_0 = @echo "MSGMERGE" $@;
956
957V_makeinfo   = $(V_makeinfo_$(V))
958V_makeinfo_  = $(V_makeinfo_$(AM_DEFAULT_VERBOSITY))
959V_makeinfo_0 = @echo "MAKEINFO" $@;
960