Makefile.am 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. # $Id$
  2. # Makefile.am for texinfo/tp.
  3. #
  4. # Copyright 2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation,
  5. # Inc.
  6. #
  7. # This file is free software; as a special exception the author gives
  8. # unlimited permission to copy and/or distribute it, with or without
  9. # modifications, as long as this notice is preserved.
  10. #
  11. # This program is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
  13. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. # Generated lists of tests and of test result files, and some rules.
  15. include $(srcdir)/Makefile.tres
  16. # Generated list of document string locale files and associated rules.
  17. include $(srcdir)/Makefile.docstr
  18. $(srcdir)/Makefile.tres: maintain/regenerate_file_lists.pl
  19. cd $(srcdir)/ && $(PERL) ./maintain/regenerate_file_lists.pl
  20. $(srcdir)/Makefile.docstr: maintain/regenerate_docstr.sh \
  21. $(srcdir)/../po_document/LINGUAS
  22. cd $(srcdir) \
  23. && $(SHELL) ./maintain/regenerate_docstr.sh "$@"
  24. SUBDIRS =
  25. if ! DISABLE_XS
  26. SUBDIRS += Texinfo/Convert/XSParagraph Texinfo/MiscXS
  27. endif
  28. SUBDIRS += . tests
  29. DIST_SUBDIRS = Texinfo/Convert/XSParagraph Texinfo/MiscXS tests
  30. bin_SCRIPTS = texi2any
  31. do_subst = sed \
  32. -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
  33. -e 's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g' \
  34. -e 's,[@]PACKAGE_URL[@],$(PACKAGE_URL),g' \
  35. -e 's,[@]sysconfdir[@],$(sysconfdir),g' \
  36. -e 's,[@]prefix[@],$(prefix),g' \
  37. -e 's,[@]datarootdir[@],$(datarootdir),g' \
  38. -e 's,[@]datadir[@],$(datadir),g' \
  39. -e 's,[@]pkglibdir[@],$(pkglibdir),g' \
  40. -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
  41. -e 's,[@]USE_EXTERNAL_LIBINTL[@],$(USE_EXTERNAL_LIBINTL),g' \
  42. -e 's,[@]USE_EXTERNAL_EASTASIANWIDTH[@],$(USE_EXTERNAL_EASTASIANWIDTH),g' \
  43. -e 's,[@]USE_EXTERNAL_UNIDECODE[@],$(USE_EXTERNAL_UNIDECODE),g' \
  44. -e 's,[@]TEXINFO_DTD_VERSION[@],$(TEXINFO_DTD_VERSION),g' \
  45. -e 's,[@]enable_xs[@],$(enable_xs),g' \
  46. -e '1 s,/usr/bin/env perl,$(PERL),g'
  47. texi2any: texi2any.pl $(top_builddir)/config.status
  48. $(do_subst) $(srcdir)/texi2any.pl >$@
  49. chmod a+x $@
  50. makeinfo: texi2any
  51. rm -f $@
  52. -$(LN_S) texi2any $@
  53. modulesdir = $(pkgdatadir)/Texinfo
  54. dist_modules_DATA = \
  55. Texinfo/Parser.pm \
  56. Texinfo/Report.pm \
  57. Texinfo/Common.pm \
  58. Texinfo/Encoding.pm \
  59. Texinfo/Structuring.pm \
  60. Texinfo/Transformations.pm \
  61. Texinfo/MiscXS.pm \
  62. Texinfo/XSLoader.pm \
  63. Texinfo/Documentlanguages.pm
  64. dist_noinst_DATA = \
  65. Texinfo/ModulePath.pm.in
  66. modules_DATA = \
  67. Texinfo/ModulePath.pm
  68. convertersdir = $(pkgdatadir)/Texinfo/Convert
  69. dist_converters_DATA = \
  70. Texinfo/Convert/Converter.pm \
  71. Texinfo/Convert/DocBook.pm \
  72. Texinfo/Convert/HTML.pm \
  73. Texinfo/Convert/IXIN.pm \
  74. Texinfo/Convert/IXINSXML.pm \
  75. Texinfo/Convert/Info.pm \
  76. Texinfo/Convert/Line.pm \
  77. Texinfo/Convert/NodeNameNormalization.pm \
  78. Texinfo/Convert/Paragraph.pm \
  79. Texinfo/Convert/ParagraphNonXS.pm \
  80. Texinfo/Convert/PlainTexinfo.pm \
  81. Texinfo/Convert/Plaintext.pm \
  82. Texinfo/Convert/Texinfo.pm \
  83. Texinfo/Convert/TexinfoSXML.pm \
  84. Texinfo/Convert/TexinfoXML.pm \
  85. Texinfo/Convert/Text.pm \
  86. Texinfo/Convert/TextContent.pm \
  87. Texinfo/Convert/UnFilled.pm \
  88. Texinfo/Convert/Unicode.pm
  89. debugmodulesdir = $(pkgdatadir)/DebugTexinfo
  90. dist_debugmodules_DATA = \
  91. DebugTexinfo/DebugTree.pm
  92. initdir = $(datadir)/texinfo/init
  93. dist_init_DATA = \
  94. init/book.pm \
  95. init/chm.pm \
  96. init/html32.pm \
  97. init/tex4ht.pm \
  98. init/latex2html.pm
  99. test_files = \
  100. t/README \
  101. t/include/a.txt \
  102. t/include/aa.txt \
  103. t/include/count_image.png \
  104. t/include/count_image.txt \
  105. t/include/count_image_text.txt \
  106. t/include/f.txt \
  107. t/include/fdotext.ext \
  108. t/include/fdotext.png \
  109. t/include/fdotext.txt \
  110. t/include/fext.ext \
  111. t/include/fext.png \
  112. t/include/fext.txt \
  113. t/include/fextext \
  114. t/include/file_with_cpp_lines.texi \
  115. t/include/file_with_xml_chars.texi \
  116. t/include/include_noeol.texi \
  117. t/include/image.txt \
  118. t/include/image_encoded.txt \
  119. t/include/inc_@f--ile.texi \
  120. t/include/included_file_with_setfilename.texi \
  121. t/include/this_is_a_long_unknown_file.png \
  122. t/include/verbatim_encoded.texi \
  123. t/include/verbatim_encoded_latin1.texi \
  124. t/include/words.txt \
  125. t/init/only_toc_out.init \
  126. t/init/cvs.init \
  127. t/init/redefine_need.init \
  128. t/init/icons.init \
  129. t/init/t2h_singular.init \
  130. t/init/ignore_and_comments_output.init \
  131. t/init/test_directions.init \
  132. t/init/mini_ker_t2h.init \
  133. t/init/test_renamed_nodes.init \
  134. t/init/misc_file_collision.init \
  135. t/init/l2h.init \
  136. t/manual_tree.pl \
  137. t/test_utils.pl \
  138. t/input_files/all_spaces.texi \
  139. t/input_files/char_latin1_utf8_in_refs.texi \
  140. t/input_files/char_latin1_latin1_in_refs.texi \
  141. t/input_files/char_latin2_latin2_in_refs.texi \
  142. t/input_files/chinese_mixed_with_en.texi \
  143. t/input_files/contents_at_document_begin.texi \
  144. t/input_files/contents_at_end_document_after_node.texi \
  145. t/input_files/contents_at_end_document.texi \
  146. t/input_files/contents_in_document.texi \
  147. t/input_files/contents_no_section.texi \
  148. t/input_files/cpp_lines.texi \
  149. t/input_files/delcomment.texi \
  150. t/input_files/east_asian_in_w.texi \
  151. t/input_files/empty_lines_at_beginning_no_setfilename.texi \
  152. t/input_files/empty_lines_at_beginning_no_setfilename_no_element.texi \
  153. t/input_files/japanese_utf8.texi \
  154. t/input_files/japanese_shift_jis.texi \
  155. t/input_files/nodequote.texi \
  156. t/input_files/non_break_spaces.texi \
  157. t/input_files/sample_utf8.texi \
  158. t/input_files/things_before_setfilename_no_element.texi \
  159. t/input_files/things_before_setfilename.texi \
  160. #
  161. document_domain = $(PACKAGE)_document
  162. # $(document_strings_mo_files) and $(test_copied_include_files) come from
  163. # the generated makefiles Makefile.docstr and Makefile.tres.
  164. all-local: maintain/catalog.xml $(document_strings_mo_files) \
  165. $(test_copied_include_files)
  166. tp_tests = prove.sh
  167. if TP_TESTS
  168. TESTS = $(test_tap_files_generated_list)
  169. endif
  170. TEST_EXTENSIONS = .t
  171. T_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
  172. $(top_srcdir)/build-aux/tap-driver.sh
  173. T_LOG_COMPILER = $(PERL)
  174. AM_T_LOG_FLAGS = -w
  175. AM_T_LOG_FLAGS += -ITexinfo/Convert/XSParagraph
  176. AM_T_LOG_FLAGS += -I$(srcdir)/Texinfo/Convert/XSParagraph
  177. AM_TESTS_ENVIRONMENT = srcdir="$(srcdir)"; export srcdir; top_srcdir="$(top_srcdir)"; export top_srcdir; builddir="$(builddir)"; export buildir; top_builddir="$(top_builddir)"; export top_builddir;
  178. maintenance_files = \
  179. maintain/all_tests.sh \
  180. maintain/change_perl_modules_version.sh \
  181. maintain/clean_perl_module_files.sh \
  182. maintain/language-subtag-registry \
  183. maintain/Makefile_perl_po \
  184. maintain/MANIFEST_generated_files \
  185. maintain/prepare_perl_module_files.sh \
  186. maintain/prepare_perl_standalone_module_archive.sh \
  187. maintain/regenerate_cmd_tests.sh \
  188. maintain/regenerate_converters_documentation.sh \
  189. maintain/regenerate_docstr.sh \
  190. maintain/regenerate_documentlanguages.pl \
  191. maintain/regenerate_file_lists.pl \
  192. maintain/template.pod \
  193. maintain/catalog.xml.in
  194. perl_specific_files = \
  195. Makefile.PL \
  196. MANIFEST
  197. EXTRA_DIST = \
  198. texi2any.pl \
  199. $(test_files_generated_list) \
  200. $(test_files) \
  201. $(tp_tests) \
  202. $(maintenance_files) \
  203. $(perl_specific_files) \
  204. maintain/lib
  205. # MANIFEST is used for the Perl module.
  206. # maintain/MANIFEST_generated_files is used for dist(check).
  207. # They are made by maintain/prepare_perl_module_files.sh.
  208. MANIFEST: maintain/MANIFEST_generated_files Makefile.am Makefile.tres
  209. LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE; \
  210. echo "$(dist_modules_DATA) $(dist_converters_DATA)" \
  211. "$(dist_debugmodules_DATA) $(dist_init_DATA)" \
  212. "$(test_files) $(tp_tests) $(test_files_generated_list)" \
  213. "texi2any README TODO COPYING $(modules_DATA)" \
  214. "$(maintenance_files) $(perl_specific_files)" \
  215. | sed 's/ */\n/g' \
  216. | cat - $(srcdir)/maintain/MANIFEST_generated_files $(srcdir)/maintain/MANIFEST_XSParagraph_files \
  217. | sort >$@
  218. # template.pod is the basis for the .pm documentation, and the script
  219. # invoked here updates them; to be run when template.pod changes.
  220. #
  221. # If we ever make that documentation more extensive, the .pm doc could
  222. # (and probably should) just be maintained separately, by hand.
  223. do-pm-doc:
  224. ./maintain/regenerate_converters_documentation.sh
  225. maintain/catalog.xml: maintain/catalog.xml.in Makefile
  226. $(MKDIR_P) maintain
  227. sed -e 's|[@]abs_top_srcdir[@]|$(abs_top_srcdir)|' \
  228. -e 's|[@]TEXINFO_DTD_VERSION[@]|$(TEXINFO_DTD_VERSION)|' \
  229. $(srcdir)/maintain/catalog.xml.in >$@
  230. libsrcdir = $(srcdir)/maintain/lib
  231. install-data-local:
  232. if test $(USE_EXTERNAL_LIBINTL) != 'yes' ; then \
  233. $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/lib/libintl-perl/lib/Locale/Recode \
  234. $(DESTDIR)$(pkgdatadir)/lib/libintl-perl/lib/Locale/RecodeData; \
  235. $(INSTALL_DATA) $(libsrcdir)/libintl-perl/lib/Locale/*.pm \
  236. $(DESTDIR)$(pkgdatadir)/lib/libintl-perl/lib/Locale; \
  237. $(INSTALL_DATA) $(libsrcdir)/libintl-perl/lib/Locale/Recode/*.pm \
  238. $(DESTDIR)$(pkgdatadir)/lib/libintl-perl/lib/Locale/Recode; \
  239. $(INSTALL_DATA) $(libsrcdir)/libintl-perl/lib/Locale/RecodeData/*.pm \
  240. $(DESTDIR)$(pkgdatadir)/lib/libintl-perl/lib/Locale/RecodeData; \
  241. fi
  242. if test $(USE_EXTERNAL_EASTASIANWIDTH) != 'yes' ; then \
  243. $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/lib/Unicode-EastAsianWidth/lib/Unicode; \
  244. $(INSTALL_DATA) $(libsrcdir)/Unicode-EastAsianWidth/lib/Unicode/EastAsianWidth.pm \
  245. $(DESTDIR)$(pkgdatadir)/lib/Unicode-EastAsianWidth/lib/Unicode; \
  246. fi
  247. if test $(USE_EXTERNAL_UNIDECODE) != 'yes' ; then \
  248. $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/lib/Text-Unidecode/lib/Text/Unidecode; \
  249. $(INSTALL_DATA) $(libsrcdir)/Text-Unidecode/lib/Text/Unidecode.pm \
  250. $(DESTDIR)$(pkgdatadir)/lib/Text-Unidecode/lib/Text; \
  251. $(INSTALL_DATA) $(libsrcdir)/Text-Unidecode/lib/Text/Unidecode/*.pm \
  252. $(DESTDIR)$(pkgdatadir)/lib/Text-Unidecode/lib/Text/Unidecode; \
  253. fi
  254. install-exec-hook:
  255. makeinfo_f=`echo makeinfo | sed -e '$(transform)'`; rm -f $(DESTDIR)$(bindir)/$$makeinfo_f
  256. -makeinfo_f=`echo makeinfo | sed -e '$(transform)'`; texi2any_f=`echo texi2any| sed -e '$(transform)'`; $(LN_S) $$texi2any_f $(DESTDIR)$(bindir)/$$makeinfo_f
  257. dist-hook:
  258. rm -rf `find $(distdir)/maintain/lib -name .svn`
  259. uninstall-local:
  260. rm -rf $(DESTDIR)$(pkgdatadir)/lib/
  261. distclean-local:
  262. rm -rf LocaleData
  263. rm -f t/results/*/*.pl.new
  264. rm -rf t/results/*/*/out_*/
  265. rm -rf t/include_dir
  266. rm -rf blib po po_document
  267. CLEANFILES = texi2any makeinfo texi2any-perl
  268. DISTCLEANFILES = maintain/catalog.xml pm_to_blib Makefile.old