1 # Copyright (C) 1989-2018 Free Software Foundation, Inc.
2 # Original Makefile.in written by James Clark (jjc@jclark.com)
3 # Migrated to Automake by Bertrand Garrigues
5 # Last update: 2017-11-02
7 # This file is part of groff.
9 # groff is free software; you can redistribute it and/or modify it under
10 # the terms of the GNU General Public License as published by the Free
11 # Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
15 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 # The variables that are listed in the following comments will be
26 # automatically set by automake in the generated Makefile.in
41 # `HOST' is the canonical host specification,
42 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
44 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
46 # `RT_SEP' is the operating system's native PATH SEPARATOR CHAR, which
47 # is to be used in runtime PATHs compiled into groff executables.
48 RT_SEP=@GROFF_PATH_SEPARATOR@
50 # `SH_SEP' is a alternative PATH SEPARATOR CHAR, to be used in shell
51 # scripts and makefile rules; it may be the same as `RT_SEP', but,
52 # particularly in some Microsoft environments, it may differ.
53 SH_SEP=@PATH_SEPARATOR@
56 # `GLIBC21' is yes if the host operating system uses GNU libc 2.1 or newer,
60 # VERSION is set by automake, based on what is passed to AC_INIT.
63 # Define `page' to be letter if your PostScript printer uses 8.5x11
64 # paper (USA) and define it to be A4, if it uses A4 paper (rest of the
68 # The name of the ghostscript program. Normally, gs, on GNU/Linux
69 # but it might be different on MS-DOS/MS-WIN32 systems.
71 # ALT_GHOSTSCRIPT_PROGS
72 # `ALT_GHOSTSCRIPT_PROGS' specifies a list alternative names,
73 # which can be tried if `GHOSTSCRIPT' cannot be found at run time.
76 # Similarly, `ALT_AWK_PROGS' specifies a list of alternative names,
77 # which can be tried at run time, to identify the awk program.
79 # BROKEN_SPOOLER_FLAGS
80 # Normally the Postscript driver, grops, produces output that conforms
81 # to version 3.0 of the Adobe Document Structuring Conventions.
82 # Unfortunately some spoolers and previewers can't handle such output.
83 # The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
84 # make its output acceptable to such programs. This variable controls
85 # only the default behaviour of grops; the behaviour can be changed at
86 # runtime by the grops -b option (and so by groff -P-b).
87 # Use a value of 0 if your spoolers and previewers are able to handle
88 # conforming PostScript correctly.
89 # Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
90 # this is needed for early versions of TranScript that get confused by
91 # anything between the %%EndProlog line and the first %%Page: comment.
92 # Add 2 if lines in included files beginning with %! should be
93 # stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
94 # Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
95 # stripped out of included files; this is needed for spoolers that
96 # don't understand the %%{Begin,End}Document comments. I suspect this
97 # includes early versions of TranScript.
98 # Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
99 # rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
100 # with a printer that requires page reversal.
103 # `DEVICE' is the default device.
107 # `XDEVDIRS' is either `font/devX{75,100}{,-12}' or empty.
110 # `XPROGDIRS' is either `src/devices/xditview src/utils/xtotroff' or empty.
113 # `XLIBDIRS' is either `src/libs/libxutil' or empty.
115 # `TTYDEVDIRS' is either `font/devascii font/devlatin1' (for
116 # ASCII) or `font/devcp1047' (for EBCDIC) plus font/devutf8.
117 TTYDEVDIRS=@TTYDEVDIRS@ font/devutf8
120 # `OTHERDEVDIRS' is either `font/devlj4 font/devlbp' (for ASCII) or
121 # empty (for EBCDIC).
124 # `PSPRINT' is the command to use for printing a PostScript file,
128 # `DVIPRINT' is the command to use for printing a TeX dvi file,
129 # for example `lpr -d'.
132 # Prefix for names of programs that have Unix counterparts.
133 # For example, if `g' is `g' then troff will be installed as
134 # gtroff. This doesn't affect programs like grops or groff that have
135 # no Unix counterparts. Note that the groff versions of eqn and tbl
136 # will not work with Unix troff.
140 # Common prefix for installation directories.
141 # Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
142 # This must already exist when you do make install.
145 # `bindir' says where to install executables.
148 # `libdir' says where to install platform-dependent data.
151 # `libprogramdir' is $(libdir)/groff
153 # `datasubdir' says where to install platform-independent data files.
156 dataprogramdir=$(datadir)/groff
157 datasubdir=$(dataprogramdir)/$(SHORT_VERSION)
160 # `infodir' says where to install info files.
163 # `docdir' says where to install documentation files. The default
164 # location is ${datarootdir}/doc/${PACKAGE}, but we add the version
165 docdir=$(datarootdir)/doc/${PACKAGE}-$(SHORT_VERSION)
167 # `exampledir' says where to install example files.
168 exampledir=$(docdir)/examples
170 # `htmldocdir' says where to install documentation in HTML format.
171 htmldocdir=$(docdir)/html
173 # `pdfdocdir' says where to install documentation in PDF format.
174 pdfdocdir=$(docdir)/pdf
176 # `fontdir' says where to install dev*/*.
177 fontdir=$(datasubdir)/font
179 # `oldfontdir' says where to install old font sets (as dev*/*).
180 oldfontdir=$(datasubdir)/oldfont
182 # `localfontdir' says where local fonts will be installed (as dev*/*).
183 localfontdir=$(dataprogramdir)/site-font
185 # `legacyfontdir' is for compatibility with non-GNU troff.
186 legacyfontdir=/usr/lib/font
188 # `fontpath' says where to look for dev*/*.
189 fontpath=$(localfontdir)$(RT_SEP)$(fontdir)$(RT_SEP)$(legacyfontdir)
191 # `tmacdir' says where to install macros.
192 tmacdir=$(datasubdir)/tmac
194 # `systemtmacdir' says where to install platform-dependent macros.
195 systemtmacdir=$(libprogramdir)/site-tmac
197 # `localtmacdir' says where local files will be installed.
198 localtmacdir=$(dataprogramdir)/site-tmac
201 # `appresdir' says where to install the application resource file for
209 # `tmacpath' says where to look for macro files.
210 # The current directory will be prepended in unsafe mode only; the home
211 # directory will be always added.
212 # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the
213 # current nor in the home directory.
214 tmacpath=$(systemtmacdir)$(RT_SEP)$(localtmacdir)$(RT_SEP)$(tmacdir)
217 # `sys_tmac_prefix' is prefix (if any) for system macro packages.
220 # `pnmtops_nosetpage' is the command to be run to generate an eps
221 # file. Some versions of pnmtops provide the -nosetpage option.
222 # We detect this and use it if present.
225 # `tmac_wrap' is list of system macro packages that should be made
226 # available to groff by creating a corresponding macro package
227 # in the groff macro directory that references the system macro
230 # compatibility_wrappers
231 # (groff compatibility wrappers for vendor-provided non-GNU macro sets)
233 # `compatibility_wrappers' controls the creation and installation of
234 # compatibility wrappers for the macro sets named in `tmac_wrap'.
235 # Its value must be one of:
236 # `yes' install compatibility wrappers as the original macro set name
237 # (that is, the default implementation of that macro set), and
238 # install the groff implementation with a prefix (usually g).
239 # `no' do not install compatibility wrappers; only install the groff
240 # implementation of each macro set.
241 # `manual' install the compatibility wrappers as `<macro>-os' and install
242 # the groff implementation of each macro set as the default
243 # implementation of that macro set.
245 # Don't make this empty.
246 wrapper_suffix_default="-os"
248 wrapper_suffix=`if test $(compatibility_wrappers) = manual; then echo $(wrapper_suffix_default); fi`
250 # When `compatibility_wrappers' is `yes', if there is a groff implementation
251 # of a macro set listed in $(tmac_wrap), then the groff implementation will be
252 # installed with a prefix of $(tmac_prefix) via the collision detection
253 # variables $(tmac_m_prefix), $(tmac_s_prefix), and $(tmac_an_prefix).
255 # Don't make this empty.
258 # The groff -mm macros will be available as -m$(tmac_m_prefix)m.
260 `if test $(compatibility_wrappers) = yes; then \
261 for i in $(tmac_wrap) ""; do \
262 case "$$i" in m) echo $(tmac_prefix);; esac; \
266 # The groff -ms macros will be available as -m$(tmac_s_prefix)s.
268 `if test $(compatibility_wrappers) = yes; then \
269 for i in $(tmac_wrap) ""; do \
270 case "$$i" in s) echo $(tmac_prefix);; esac; \
274 # The groff -man macros will be available as -m$(tmac_an_prefix)an.
276 `if test $(compatibility_wrappers) = yes; then \
277 for i in $(tmac_wrap) ""; do \
278 case "$$i" in an) echo $(tmac_prefix);; esac; \
282 # Extension to be used for refer index files. Index files are not
283 # sharable between different architectures, so you might want to use
284 # different suffixes for different architectures. Choose an extension
285 # that doesn't conflict with refer or any other indexing program.
288 # Directory containing the default index for refer.
289 indexdir=/usr/dict/papers
291 # The filename (without suffix) of the default index for refer.
294 # common_words_file is a file containing a list of common words.
295 # If your system provides /usr/lib/eign it will be copied onto this,
296 # otherwise the supplied eign file will be used.
297 common_words_file=$(datasubdir)/eign
300 # `manroot' is the root of the man page directory tree.
303 # `man1ext' is the man section for user commands.
305 man1dir=$(manroot)/man$(man1ext)
307 # `man5ext' is the man section for file formats.
309 man5dir=$(manroot)/man$(man5ext)
311 # `man7ext' is the man section for macros.
313 man7dir=$(manroot)/man$(man7ext)
316 # `dist' target is disallowed in some `configure' combinations.
318 # The configure script checks whether the user wants the info documentation.
319 # For the repo version this mechanism also suppresses building via `makeinfo'.
321 # make_install_infodoc
322 # make_uninstall_infodoc
324 # The configure script checks whether all necessary utility programs for
325 # grohtml are available -- only then we can build the HTML documentation.
327 # make_install_htmldoc
328 # make_uninstall_htmldoc
331 # make_install_htmlexamples
332 # make_uninstall_htmlexamples
334 # The configure script also checks whether all necessary utility programs
335 # for pdfroff are available -- only then we can build PDF documentation.
337 # make_install_pdfdoc
338 # make_uninstall_pdfdoc
341 # make_install_pdfexamples
342 # make_uninstall_pdfexamples
344 # `other' documentation, e.g., `meref.me' and `pic.ms', as well as their
345 # generated counterparts..
347 # make_install_otherdoc
348 # make_uninstall_otherdoc
350 # `examples' -- a generic switch, but the generated examples are furtherly
351 # subdivided to catch HTML and PDF production availability.
353 # make_install_examples
354 # make_uninstall_examples
356 # Windows `.cmd' files
358 # make_install_winscripts
359 # make_uninstall_winscripts
361 # All the previous installation directories, when used, are prefixed with
362 # $(DESTDIR) during install and uninstall, to support staged installations.
364 # config.h might set the following defines:
366 # WORDS_BIGENDIAN if your target platform is big-endian
367 # IS_EBCDIC_HOST if the host's encoding is EBCDIC
369 # HAVE_DIRECT_H if you have <direct.h>
370 # HAVE_DIRENT_H if you have <dirent.h>
371 # HAVE_CC_INTTYPES_H if you have a C++ <inttypes.h>
372 # HAVE_PROCESS_H if you have <process.h>
373 # HAVE_LIMITS_H if you have <limits.h>
374 # HAVE_CC_LIMITS_H if you have a C++ <limits.h>
375 # HAVE_MATH_H if you have <math.h>
376 # HAVE_CC_OSFCN_H if you have a C++ <osfcn.h>
377 # HAVE_STDDEF_H if you have <stddef.h>
378 # HAVE_STDLIB_H if you have <stdlib.h>
379 # HAVE_STRING_H if you have <string.h>
380 # HAVE_STRINGS_H if you have <strings.h>
381 # HAVE_SYS_DIR_H if you have <sys/dir.h>
382 # HAVE_SYS_PARAM_H if you have <sys/param.h>
383 # HAVE_SYS_STAT_H if you have <sys/stat.h>
384 # HAVE_SYS_TIME_H if you have <sys/time.h>
385 # HAVE_SYS_TYPES_H if you have <sys/types.h>
386 # HAVE_UNISTD_H if you have <unistd.h>
388 # HAVE_FMOD if you have fmod()
389 # HAVE_GETCWD if you have getcwd()
390 # HAVE_GETTIMEOFDAY if you have gettimeofday()
391 # HAVE_ICONV if you have iconv()
392 # HAVE_ISATTY if you have isatty()
393 # HAVE_KILL if you have kill()
394 # HAVE_LANGINFO_CODESET if you have nl_langinfo()
395 # HAVE_MKSTEMP if you have mkstemp()
396 # HAVE_MMAP if you have mmap()
397 # HAVE_PUTENV if you have putenv()
398 # HAVE_RENAME if you have rename()
399 # HAVE_SETLOCALE if you have setlocale()
400 # HAVE_STRCASECMP if you have strcasecmp()
401 # HAVE_STRNCASECMP if you have strncasecmp()
402 # HAVE_STRERROR if you have strerror()
403 # HAVE_STRSEP if you have strsep()
404 # HAVE_STRTOL if you have strtol()
405 # HAVE_SYMLINK if you have symlink()
407 # NEED_DECLARATION_GETTIMEOFTODAY
408 # if your C++ <sys/time.h> doesn't declare
410 # NEED_DECLARATION_HYPOT if your C++ <math.h> doesn't declare hypot()
411 # NEED_DECLARATION_PCLOSE if your C++ <stdio.h> doesn't declare pclose()
412 # NEED_DECLARATION_POPEN if your C++ <stdio.h> doesn't declare popen()
413 # NEED_DECLARATION_PUTENV if your C++ <stdlib.h> doesn't declare
415 # NEED_DECLARATION_RAND if your C++ <stdlib.h> doesn't declare rand()
416 # NEED_DECLARATION_SRAND if your C++ <stdlib.h> doesn't declare srand()
417 # NEED_DECLARATION_STRCASECMP if your C++ <string.h> doesn't declare
419 # NEED_DECLARATION_STRNCASECMP
420 # if your C++ <string.h> doesn't declare
422 # NEED_DECLARATION_VFPRINTF if your C++ <stdio.h> doesn't declare
425 # HAVE_DECL_GETC_UNLOCKED if you have getc_unlocked()
426 # HAVE_DECL_SYS_SIGLIST if you have sys_siglist[]
428 # HAVE_STRUCT_EXCEPTION if <math.h> defines struct exception
429 # HAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h>
430 # HAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or
432 # ICONV_CONST=const if declaration of iconv() needs const
433 # LONG_FOR_TIME_T if localtime() takes a long * not a time_t *
434 # RETSIGTYPE=int if signal handlers return int not void
435 # RET_TYPE_SRAND_IS_VOID if srand() returns void not int
437 # WCOREFLAG=0200 if the 0200 bit of the status returned by
438 # wait() indicates whether a core image was
439 # produced for a process that was terminated
442 # HAVE_WORKING_O_NOATIME define if <fcntl.h>'s O_NOATIME flag works
443 # HAVE_WORKING_O_NOFOLLOW define if <fcntl.h>'s O_NOFOLLOW flag works
445 # uintmax_t=<value> define to `unsigned long' or `unsigned long
446 # long' if <inttypes.h> does not exist
448 # TRADITIONAL_CPP if your C++ compiler uses a traditional
449 # (Reiser) preprocessor
450 # ARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []'
452 # PAGE=A4 if the printer's page size is A4
453 # GHOSTSCRIPT=gs the name (and directory if required) of the
454 # ghostscript program
458 # {fmod,getcwd,mkstemp,putenv,strcasecmp,
459 # strerror,strncasecmp,strtol}.$(OBJEXT)
462 # in LIBOBJS if your C library is missing the corresponding function.
464 # `CCC' is the compiler for C++ (.cpp) files.
500 # Flag that tells etags to assume C++.
505 # Sed command with which to edit sh scripts.
507 # Sed script to deal with OS dependencies in sh scripts.
508 SH_DEPS_SED_SCRIPT=$(top_builddir)/shdeps.sed
510 # On some platforms we need to set LANG and LC_ALL to C for sed
516 # The program to create directory hierarchies.
517 # mkinstalldirs is now in gnulib/build-aux
521 #PURIFYCCFLAGS=-g++=yes \
522 # -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
524 # Add groff and gnulib m4 macros
525 ACLOCAL_AMFLAGS = -I m4 -I gnulib_m4
527 # Common preprocessor flags: gnulib includes, common includes in
528 # src/include, and config.h that is generated in the build tree
530 -I$(top_srcdir)/src/include \
531 -I$(top_srcdir)/lib \
532 -I$(top_builddir)/src/include \
533 -I$(top_builddir)/lib
535 # Define a custom string for rules that call groff in make's silence mode.
536 GROFF_V = $(GROFF_V_@AM_V@)
537 GROFF_V_ = $(GROFF_V_@AM_DEFAULT_V@)
538 GROFF_V_0 = @echo " GROFF " $@;
540 # The following Automake variables will be overloaded by the various
543 nobase_bin_PROGRAMS =
551 # gnulib asks to include this file
552 EXTRA_DIST = gnulib_m4/gnulib-cache.m4
564 # tests launched by make check
568 AM_TESTS_ENVIRONMENT = \
569 abs_top_srcdir=$(abs_top_srcdir) \
570 abs_top_builddir=$(abs_top_builddir) \
571 export abs_top_srcdir abs_top_builddir;
573 # We use Automake's Uniform Naming Scheme.
575 # prefixexecbin_PROGRAMS is the list of programs that may have a
576 # NAMEPREFIX if an existing non-GNU troff system was detected.
578 # This is done by the m4 macro GROFF_G that checks for the presence of
579 # GNU Troff built-in \n[.g] macro. If a Unix Troff binary was
580 # detected, the following programs and scripts names will have a 'g'
581 # prefix: chem, tbl, eqn, neqn, pic, soleimm grn, refer, lookbib,
582 # troff, nroff. Also, PROG_PREFIX will be set to 'g' in the generated
583 # header defs.h so that these programs could be called correctly.
585 # prefixexecbindir is used to temporary install these programs. They
586 # are then moved to bindir during the install-exec-hook. Same thing
589 prefixexecbin_PROGRAMS =
590 prefixexecbin_SCRIPTS =
592 # We use datadir because the uninstall rule for the PROGRAMS attempt
593 # to cd into prefixexecbindir, and thus if prefixexecbindir is removed
594 # two consecutive uninstall would fail
595 prefixexecbindir = $(datadir)
597 prefixexecbindir = $(bindir)
600 # Path to binaries and flags used by contribs and doc to generated doc.
601 # These may be overridden if cross-compiling.
602 GROFFBIN = $(abs_top_builddir)/groff
603 GROFF_BIN_PATH = $(abs_top_builddir)
604 PDFMOMBIN = $(abs_top_builddir)/pdfmom
605 # The second directories are needed for the case "cd build; ../configure".
606 FFLAG=-F$(abs_top_builddir)/font -F$(abs_top_srcdir)/font
607 TFLAG=-M$(abs_top_builddir)/tmac -M$(abs_top_srcdir)/tmac
609 # make builtin variable RM
614 # 'VERSION' is generated by gnulib script git-version-gen, using the
615 # command 'git describe':
617 # - From a git repository: if the current commit corresponds to a
618 # tag, then 'VERSION' is simply the tag (e.g. 1.22.3). Otherwise
619 # 'VERSION' has the following format:
620 # <tag>-<nb_commits>-<commit>
623 # . tag: the most recent tag reachable from the current commit
624 # . nb_commits: number of commits between the most recent tag and
625 # the current commit.
626 # . current commit, abbreviated.
627 # For example: 1.22.3.real.434-5aafd
628 # The version is stored in .version.
630 # - From a tarball, the version is taken from .tarball-version
632 # REVISION is the full revision given by git-version-gen, which can
633 # have non-alphanumeric symbols.
635 # Also see configure.ac for the related SHORT_VERSION macro.
637 MAJOR_VERSION = `echo $(VERSION) | cut -d . -f 1`
638 MINOR_VERSION = `echo $(VERSION) | cut -d . -f 2`
639 REVISION = `echo $(VERSION) | cut -d . -f 3`
641 # Non-recursive makefile system. See Automake manual '7.3 An
642 # Alternative Approach to Subdirectories'. We use a single Makefile.am
643 # that includes other .am files, rather than using SUBDIRS. Note that
644 # relative paths in the following .am files are relative to the top
647 include $(top_srcdir)/lib/gnulib.mk
648 include $(top_srcdir)/arch/mingw/mingw.am
649 include $(top_srcdir)/arch/misc/misc.am
650 include $(top_srcdir)/contrib/chem/chem.am
651 include $(top_srcdir)/contrib/eqn2graph/eqn2graph.am
652 include $(top_srcdir)/contrib/gdiffmk/gdiffmk.am
653 include $(top_srcdir)/contrib/glilypond/glilypond.am
654 include $(top_srcdir)/contrib/gperl/gperl.am
655 include $(top_srcdir)/contrib/gpinyin/gpinyin.am
656 include $(top_srcdir)/contrib/grap2graph/grap2graph.am
657 include $(top_srcdir)/contrib/groff_filenames/groff_filenames.am
658 include $(top_srcdir)/contrib/groffer/groffer.am
659 include $(top_srcdir)/contrib/hdtbl/hdtbl.am
660 include $(top_srcdir)/contrib/mm/mm.am
661 include $(top_srcdir)/contrib/mom/mom.am
662 include $(top_srcdir)/contrib/pdfmark/pdfmark.am
663 include $(top_srcdir)/contrib/pic2graph/pic2graph.am
664 include $(top_srcdir)/doc/doc.am
665 include $(top_srcdir)/font/devX100/devX100.am
666 include $(top_srcdir)/font/devX100-12/devX100-12.am
667 include $(top_srcdir)/font/devX75/devX75.am
668 include $(top_srcdir)/font/devX75-12/devX75-12.am
669 include $(top_srcdir)/font/devascii/devascii.am
670 include $(top_srcdir)/font/devcp1047/devcp1047.am
671 include $(top_srcdir)/font/devdvi/devdvi.am
672 include $(top_srcdir)/font/devhtml/devhtml.am
673 include $(top_srcdir)/font/devlatin1/devlatin1.am
674 include $(top_srcdir)/font/devlbp/devlbp.am
675 include $(top_srcdir)/font/devlj4/devlj4.am
676 include $(top_srcdir)/font/devpdf/devpdf.am
677 include $(top_srcdir)/font/devps/devps.am
678 include $(top_srcdir)/font/devutf8/devutf8.am
679 include $(top_srcdir)/font/scripts/scripts.am
680 include $(top_srcdir)/man/man.am
681 include $(top_srcdir)/src/include/include.am
682 include $(top_srcdir)/src/libs/libbib/libbib.am
683 include $(top_srcdir)/src/libs/libdriver/libdriver.am
684 include $(top_srcdir)/src/libs/libgroff/libgroff.am
685 include $(top_srcdir)/src/libs/libxutil/libxutil.am
686 include $(top_srcdir)/src/devices/grodvi/grodvi.am
687 include $(top_srcdir)/src/devices/grohtml/grohtml.am
688 include $(top_srcdir)/src/devices/grolbp/grolbp.am
689 include $(top_srcdir)/src/devices/grolj4/grolj4.am
690 include $(top_srcdir)/src/devices/gropdf/gropdf.am
691 include $(top_srcdir)/src/devices/grops/grops.am
692 include $(top_srcdir)/src/devices/grotty/grotty.am
693 include $(top_srcdir)/src/devices/xditview/xditview.am
694 include $(top_srcdir)/src/preproc/eqn/eqn.am
695 include $(top_srcdir)/src/preproc/grn/grn.am
696 include $(top_srcdir)/src/preproc/html/html.am
697 include $(top_srcdir)/src/preproc/pic/pic.am
698 include $(top_srcdir)/src/preproc/preconv/preconv.am
699 include $(top_srcdir)/src/preproc/refer/refer.am
700 include $(top_srcdir)/src/preproc/soelim/soelim.am
701 include $(top_srcdir)/src/preproc/tbl/tbl.am
702 include $(top_srcdir)/src/roff/groff/groff.am
703 include $(top_srcdir)/src/roff/grog/grog.am
704 include $(top_srcdir)/src/roff/nroff/nroff.am
705 include $(top_srcdir)/src/roff/troff/troff.am
706 include $(top_srcdir)/src/utils/addftinfo/addftinfo.am
707 include $(top_srcdir)/src/utils/afmtodit/afmtodit.am
708 include $(top_srcdir)/src/utils/hpftodit/hpftodit.am
709 include $(top_srcdir)/src/utils/indxbib/indxbib.am
710 include $(top_srcdir)/src/utils/lkbib/lkbib.am
711 include $(top_srcdir)/src/utils/lookbib/lookbib.am
712 include $(top_srcdir)/src/utils/pfbtops/pfbtops.am
713 include $(top_srcdir)/src/utils/tfmtodit/tfmtodit.am
714 include $(top_srcdir)/src/utils/xtotroff/xtotroff.am
715 include $(top_srcdir)/tmac/tmac.am
717 # Adding defs.h to BUILT_SOURCES will ensure that it will be built on
718 # make all or make check before all other targets. However, if another
719 # target is built from a clean build tree, (for example make groff)
720 # the files in BUILT_SOURCES will not be built first. That is why
721 # additional dependencies where added in the .am files that lists
722 # objects that use defs (for exmaple in groff.am:
723 # src/roff/groff/groff.$(OBJEXT): defs.h)
724 BUILT_SOURCES += defs.h
726 # Force generation of test-groff even though we don't ship it.
727 BUILT_SOURCES += test-groff
729 # if there is a name prefix we install the man pages by hand
730 all: generate_man_files
731 install-data-hook: install-prefix-man
732 uninstall-hook: uninstall-prefix-man
734 generate_man_files: $(PREFIXMAN1)
736 for f in $(PREFIXMAN1); do \
737 cp -f $$f $(DESTDIR)$(man1dir)/$(NAMEPREFIX)`basename $$f`; \
739 uninstall-prefix-man:
740 for f in $(PREFIXMAN1); do \
741 rm -f $(DESTDIR)$(man1dir)/$(NAMEPREFIX)`basename $$f`; \
744 man1_MANS += $(PREFIXMAN1)
746 uninstall-prefix-man:
750 # Hook to create the 'current' symlink
751 install-data-hook: create_current_symlink
752 create_current_symlink:
753 cd $(DESTDIR)$(dataprogramdir); \
755 $(LN_S) $(SHORT_VERSION) current
757 # Hook to move the binaries that potentially have a prefix from
758 # prefixexecbindir to bindir.
759 install-exec-hook: move_binaries_with_prefix
760 move_binaries_with_prefix:
762 if test -n "$(NAMEPREFIX)"; then \
763 for f in $(prefixexecbin_PROGRAMS) $(prefixexecbin_SCRIPTS); do \
764 mv -f $(DESTDIR)$(prefixexecbindir)/$$f$(EXEEXT) \
765 $(DESTDIR)$(bindir)/$(NAMEPREFIX)$$f$(EXEEXT); \
770 # Always create the site-font directory as a guide to the user.
771 install-data-hook: install_site_font
773 -test -d $(DESTDIR)$(localfontdir) \
774 || $(mkinstalldirs) $(DESTDIR)$(localfontdir)
776 # Create systemtmacdir if not present
777 install-data-hook: install_tmacdir
779 -test -d $(DESTDIR)$(systemtmacdir) \
780 || $(mkinstalldirs) $(DESTDIR)$(systemtmacdir)
782 # directories specific to groff
783 uninstall-hook: uninstall_groffdirs
785 if test -d $(DESTDIR)$(datasubdir); then \
786 rm -rf $(DESTDIR)$(fontdir); \
787 rm -rf $(DESTDIR)$(oldfontdir); \
788 rmdir $(DESTDIR)$(datasubdir); \
790 if test -d $(DESTDIR)$(dataprogramdir); then \
791 if test -h $(DESTDIR)$(dataprogramdir)/current; then \
792 rm -f $(DESTDIR)$(dataprogramdir)/current; \
794 if test -d $(DESTDIR)$(localfontdir); then \
795 rm -f $(DESTDIR)$(localfontdir)/*; \
796 rmdir $(DESTDIR)$(localfontdir); \
798 rmdir $(DESTDIR)$(dataprogramdir); \
800 if test -d $(DESTDIR)$(grog_dir); then \
801 rmdir $(DESTDIR)$(grog_dir); \
803 if test -d $(DESTDIR)$(libprogramdir); then \
804 if test -d $(DESTDIR)$(systemtmacdir); then \
805 rm -f $(DESTDIR)$(systemtmacdir)/*; \
806 rmdir $(DESTDIR)$(systemtmacdir); \
808 rmdir $(DESTDIR)$(libprogramdir); \
810 if test -d $(DESTDIR)$(docdir); then \
811 if test -d $(DESTDIR)$(exampledir); then \
812 rmdir $(DESTDIR)$(exampledir); \
814 if test -d $(DESTDIR)$(htmldocdir); then \
815 rmdir $(DESTDIR)$(htmldocdir); \
817 rmdir $(DESTDIR)$(docdir); \
820 # Uninstall program that have a 'g' prefix
821 uninstall-hook: uninstall_binaries_with_prefix
822 uninstall_binaries_with_prefix:
824 if test -n "$(NAMEPREFIX)"; then \
825 for f in $(prefixexecbin_PROGRAMS) $(prefixexecbin_SCRIPTS); do \
826 rm -f $(DESTDIR)$(bindir)/$(NAMEPREFIX)$$f$(EXEEXT); \
831 # Other files that should be present in the distribution tarball.
854 font/util/make-Rproto \
857 MOSTLYCLEANFILES += $(prefixexecbin_SCRIPTS) $(bin_SCRIPTS) \
858 $(man1_MANS) $(man5_MANS) $(man7_MANS) \
862 # Suffix rule to build .1, .5 and .7 files from .1.man, .5.man and
863 # .7.man files. The brackets around the @ are used to prevent the
864 # substitution of the variable by automake.
866 # The sed script transforms - to \-, ~ to \(ti, and so forth, (with an
867 # extra layer of backslashes--see below) so that Makefile variables
868 # containing ASCII characters that do not represent themselves literally
869 # in *roff (see groff_char(7)) are correctly interpolated into man page
872 # Note that while the script, combined with this target, will transform
873 # ` to \(ga, including grave accents in Makefile variables is likely to
874 # fail when the shell lexes the argument to echo within the old-style
875 # command substitution `` below. Testing shows that grave accents
876 # should work* if POSIX-style command substitution $() is done instead.
877 # However, $() is less portable. (Triple-escaping grave accents \\\`
878 # inside the interpolated Makefile variable will work, but is not
881 # Note also that the amount of backslash-escaping in the sed script is
882 # excessive (and incorrect) for normal purposes, but required here
883 # because a command substitution is being nested inside yet another
886 # * For this target; no assurances about the good behavior of unusual
887 # characters in Makefile variables in other aspects of the groff build
889 makevarescape=$(top_srcdir)/makevarescape.sed
893 $(AM_V_GEN)rm -f $@ \
894 && $(MKDIR_P) `dirname $@` \
896 sed -e "s|[@]APPRESDIR[@]|`echo $(appresdir) | sed -f $(makevarescape)`|g" \
897 -e "s|[@]BINDIR[@]|`echo $(bindir) | sed -f $(makevarescape)`|g" \
898 -e "s|[@]COMMON_WORDS_FILE[@]|`echo $(common_words_file) | sed -f $(makevarescape)`|g" \
899 -e "s|[@]DATASUBDIR[@]|`echo $(datasubdir) | sed -f $(makevarescape)`|g" \
900 -e "s|[@]DEFAULT_INDEX[@]|`echo $(indexdir)/$(indexname) | sed -f $(makevarescape)`|g" \
901 -e "s|[@]DEFAULT_INDEX_NAME[@]|`echo $(indexname) | sed -f $(makevarescape)`|g" \
902 -e "s|[@]DEVICE[@]|$(DEVICE)|g" \
903 -e "s|[@]DOCDIR[@]|`echo $(docdir) | sed -f $(makevarescape)`|g" \
904 -e "s|[@]EXAMPLEDIR[@]|`echo $(exampledir) | sed -f $(makevarescape)`|g" \
905 -e "s|[@]FONTDIR[@]|`echo $(fontdir) | sed -f $(makevarescape)`|g" \
906 -e "s|[@]g[@]|$(g)|g" \
907 -e "s![@]G[@]!`echo $(g) | tr '[a-z]' '[A-Z]'`!g" \
908 -e "s|[@]HTMLDOCDIR[@]|`echo $(htmldocdir) | sed -f $(makevarescape)`|g" \
909 -e "s|[@]INDEX_SUFFIX[@]|$(indexext)|g" \
910 -e "s|[@]LEGACYFONTDIR[@]|`echo $(legacyfontdir) | sed -f $(makevarescape)`|g" \
911 -e "s|[@]LOCALFONTDIR[@]|`echo $(localfontdir) | sed -f $(makevarescape)`|g" \
912 -e "s|[@]LOCALMACRODIR[@]|`echo $(localtmacdir) | sed -f $(makevarescape)`|g" \
913 -e "s|[@]MACRODIR[@]|`echo $(tmacdir) | sed -f $(makevarescape)`|g" \
914 -e "s|[@]MAN1EXT[@]|$(man1ext)|g" \
915 -e "s|[@]MAN5EXT[@]|$(man5ext)|g" \
916 -e "s|[@]MAN7EXT[@]|$(man7ext)|g" \
917 -e "s|[@]MDATE[@]|`$(PERL) $(top_srcdir)/mdate.pl $<`|g" \
918 -e "s|[@]OLDFONTDIR[@]|`echo $(oldfontdir) | sed -f $(makevarescape)`|g" \
919 -e "s|[@]PDFDOCDIR[@]|`echo $(pdfdocdir) | sed -f $(makevarescape)`|g" \
920 -e "s|[@]SYSTEMMACRODIR[@]|`echo $(systemtmacdir) | sed -f $(makevarescape)`|g" \
921 -e "s|[@]TMAC_AN_PREFIX[@]|$(tmac_an_prefix)|g" \
922 -e "s|[@]TMAC_M_PREFIX[@]|$(tmac_m_prefix)|g" \
923 -e "s|[@]TMAC_MDIR[@]|$(tmacdir)/mm|g" \
924 -e "s|[@]TMAC_S_PREFIX[@]|$(tmac_s_prefix)|g" \
925 -e "s|[@]VERSION[@]|$(VERSION)|g" \
929 # Version files - see script 'build-aux/git-gen-version'
930 EXTRA_DIST += $(top_srcdir)/.version
931 BUILT_SOURCES += $(top_srcdir)/.version
932 $(top_srcdir)/.version:
933 echo $(VERSION) > $@-t && mv $@-t $@
935 echo $(VERSION) > $(distdir)/.tarball-version
937 ########################################################################
940 # mode: makefile-automake