packaging: improve spec file
[platform/upstream/groff.git] / Makefile.in
1 # Copyright (C) 1989-2006, 2009-2013
2 #   Free Software Foundation, Inc.
3 #      Written by James Clark (jjc@jclark.com)
4
5 # This file is part of groff.
6
7 # groff is free software; you can redistribute it and/or modify it under
8 # the terms of the GNU General Public License as published by the Free
9 # Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11
12 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 # for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #
20 # Makefile.in
21 #
22 SHELL=@SHELL@
23
24 PACKAGE_TARNAME=@PACKAGE_TARNAME@
25
26 srcdir=@srcdir@
27 top_srcdir=@abs_top_srcdir@
28 VPATH=@srcdir@
29 top_builddir=@abs_top_builddir@
30
31 # `HOST' is the canonical host specification,
32 #    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
33 # or
34 #    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
35 HOST=@host@
36
37 # `RT_SEP' is the operating system's native PATH SEPARATOR CHAR, which
38 # is to be used in runtime PATHs compiled into groff executables.
39 RT_SEP=@GROFF_PATH_SEPARATOR@
40
41 # `SH_SEP' is a alternative PATH SEPARATOR CHAR, to be used in shell
42 # scripts and makefile rules; it may be the same as `RT_SEP', but,
43 # particularly in some Microsoft environments, it may differ.
44 SH_SEP=@PATH_SEPARATOR@
45
46 # `GLIBC21' is yes if the host operating system uses GNU libc 2.1 or newer,
47 # otherwise no.
48 GLIBC21=@GLIBC21@
49
50 version=`cat $(top_srcdir)/VERSION`
51 # No additional number if revision is zero.
52 revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
53
54 # Define `page' to be letter if your PostScript printer uses 8.5x11
55 # paper (USA) and define it to be A4, if it uses A4 paper (rest of the
56 # world).
57 PAGE=@PAGE@
58
59 # The name of the ghostscript program. Normally, gs, on GNU/Linux
60 # but it might be different on MS-DOS/MS-WIN32 systems.
61 GHOSTSCRIPT=@GHOSTSCRIPT@
62
63 # `ALT_GHOSTSCRIPT_PROGS' specifies a list alternative names,
64 # which can be tried if `GHOSTSCRIPT' cannot be found at run time.
65 ALT_GHOSTSCRIPT_PROGS=@ALT_GHOSTSCRIPT_PROGS@
66
67 # Similarly, `ALT_AWK_PROGS' specifies a list of alternative names,
68 # which can be tried at run time, to identify the awk program.
69 ALT_AWK_PROGS=@ALT_AWK_PROGS@
70
71 # Normally the Postscript driver, grops, produces output that conforms
72 # to version 3.0 of the Adobe Document Structuring Conventions.
73 # Unfortunately some spoolers and previewers can't handle such output.
74 # The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
75 # make its output acceptable to such programs.  This variable controls
76 # only the default behaviour of grops; the behaviour can be changed at
77 # runtime by the grops -b option (and so by groff -P-b).
78 # Use a value of 0 if your spoolers and previewers are able to handle
79 # conforming PostScript correctly.
80 # Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
81 # this is needed for early versions of TranScript that get confused by
82 # anything between the %%EndProlog line and the first %%Page: comment.
83 # Add 2 if lines in included files beginning with %! should be
84 # stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
85 # Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
86 # stripped out of included files; this is needed for spoolers that
87 # don't understand the %%{Begin,End}Document comments. I suspect this
88 # includes early versions of TranScript.
89 # Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
90 # rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
91 # with a printer that requires page reversal.
92 BROKEN_SPOOLER_FLAGS=@BROKEN_SPOOLER_FLAGS@
93
94 # `DEVICE' is the default device.
95 DEVICE=ps
96
97 # `XDEVDIRS' is either `font/devX{75,100}{,-12}' or empty.
98 XDEVDIRS=@XDEVDIRS@
99
100 # `XPROGDIRS' is either `src/devices/xditview src/utils/xtotroff' or empty.
101 XPROGDIRS=@XPROGDIRS@
102
103 # `XLIBDIRS' is either `src/libs/libxutil' or empty.
104 XLIBDIRS=@XLIBDIRS@
105
106 # `TTYDEVDIRS' is either `font/devascii font/devlatin1' (for
107 # ASCII) or `font/devcp1047' (for EBCDIC) plus font/devutf8.
108 TTYDEVDIRS=@TTYDEVDIRS@ font/devutf8
109
110 # `OTHERDEVDIRS' is either `font/devlj4 font/devlbp' (for ASCII) or
111 # empty (for EBCDIC).
112 OTHERDEVDIRS=@OTHERDEVDIRS@
113
114 # `PSPRINT' is the command to use for printing a PostScript file,
115 # for example `lpr'.
116 PSPRINT=@PSPRINT@
117
118 # `DVIPRINT' is the command to use for printing a TeX dvi file,
119 # for example `lpr -d'.
120 DVIPRINT=@DVIPRINT@
121
122 # Prefix for names of programs that have Unix counterparts.
123 # For example, if `g' is `g' then troff will be installed as
124 # gtroff.  This doesn't affect programs like grops or groff that have
125 # no Unix counterparts.  Note that the groff versions of eqn and tbl
126 # will not work with Unix troff.
127 g=@g@
128
129 # Common prefix for installation directories.
130 # Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
131 # This must already exist when you do make install.
132 prefix=@prefix@
133 exec_prefix=@exec_prefix@
134
135 # `bindir' says where to install executables.
136 bindir=@bindir@
137
138 # `libdir' says where to install platform-dependent data.
139 libdir=@libdir@
140 libprogramdir=$(libdir)/groff
141
142 # `datasubdir' says where to install platform-independent data files.
143 datadir=@datadir@
144 datarootdir=@datarootdir@
145 dataprogramdir=$(datadir)/groff
146 datasubdir=$(dataprogramdir)/$(version)$(revision)
147
148 # `infodir' says where to install info files.
149 infodir=@infodir@
150
151 # `docdir' says where to install documentation files.
152 docdir=@docdir@
153
154 # `exampledir' says where to install example files.
155 exampledir=$(docdir)/examples
156
157 # `htmldocdir' says where to install documentation in HTML format.
158 htmldocdir=$(docdir)/html
159
160 # `pdfdocdir' says where to install documentation in PDF format.
161 pdfdocdir=$(docdir)/pdf
162
163 # `fontdir' says where to install dev*/*.
164 fontdir=$(datasubdir)/font
165
166 # `oldfontdir' says where to install old font sets (as dev*/*).
167 oldfontdir=$(datasubdir)/oldfont
168
169 # `localfontdir' says where local fonts will be installed (as dev*/*).
170 localfontdir=$(dataprogramdir)/site-font
171
172 # `legacyfontdir' is for compatibility with non-GNU troff.
173 legacyfontdir=/usr/lib/font
174
175 # `fontpath' says where to look for dev*/*.
176 fontpath=$(localfontdir)$(RT_SEP)$(fontdir)$(RT_SEP)$(legacyfontdir)
177
178 # `tmacdir' says where to install macros.
179 tmacdir=$(datasubdir)/tmac
180
181 # `systemtmacdir' says where to install platform-dependent macros.
182 systemtmacdir=$(libprogramdir)/site-tmac
183
184 # `localtmacdir' says where local files will be installed.
185 localtmacdir=$(dataprogramdir)/site-tmac
186
187 # `appresdir' says where to install the application resource file for
188 # gxditview.
189 appresdir=@appresdir@
190
191 groffer_dir=@groffer_dir@
192
193 # `tmacpath' says where to look for macro files.
194 # The current directory will be prepended in unsafe mode only; the home
195 # directory will be always added.
196 # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the
197 # current nor in the home directory.
198 tmacpath=$(systemtmacdir)$(RT_SEP)$(localtmacdir)$(RT_SEP)$(tmacdir)
199
200 # `sys_tmac_prefix' is prefix (if any) for system macro packages.
201 sys_tmac_prefix=@sys_tmac_prefix@
202
203 # `pnmtops_nosetpage' is the command to be run to generate an eps
204 # file.  Some versions of pnmtops provide the -nosetpage option.
205 # We detect this and use it if present.
206 pnmtops_nosetpage=@pnmtops_nosetpage@
207
208 # `tmac_wrap' is list of system macro packages that should be made
209 # available to groff by creating a corresponding macro package
210 # in the groff macro directory that references the system macro
211 # package.
212 tmac_wrap=@tmac_wrap@
213
214 # If there is a groff version of a macro package listed in $(tmac_wrap),
215 # then the groff version will be installed with a prefix of this.
216 # Don't make this empty.
217 tmac_prefix=g
218
219 # The groff -mm macros will be available as -m$(tmac_m_prefix)m.
220 tmac_m_prefix=\
221  `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
222 # The groff -ms macros will be available as -m$(tmac_s_prefix)s.
223 tmac_s_prefix=\
224  `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
225 # The groff -man macros will be available as -m$(tmac_an_prefix)an.
226 tmac_an_prefix=\
227  `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`
228
229 # Extension to be used for refer index files.  Index files are not
230 # sharable between different architectures, so you might want to use
231 # different suffixes for different architectures.  Choose an extension
232 # that doesn't conflict with refer or any other indexing program.
233 indexext=.i
234
235 # Directory containing the default index for refer.
236 indexdir=/usr/dict/papers
237
238 # The filename (without suffix) of the default index for refer.
239 indexname=Ind
240
241 # common_words_file is a file containing a list of common words.
242 # If your system provides /usr/lib/eign it will be copied onto this,
243 # otherwise the supplied eign file will be used.
244 common_words_file=$(datasubdir)/eign
245
246 # `manroot' is the root of the man page directory tree.
247 mandir=@mandir@
248 manroot=$(mandir)
249
250 # `man1ext' is the man section for user commands.
251 man1ext=1
252 man1dir=$(manroot)/man$(man1ext)
253
254 # `man5ext' is the man section for file formats.
255 man5ext=5
256 man5dir=$(manroot)/man$(man5ext)
257
258 # `man7ext' is the man section for macros.
259 man7ext=7
260 man7dir=$(manroot)/man$(man7ext)
261
262 # The configure script checks whether all necessary utility programs for
263 # grohtml are available -- only then we can build the HTML documentation.
264 make_html=@make_html@
265 make_install_html=@make_install_html@
266
267 # The configure script also checks whether all necessary utility programs
268 # for pdfroff are available -- only then we can build PDF documentation.
269 make_pdfdoc=@make_pdfdoc@
270 make_install_pdfdoc=@make_install_pdfdoc@
271
272 # All the previous installation directories, when used, are prefixed with
273 # $(DESTDIR) during install and uninstall, to support staged installations.
274
275 # DEFINES should include the following:
276 #
277 # -DWORDS_BIGENDIAN             if your target platform is big-endian
278 # -DIS_EBCDIC_HOST              if the host's encoding is EBCDIC
279 #
280 # -DHAVE_DIRECT_H               if you have <direct.h>
281 # -DHAVE_DIRENT_H               if you have <dirent.h>
282 # -DHAVE_CC_INTTYPES_H          if you have a C++ <inttypes.h>
283 # -DHAVE_PROCESS_H              if you have <process.h>
284 # -DHAVE_LIMITS_H               if you have <limits.h>
285 # -DHAVE_CC_LIMITS_H            if you have a C++ <limits.h>
286 # -DHAVE_MATH_H                 if you have <math.h>
287 # -DHAVE_CC_OSFCN_H             if you have a C++ <osfcn.h>
288 # -DHAVE_STDDEF_H               if you have <stddef.h>
289 # -DHAVE_STDLIB_H               if you have <stdlib.h>
290 # -DHAVE_STRING_H               if you have <string.h>
291 # -DHAVE_STRINGS_H              if you have <strings.h>
292 # -DHAVE_SYS_DIR_H              if you have <sys/dir.h>
293 # -DHAVE_SYS_PARAM_H            if you have <sys/param.h>
294 # -DHAVE_SYS_STAT_H             if you have <sys/stat.h>
295 # -DHAVE_SYS_TIME_H             if you have <sys/time.h>
296 # -DHAVE_SYS_TYPES_H            if you have <sys/types.h>
297 # -DHAVE_UNISTD_H               if you have <unistd.h>
298 #
299 # -DHAVE_FMOD                   if you have fmod()
300 # -DHAVE_GETCWD                 if you have getcwd()
301 # -DHAVE_GETTIMEOFDAY           if you have gettimeofday()
302 # -DHAVE_ICONV                  if you have iconv()
303 # -DHAVE_ISATTY                 if you have isatty()
304 # -DHAVE_KILL                   if you have kill()
305 # -DHAVE_LANGINFO_CODESET       if you have nl_langinfo()
306 # -DHAVE_MKSTEMP                if you have mkstemp()
307 # -DHAVE_MMAP                   if you have mmap()
308 # -DHAVE_PUTENV                 if you have putenv()
309 # -DHAVE_RENAME                 if you have rename()
310 # -DHAVE_SETLOCALE              if you have setlocale()
311 # -DHAVE_SNPRINTF               if you have snprintf()
312 # -DHAVE_STRCASECMP             if you have strcasecmp()
313 # -DHAVE_STRNCASECMP            if you have strncasecmp()
314 # -DHAVE_STRERROR               if you have strerror()
315 # -DHAVE_STRSEP                 if you have strsep()
316 # -DHAVE_STRTOL                 if you have strtol()
317 # -DHAVE_SYMLINK                if you have symlink()
318 # -DHAVE_VSNPRINTF              if you have vsnprintf()
319 #
320 # -DNEED_DECLARATION_GETTIMEOFTODAY
321 #                               if your C++ <sys/time.h> doesn't declare
322 #                               gettimeofday()
323 # -DNEED_DECLARATION_HYPOT      if your C++ <math.h> doesn't declare hypot()
324 # -DNEED_DECLARATION_PCLOSE     if your C++ <stdio.h> doesn't declare pclose()
325 # -DNEED_DECLARATION_POPEN      if your C++ <stdio.h> doesn't declare popen()
326 # -DNEED_DECLARATION_PUTENV     if your C++ <stdlib.h> doesn't declare
327 #                               putenv()
328 # -DNEED_DECLARATION_RAND       if your C++ <stdlib.h> doesn't declare rand()
329 # -DNEED_DECLARATION_SNPRINTF   if your C++ <stdio.h> doesn't declare
330 #                               snprintf()
331 # -DNEED_DECLARATION_SRAND      if your C++ <stdlib.h> doesn't declare srand()
332 # -DNEED_DECLARATION_STRCASECMP if your C++ <string.h> doesn't declare
333 #                               strcasecmp()
334 # -DNEED_DECLARATION_STRNCASECMP
335 #                               if your C++ <string.h> doesn't declare
336 #                               strncasecmp()
337 # -DNEED_DECLARATION_VFPRINTF   if your C++ <stdio.h> doesn't declare
338 #                               vfprintf()
339 # -DNEED_DECLARATION_VSNPRINTF  if your C++ <stdio.h> doesn't declare
340 #                               vsnprintf()
341 #
342 # -DHAVE_DECL_GETC_UNLOCKED     if you have getc_unlocked()
343 # -DHAVE_DECL_SYS_SIGLIST       if you have sys_siglist[]
344 #
345 # -DHAVE_STRUCT_EXCEPTION       if <math.h> defines struct exception
346 # -DHAVE_SYS_NERR               if you have sysnerr in <errno.h> or <stdio.h>
347 # -DHAVE_SYS_ERRLIST            if you have sys_errlist in <errno.h> or
348 #                               <stdio.h>
349 # -DICONV_CONST=const           if declaration of iconv() needs const
350 # -DLONG_FOR_TIME_T             if localtime() takes a long * not a time_t *
351 # -DRETSIGTYPE=int              if signal handlers return int not void  
352 # -DRET_TYPE_SRAND_IS_VOID      if srand() returns void not int
353 #
354 # -DWCOREFLAG=0200              if the 0200 bit of the status returned by
355 #                               wait() indicates whether a core image was
356 #                               produced for a process that was terminated
357 #                               by a signal
358 #
359 # -DHAVE_WORKING_O_NOATIME      define if <fcntl.h>'s O_NOATIME flag works
360 # -DHAVE_WORKING_O_NOFOLLOW     define if <fcntl.h>'s O_NOFOLLOW flag works
361 #
362 # -Duintmax_t=<value>           define to `unsigned long' or `unsigned long
363 #                               long' if <inttypes.h> does not exist
364 #
365 # -DTRADITIONAL_CPP             if your C++ compiler uses a traditional
366 #                               (Reiser) preprocessor
367 # -DARRAY_DELETE_NEEDS_SIZE     if your C++ doesn't understand `delete []'
368 #
369 # -DPAGE=A4                     if the the printer's page size is A4
370 # -DGHOSTSCRIPT=gs              the name (and directory if required) of the
371 #                               ghostscript program
372 #
373 DEFINES=@DEFS@
374
375 # Include
376 #
377 #   {fmod,getcwd,mkstemp,putenv,snprintf,strcasecmp,
378 #    strerror,strncasecmp,strtol}.$(OBJEXT)
379 #
380 # in LIBOBJS if your C library is missing the corresponding function.
381 # vsnprintf is defined in the snprintf.$(OBJEXT) module.
382 LIBOBJS=@LIBOBJS@
383
384 # `CCC' is the compiler for C++ (.cpp) files.
385 CCC=@CXX@
386 CC=@CC@
387 # CCDEFINES are definitions for C++ compilations.
388 CCDEFINES=$(DEFINES)
389 # CDEFINES are definitions for C compilations.
390 CDEFINES=$(DEFINES)
391
392 CCFLAGS=@CXXFLAGS@
393 CFLAGS=@CFLAGS@
394 CPPFLAGS=@CPPFLAGS@
395 LDFLAGS=@LDFLAGS@
396
397 X_CFLAGS=@X_CFLAGS@
398 X_LIBS=@X_LIBS@
399 X_EXTRA_LIBS=@X_EXTRA_LIBS@
400 X_PRE_LIBS=@X_PRE_LIBS@
401
402 YACC=@YACC@
403 YACCFLAGS=-v
404
405 EGREP=@EGREP@
406
407 MAKEINFO=@MAKEINFO@
408
409 EXEEXT=@EXEEXT@
410 OBJEXT=@OBJEXT@
411 LIBEXT=@LIBEXT@
412 LIBS=@LIBS@
413 LIBM=@LIBM@
414 LIBICONV=@LIBICONV@
415 RANLIB=@RANLIB@
416 INSTALL=@INSTALL@
417 INSTALL_PROGRAM=@INSTALL_PROGRAM@
418 INSTALL_SCRIPT=@INSTALL_SCRIPT@
419 INSTALL_DATA=@INSTALL_DATA@
420 INSTALL_INFO=@INSTALL_INFO@
421 LN_S=@LN_S@
422 AR=ar
423 ETAGS=etags
424 ETAGSFLAGS=
425 # Flag that tells etags to assume C++.
426 ETAGSCCFLAG=-C
427 # Full path to perl.
428 PERLPATH=@PERLPATH@
429 # Sed command with which to edit sh scripts.
430 SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@
431 # Sed script to deal with OS dependencies in sh scripts.
432 SH_DEPS_SED_SCRIPT=$(top_builddir)/arch/misc/shdeps.sed
433
434 # The program to create directory hierarchies.
435 mkinstalldirs= $(SHELL) $(top_srcdir)/mkinstalldirs
436
437 PURIFY=purify
438 PURIFYCCFLAGS=
439 #PURIFYCCFLAGS=-g++=yes \
440 #  -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
441
442 # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
443 # copy of $(MDEFINES) when making individual directories; this could
444 # cause the argument list to become too long on some systems.
445 MDEFINES=\
446   "ALT_AWK_PROGS=$(ALT_AWK_PROGS)" \
447   "ALT_GHOSTSCRIPT_PROGS=$(ALT_GHOSTSCRIPT_PROGS)" \
448   "AR=$(AR)" \
449   "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
450   "CC=$(CC)" \
451   "CCC=$(CCC)" \
452   "CCDEFINES=$(CCDEFINES)" \
453   "CCFLAGS=$(CCFLAGS)" \
454   "CDEFINES=$(CDEFINES)" \
455   "CFLAGS=$(CFLAGS)" \
456   "CPPFLAGS=$(CPPFLAGS)" \
457   "DEVICE=$(DEVICE)" \
458   "DVIPRINT=$(DVIPRINT)" \
459   "EGREP=$(EGREP)" \
460   "ETAGS=$(ETAGS)" \
461   "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
462   "ETAGSFLAGS=$(ETAGSFLAGS)" \
463   "EXEEXT=$(EXEEXT)" \
464   "GLIBC21=$(GLIBC21)" \
465   "HOST=$(HOST)" \
466   "INSTALL_DATA=$(INSTALL_DATA)" \
467   "INSTALL_INFO=$(INSTALL_INFO)" \
468   "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
469   "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
470   "LDFLAGS=$(LDFLAGS)" \
471   "LIBEXT=$(LIBEXT)" \
472   "LIBICONV=$(LIBICONV)" \
473   "LIBM=$(LIBM)" \
474   "LIBOBJS=$(LIBOBJS)" \
475   "LIBS=$(LIBS)" \
476   "MAKEINFO=$(MAKEINFO)" \
477   "MAKEOVERRIDES=$(MAKEOVERRIDES)" \
478   "OBJEXT=$(OBJEXT)" \
479   "OTHERDEVDIRS=$(OTHERDEVDIRS)" \
480   "PAGE=$(PAGE)" \
481   "GHOSTSCRIPT=$(GHOSTSCRIPT)" \
482   "PERLPATH=$(PERLPATH)" \
483   "PSPRINT=$(PSPRINT)" \
484   "PURIFY=$(PURIFY)" \
485   "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" \
486   "RANLIB=$(RANLIB)" \
487   "RT_SEP=$(RT_SEP)" \
488   "SH_SEP=$(SH_SEP)" \
489   "SHELL=$(SHELL)" \
490   "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
491   "SH_DEPS_SED_SCRIPT=$(SH_DEPS_SED_SCRIPT)" \
492   "TTYDEVDIRS=$(TTYDEVDIRS)" \
493   "XDEVDIRS=$(XDEVDIRS)" \
494   "XLIBDIRS=$(XLIBDIRS)" \
495   "XPROGDIRS=$(XPROGDIRS)" \
496   "X_CFLAGS=$(X_CFLAGS)" \
497   "X_LIBS=$(X_LIBS)" \
498   "X_EXTRA_LIBS=$(X_EXTRA_LIBS)" \
499   "X_PRE_LIBS=$(X_PRE_LIBS)" \
500   "YACC=$(YACC)" \
501   "YACCFLAGS=$(YACCFLAGS)" \
502   "appresdir=$(appresdir)" \
503   "groffer_dir=$(groffer_dir)" \
504   "bindir=$(bindir)" \
505   "common_words_file=$(common_words_file)" \
506   "datadir=$(datadir)" \
507   "dataprogramdir=$(dataprogramdir)" \
508   "datasubdir=$(datasubdir)" \
509   "docdir=$(docdir)" \
510   "exampledir=$(exampledir)" \
511   "exec_prefix=$(exec_prefix)" \
512   "fontdir=$(fontdir)" \
513   "fontpath=$(fontpath)" \
514   "g=$(g)" \
515   "htmldocdir=$(htmldocdir)" \
516   "pdfdocdir=$(pdfdocdir)" \
517   "indexdir=$(indexdir)" \
518   "indexext=$(indexext)" \
519   "indexname=$(indexname)" \
520   "infodir=$(infodir)" \
521   "legacyfontdir=$(legacyfontdir)" \
522   "libdir=$(libdir)" \
523   "libprogramdir=$(libprogramdir)" \
524   "localfontdir=$(localfontdir)" \
525   "localtmacdir=$(localtmacdir)" \
526   "make_html=$(make_html)" \
527   "make_install_html=$(make_install_html)" \
528   "make_pdfdoc=$(make_pdfdoc)" \
529   "make_install_pdfdoc=$(make_install_pdfdoc)" \
530   "man1dir=$(man1dir)" \
531   "man1ext=$(man1ext)" \
532   "man5dir=$(man5dir)" \
533   "man5ext=$(man5ext)" \
534   "man7dir=$(man7dir)" \
535   "man7ext=$(man7ext)" \
536   "manroot=$(manroot)" \
537   "mkinstalldirs=$(mkinstalldirs)" \
538   "oldfontdir=$(oldfontdir)" \
539   "pnmtops_nosetpage=$(pnmtops_nosetpage)" \
540   "prefix=$(prefix)" \
541   "revision=$(revision)" \
542   "sys_tmac_prefix=$(sys_tmac_prefix)" \
543   "systemtmacdir=$(systemtmacdir)" \
544   "tmac_an_prefix=$(tmac_an_prefix)" \
545   "tmac_m_prefix=$(tmac_m_prefix)" \
546   "tmac_s_prefix=$(tmac_s_prefix)" \
547   "tmac_wrap=$(tmac_wrap)" \
548   "tmacdir=$(tmacdir)" \
549   "tmacpath=$(tmacpath)" \
550   "top_builddir=$(top_builddir)" \
551   "top_srcdir=$(top_srcdir)" \
552   "version=$(version)"
553
554 MAKE_K_FLAG=`for f in x $(MAKEFLAGS); do \
555                case $$f in \
556                  *=* | --[!k]*);; \
557                  *k*) echo ' -k ';; \
558                esac; \
559              done`
560
561
562 INCDIRS=\
563   src/include
564 LIBDIRS=\
565   src/libs/libgroff \
566   src/libs/libdriver \
567   src/libs/libbib \
568   $(XLIBDIRS)
569 CCPROGDIRS=\
570   src/roff/groff \
571   src/roff/troff \
572   src/preproc/preconv \
573   src/preproc/tbl \
574   src/preproc/pic \
575   src/preproc/eqn \
576   src/preproc/grn \
577   src/preproc/refer \
578   src/preproc/soelim \
579   src/preproc/html \
580   src/devices/grops \
581   src/devices/grotty \
582   src/devices/grodvi \
583   src/devices/grolj4 \
584   src/devices/grohtml \
585   src/devices/grolbp \
586   src/utils/tfmtodit \
587   src/utils/hpftodit \
588   src/utils/lookbib \
589   src/utils/indxbib \
590   src/utils/lkbib \
591   src/utils/addftinfo
592 CPROGDIRS=\
593   src/utils/pfbtops
594 PROGDEPDIRS=\
595   arch/misc
596 PROGDIRS=\
597   $(PROGDEPDIRS) \
598   $(CCPROGDIRS) \
599   $(CPROGDIRS) \
600   $(XPROGDIRS)
601 DEVDIRS=\
602   font/devps \
603   font/devdvi \
604   font/devhtml
605 ALLTTYDEVDIRS=\
606   font/devascii \
607   font/devlatin1 \
608   font/devutf8 \
609   font/devcp1047
610 # `doc' must be processed before `contrib/pdfmark',
611 # pdf stuff must be processed before `contrib/mom
612 OTHERDIRS=\
613   man \
614   tmac \
615   src/utils/afmtodit \
616   src/roff/grog \
617   src/roff/nroff \
618   doc \
619   contrib/mm \
620   contrib/chem \
621   contrib/pic2graph \
622   contrib/eqn2graph \
623   contrib/grap2graph \
624   contrib/groffer \
625   contrib/hdtbl \
626   contrib/pdfmark \
627   src/devices/gropdf \
628   font/devpdf \
629   contrib/mom \
630   contrib/gdiffmk
631   
632 # OTHERDIRS is handled specially in the `$(TARGETS)' rule to avoid
633 # dependency problems with parallel builds.
634 ALLDIRS=\
635   $(INCDIRS) \
636   $(LIBDIRS) \
637   $(PROGDIRS) \
638   $(DEVDIRS) \
639   $(XDEVDIRS) \
640   $(OTHERDEVDIRS) \
641   $(TTYDEVDIRS)
642 # $(OTHERDIRS)
643 EXTRADIRS=\
644   font/devps/generate \
645   font/devdvi/generate \
646   font/devlj4/generate \
647   doc
648 NOMAKEDIRS=\
649   m4 \
650   arch/djgpp \
651   contrib/chem/examples \
652   contrib/chem/examples/122 \
653   contrib/groffer/perl \
654   contrib/groffer/shell \
655   contrib/hdtbl/examples \
656   contrib/mm/examples \
657   contrib/mm/mm \
658   contrib/mom/examples \
659   contrib/mom/momdoc \
660   contrib/gdiffmk/tests \
661   src/libs/snprintf \
662   src/libs/gnulib/lib \
663   src/libs/gnulib/lib/uniwidth \
664   src/libs/gnulib/m4 \
665   src/libs/gnulib/build-aux \
666   src/libs/gnulib/build-aux/snippet \
667   src/libs/gnulib \
668   font/devps/old \
669   font/devpdf/util \
670   font/util
671 GNULIBDIRS=\
672   src/libs/gnulib
673 DISTDIRS=\
674   $(INCDIRS) \
675   $(LIBDIRS) \
676   $(PROGDIRS) \
677   $(DEVDIRS) \
678   $(XDEVDIRS) \
679   $(OTHERDEVDIRS) \
680   $(ALLTTYDEVDIRS) \
681   $(OTHERDIRS) \
682   $(EXTRADIRS) \
683   $(NOMAKEDIRS) \
684   $(GNULIBDIRS)
685 TARGETS=\
686   all \
687   install_bin install_data \
688   clean distclean mostlyclean realclean extraclean \
689   distfiles \
690   TAGS \
691   depend \
692   uninstall_sub \
693   fonts
694
695 # This ENVSETUP gork is required by the DJGPP build on Windows 9X,
696 # where Make needs to be case-sensitive to find files like BI and VERSION.
697 ENVSETUP=\
698         if test -f $(srcdir)/makefile.ccpg* && \
699            test -f $(srcdir)/Makefile.ccpg*; then \
700           FNCASE=y; export FNCASE; \
701         else :; \
702         fi
703
704 do=all
705 dodirs=$(ALLDIRS) $(OTHERDIRS) dot
706 # Default target for subdir_Makefile
707 subdir=src/roff/troff
708
709
710 $(TARGETS):
711         @$(ENVSETUP); $(MAKE) $(MAKE_K_FLAG) do=$@ $(ALLDIRS)
712         @$(ENVSETUP); $(MAKE) $(MAKE_K_FLAG) do=$@ $(OTHERDIRS) dot
713
714 dot: FORCE
715         @$(ENVSETUP); \
716         $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \
717           -f $(top_srcdir)/Makefile.comm \
718           -f $(top_srcdir)/Makefile.sub $(do)
719
720 $(LIBDIRS): FORCE $(INCDIRS) $(PROGDEPDIRS) $(GNULIBDIRS)
721         @$(ENVSETUP); \
722         if test $(srcdir) = .; then \
723           srcdir=.; \
724         else \
725           srcdir=$(top_srcdir)/$@; \
726         fi; \
727         test -d $@ || $(mkinstalldirs) $@; \
728         cd $@; \
729         test -f Makefile.dep || touch Makefile.dep; \
730         $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
731           -f $(top_srcdir)/Makefile.comm \
732           -f $$srcdir/Makefile.sub \
733           -f $(top_srcdir)/Makefile.lib \
734           -f Makefile.dep $(do)
735
736 $(CPROGDIRS) $(XPROGDIRS): FORCE $(LIBDIRS)
737         @$(ENVSETUP); \
738         if test $(srcdir) = .; then \
739           srcdir=.; \
740         else \
741           srcdir=$(top_srcdir)/$@; \
742         fi; \
743         test -d $@ || $(mkinstalldirs) $@; \
744         cd $@; \
745         test -f Makefile.dep || touch Makefile.dep; \
746         $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
747           -f $(top_srcdir)/Makefile.comm \
748           -f $$srcdir/Makefile.sub \
749           -f $(top_srcdir)/Makefile.cpg \
750           -f Makefile.dep $(do)
751
752 $(CCPROGDIRS): FORCE $(LIBDIRS)
753         @$(ENVSETUP); \
754         if test $(srcdir) = .; then \
755           srcdir=.; \
756         else \
757           srcdir=$(top_srcdir)/$@; \
758         fi; \
759         test -d $@ || $(mkinstalldirs) $@; \
760         cd $@; \
761         test -f Makefile.dep || touch Makefile.dep; \
762         $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
763           -f $(top_srcdir)/Makefile.comm \
764           -f $$srcdir/Makefile.sub \
765           -f $(top_srcdir)/Makefile.ccpg \
766           -f Makefile.dep $(do)
767
768 $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
769         @$(ENVSETUP); \
770         if test $(srcdir) = .; then \
771           srcdir=.; \
772         else \
773           srcdir=$(top_srcdir)/$@; \
774         fi; \
775         test -d $@ || $(mkinstalldirs) $@; \
776         cd $@; \
777         $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
778           -f $(top_srcdir)/Makefile.comm \
779           -f $$srcdir/Makefile.sub \
780           -f $(top_srcdir)/Makefile.dev $(do)
781
782 $(GNULIBDIRS): FORCE
783         @$(ENVSETUP); \
784         if test $(srcdir) = .; then \
785           srcdir=.; \
786         else \
787           srcdir=$(top_srcdir)/$@; \
788         fi; \
789         test -d $@ || $(mkinstalldirs) $@; \
790         case $(do) in \
791         all) \
792           cd $@; \
793           args=`$(top_builddir)/config.status --config`; \
794           test -f Makefile \
795           || eval $$srcdir/configure "$$args" --srcdir=$$srcdir; \
796           $(MAKE) ACLOCAL=: AUTOCONF=: AUTOHEADER=: AUTOMAKE=: $(do) ;; \
797         esac
798
799 $(OTHERDIRS): $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
800
801 $(INCDIRS) $(PROGDEPDIRS) $(OTHERDIRS): FORCE
802         @$(ENVSETUP); \
803         if test $(srcdir) = .; then \
804           srcdir=.; \
805         else \
806           srcdir=$(top_srcdir)/$@; \
807         fi; \
808         test -d $@ || $(mkinstalldirs) $@; \
809         cd $@; \
810         $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
811           -f $(top_srcdir)/Makefile.comm \
812           -f $$srcdir/Makefile.sub \
813           -f $(top_srcdir)/Makefile.man $(do)
814
815 .PHONY: dist
816 dist:
817         -rm -fr tmp
818         rm -f groff-$(version)$(revision).tar.gz
819         mkdir tmp
820         for d in $(DISTDIRS); do \
821           $(mkinstalldirs) tmp/$$d; \
822         done
823         cd tmp; \
824         cp ../Makefile .; \
825         cp $(top_srcdir)/* . 2>/dev/null || true; \
826         rm -rf CVS; \
827         for d in $(DISTDIRS); do \
828           (cd $$d; \
829            cp $(top_srcdir)/$$d/* . 2>/dev/null; \
830            rm -rf CVS || true); \
831         done; \
832         $(MAKE) srcdir=. VPATH=. distfiles; \
833         $(MAKE) srcdir=. VPATH=. extraclean; \
834         for d in $(EXTRADIRS); do \
835           (cd $$d; \
836            if test -f Makefile; then \
837              $(MAKE) extraclean; \
838            else \
839              $(MAKE) -f $(top_builddir)/$$d/Makefile extraclean; \
840            fi); \
841         done; \
842         rm -f Makefile; \
843         cp $(top_srcdir)/Makefile.init Makefile
844         mv tmp groff-$(version)$(revision)
845         tar cfh - groff-$(version)$(revision) | \
846           gzip -c >groff-$(version)$(revision).tar.gz
847         rm -fr groff-$(version)$(revision)
848
849 # $(PROGDIRS): libgroff
850 # grops grotty grodvi: libdriver
851 # refer lookbib indxbib lkbib: libbib
852 # $(LIBDIRS) $(PROGDIRS): include
853
854 .PHONY: $(ALLDIRS) dot $(TARGETS) FORCE
855
856 # Create a Makefile in $(subdir).  This is useful for development since it
857 # avoids running make recursively.
858 subdir_Makefile: Makefile.cfg
859         $(MAKE) do=Makefile $(subdir)
860
861 Makefile.cfg: Makefile
862         >Makefile.cfg
863         for var in $(MDEFINES); do \
864           echo "$$var" >>Makefile.cfg; \
865         done
866
867 Makefile: Makefile.in
868         $(SHELL) config.status
869
870 .PHONY: install
871 install:
872         -test -d $(DESTDIR)$(prefix) \
873           || $(mkinstalldirs) $(DESTDIR)$(prefix)
874         @$(ENVSETUP); $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) \
875           do=do_install $(dodirs)
876         cd $(DESTDIR)$(dataprogramdir); \
877         rm -f current; \
878         $(LN_S) $(version)$(revision) current
879
880 .PHONY: uninstall
881 uninstall: uninstall_sub uninstall_dirs
882
883 .PHONY: uninstall_dirs
884 # Use `rmdir' here so that the directories are only removed if they are empty.
885 uninstall_dirs:
886         -rm -f $(dataprogramdir)/current
887         -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
888           $(tmacdir) $(systemtmacdir) $(localtmacdir) \
889           $(fontdir) $(localfontdir) $(oldfontdir) $(bindir) \
890           $(datasubdir) $(dataprogramdir) $(infodir) \
891           $(exampledir) $(htmldocdir) $(pdfdocdir) $(docdir) \
892           $(libprogramdir) $(libdir) \
893           $(datadir)/doc/groff $(datadir)/doc $(datadir) 2>/dev/null || :
894
895 .PHONY: check
896 check:
897         @echo There is no validation suite for this package.
898
899 #check: site.exp docheck
900 #.PHONY: docheck
901
902 #docheck:
903 #       if $(SHELL) -c "runtest --version" > /dev/null 2>&1; then \
904 #         runtest; \
905 #       else \
906 #         echo "WARNING: could not find \`runtest'" 1>&2; \
907 #       fi
908
909 # This snippet has been taken from the automake package.
910
911 #site.exp:
912 #       @echo "Making a new site.exp file..."
913 #       @echo "## these variables are automatically generated by make ##" >site.tmp
914 #       @echo "# Do not edit here.  If you wish to override these values" >>site.tmp
915 #       @echo "# edit the last section" >>site.tmp
916 #       @echo "set tool groff" >>site.tmp
917 #       @echo "set srcdir $(srcdir)/testsuite" >>site.tmp
918 #       @echo "set objdir `pwd`" >> site.tmp
919 #       @echo "## All variables above are generated by configure.  Do not edit! ##" >> site.tmp
920 #       @test ! -f site.exp \
921 #         || sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
922 #       @-rm -f site.bak
923 #       @test ! -f site.exp || mv site.exp site.bak
924 #       @mv site.tmp site.exp
925
926 FORCE:
927
928 .NOEXPORT: