1151497Sru# Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005 2151497Sru# Free Software Foundation, Inc. 318099Spst# Written by James Clark (jjc@jclark.com) 418099Spst# 518099Spst# This file is part of groff. 618099Spst# 718099Spst# groff is free software; you can redistribute it and/or modify it under 818099Spst# the terms of the GNU General Public License as published by the Free 918099Spst# Software Foundation; either version 2, or (at your option) any later 1018099Spst# version. 1118099Spst# 1218099Spst# groff is distributed in the hope that it will be useful, but WITHOUT ANY 1318099Spst# WARRANTY; without even the implied warranty of MERCHANTABILITY or 1418099Spst# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1518099Spst# for more details. 1618099Spst# 1718099Spst# You should have received a copy of the GNU General Public License along 1818099Spst# with groff; see the file COPYING. If not, write to the Free Software 19151497Sru# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. 2018099Spst 21151497SruSHELL=@SHELL@ 22151497Sru 2375584Srusrcdir=@srcdir@ 24151497Srutop_srcdir=@abs_top_srcdir@ 2575584SruVPATH=@srcdir@ 26151497Srutop_builddir=@abs_top_builddir@ 2775584Sru 28151497Sru# `RT_SEP' is the operating system's native PATH SEPARATOR CHAR, which 29151497Sru# is to be used in runtime PATHs compiled into groff executables. 30151497SruRT_SEP=@GROFF_PATH_SEPARATOR@ 31151497Sru 32151497Sru# `SH_SEP' is a alternative PATH SEPARATOR CHAR, to be used in shell 33151497Sru# scripts and makefile rules; it may be the same as `RT_SEP', but, 34151497Sru# particularly in some Microsoft environments, it may differ. 35151497SruSH_SEP=@PATH_SEPARATOR@ 36151497Sru 3775584Sruversion=`cat $(top_srcdir)/VERSION` 38104862Sru# No additional number if revision is zero. 3975584Srurevision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION` 4075584Sru 4118099Spst# Define `page' to be letter if your PostScript printer uses 8.5x11 4218099Spst# paper (USA) and define it to be A4, if it uses A4 paper (rest of the 4318099Spst# world). 4418099SpstPAGE=@PAGE@ 4518099Spst 46151497Sru# The name of the ghostscript program. Normally, gs, on GNU/Linux 47151497Sru# but it might be different on MS-DOS/MS-WIN32 systems. 48151497SruGHOSTSCRIPT=@GHOSTSCRIPT@ 49151497Sru 50151497Sru# `ALT_GHOSTSCRIPT_PROGS' specifies a list alternative names, 51151497Sru# which can be tried if `GHOSTSCRIPT' cannot be found at run time. 52151497SruALT_GHOSTSCRIPT_PROGS=@ALT_GHOSTSCRIPT_PROGS@ 53151497Sru 54151497Sru# Similarly, `ALT_AWK_PROGS' specifies a list of alternative names, 55151497Sru# which can be tried at run time, to identify the awk program. 56151497SruALT_AWK_PROGS=@ALT_AWK_PROGS@ 57151497Sru 5818099Spst# Normally the Postscript driver, grops, produces output that conforms 5918099Spst# to version 3.0 of the Adobe Document Structuring Conventions. 6018099Spst# Unfortunately some spoolers and previewers can't handle such output. 6118099Spst# The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to 6218099Spst# make its output acceptable to such programs. This variable controls 6318099Spst# only the default behaviour of grops; the behaviour can be changed at 6418099Spst# runtime by the grops -b option (and so by groff -P-b). 6518099Spst# Use a value of 0 if your spoolers and previewers are able to handle 6618099Spst# conforming PostScript correctly. 6718099Spst# Add 1 if no %%{Begin,End}DocumentSetup comments should be generated; 6818099Spst# this is needed for early versions of TranScript that get confused by 6918099Spst# anything between the %%EndProlog line and the first %%Page: comment. 7018099Spst# Add 2 if lines in included files beginning with %! should be 7118099Spst# stripped out; this is needed for the OpenWindows 2.0 pageview previewer. 7218099Spst# Add 4 if %%Page, %%Trailer and %%EndProlog comments should be 7318099Spst# stripped out of included files; this is needed for spoolers that 7418099Spst# don't understand the %%{Begin,End}Document comments. I suspect this 7518099Spst# includes early versions of TranScript. 7618099Spst# Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0 7718099Spst# rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint 7818099Spst# with a printer that requires page reversal. 7918099SpstBROKEN_SPOOLER_FLAGS=@BROKEN_SPOOLER_FLAGS@ 8018099Spst 81104862Sru# `DEVICE' is the default device. 8218099SpstDEVICE=ps 8318099Spst 84151497Sru# `XDEVDIRS' is either `font/devX{75,100}{,-12}' or empty. 85151497SruXDEVDIRS=@XDEVDIRS@ 86151497Sru 87151497Sru# `XPROGDIRS' is either `src/devices/xditview src/utils/xtotroff' or empty. 88151497SruXPROGDIRS=@XPROGDIRS@ 89151497Sru 90151497Sru# `XLIBDIRS' is either `src/libs/libxutil' or empty. 91151497SruXLIBDIRS=@XLIBDIRS@ 92151497Sru 93104862Sru# `TTYDEVDIRS' is either `font/devascii font/devlatin1' (for 94104862Sru# ASCII) or `font/devcp1047' (for EBCDIC) plus font/devutf8. 95104862SruTTYDEVDIRS=@TTYDEVDIRS@ font/devutf8 9669626Sru 97104862Sru# `OTHERDEVDIRS' is either `font/devlj4 font/devlbp' (for ASCII) or 98104862Sru# empty (for EBCDIC). 99104862SruOTHERDEVDIRS=@OTHERDEVDIRS@ 100104862Sru 101104862Sru# `PSPRINT' is the command to use for printing a PostScript file, 10218099Spst# for example `lpr'. 10318099SpstPSPRINT=@PSPRINT@ 10418099Spst 105104862Sru# `DVIPRINT' is the command to use for printing a TeX dvi file, 10618099Spst# for example `lpr -d'. 10718099SpstDVIPRINT=@DVIPRINT@ 10818099Spst 10918099Spst# Prefix for names of programs that have Unix counterparts. 11018099Spst# For example, if `g' is `g' then troff will be installed as 11118099Spst# gtroff. This doesn't affect programs like grops or groff that have 11218099Spst# no Unix counterparts. Note that the groff versions of eqn and tbl 11318099Spst# will not work with Unix troff. 11418099Spstg=@g@ 11518099Spst 11618099Spst# Common prefix for installation directories. 11718099Spst# Used in definitions of exec_prefix, datasubdir, fontpath, manroot. 11818099Spst# This must already exist when you do make install. 11918099Spstprefix=@prefix@ 12018099Spstexec_prefix=@exec_prefix@ 12118099Spst 122104862Sru# `bindir' says where to install executables. 12375584Srubindir=@bindir@ 12418099Spst 125104862Sru# `libdir' says where to install platform-dependent data. 12675584Srulibdir=@libdir@ 12775584Srulibprogramdir=$(libdir)/groff 12875584Sru 129104862Sru# `datasubdir' says where to install platform-independent data files. 13069626Srudatadir=@datadir@ 13175584Srudataprogramdir=$(datadir)/groff 13275584Srudatasubdir=$(dataprogramdir)/$(version)$(revision) 13318099Spst 134104862Sru# `infodir' says where to install info files. 135104862Sruinfodir=@infodir@ 136104862Sru 137104862Sru# `docdir' says where to install documentation files. 138104862Srudocdir=$(datadir)/doc/groff/$(version)$(revision) 139104862Sru 140104862Sru# `exampledir' says where to install example files. 141104862Sruexampledir=$(docdir)/examples 142104862Sru 143104862Sru# `htmldocdir' says where to install documentation in HTML format. 144104862Sruhtmldocdir=$(docdir)/html 145104862Sru 146151497Sru# `pdfdocdir' says where to install documentation in PDF format. 147151497Srupdfdocdir=$(docdir)/pdf 148151497Sru 149104862Sru# `fontdir' says where to install dev*/*. 15018099Spstfontdir=$(datasubdir)/font 15118099Spst 152104862Sru# `localfontdir' says where local fonts will be installed (as dev*/*). 153104862Srulocalfontdir=$(dataprogramdir)/site-font 15418099Spst 155104862Sru# `legacyfontdir' is for compatibility with non-GNU troff. 156104862Srulegacyfontdir=/usr/lib/font 157104862Sru 158104862Sru# `fontpath' says where to look for dev*/*. 159151497Srufontpath=$(localfontdir)$(RT_SEP)$(fontdir)$(RT_SEP)$(legacyfontdir) 160104862Sru 161104862Sru# `tmacdir' says where to install macros. 16218099Spsttmacdir=$(datasubdir)/tmac 16318099Spst 164104862Sru# `systemtmacdir' says where to install platform-dependent macros. 16575584Srusystemtmacdir=$(libprogramdir)/site-tmac 16675584Sru 167104862Sru# `localtmacdir' says where local files will be installed. 16875584Srulocaltmacdir=$(dataprogramdir)/site-tmac 16975584Sru 170151497Sru# `appresdir' says where to install the application resource file for 171151497Sru# gxditview. 172151497Sruappresdir=@appresdir@ 173151497Sru 174104862Sru# `tmacpath' says where to look for macro files. 17575584Sru# The current directory will be prepended in unsafe mode only; the home 17675584Sru# directory will be always added. 17775584Sru# `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the 17875584Sru# current nor in the home directory. 179151497Srutmacpath=$(systemtmacdir)$(RT_SEP)$(localtmacdir)$(RT_SEP)$(tmacdir) 18018099Spst 181104862Sru# `sys_tmac_prefix' is prefix (if any) for system macro packages. 18218099Spstsys_tmac_prefix=@sys_tmac_prefix@ 18318099Spst 184114402Sru# `pnmtops_nosetpage' is the command to be run to generate an eps 185114402Sru# file. Some versions of pnmtops provide the -nosetpage option. 186114402Sru# We detect this and use it if present. 187114402Srupnmtops_nosetpage=@pnmtops_nosetpage@ 188114402Sru 189104862Sru# `tmac_wrap' is list of system macro packages that should be made 19018099Spst# available to groff by creating a corresponding macro package 19118099Spst# in the groff macro directory that references the system macro 19218099Spst# package. 19318099Spsttmac_wrap=@tmac_wrap@ 19418099Spst 19518099Spst# If there is a groff version of a macro package listed in $(tmac_wrap), 19618099Spst# then the groff version will be installed with a prefix of this. 19718099Spst# Don't make this empty. 19818099Spsttmac_prefix=g 19918099Spst 20069626Sru# The groff -mm macros will be available as -m$(tmac_m_prefix)m. 20118099Spsttmac_m_prefix=\ 20218099Spst `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done` 20369626Sru# The groff -ms macros will be available as -m$(tmac_s_prefix)s. 20418099Spsttmac_s_prefix=\ 20518099Spst `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done` 20669626Sru# The groff -man macros will be available as -m$(tmac_an_prefix)an. 20718099Spsttmac_an_prefix=\ 20818099Spst `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done` 20918099Spst 21018099Spst# Extension to be used for refer index files. Index files are not 21118099Spst# sharable between different architectures, so you might want to use 21218099Spst# different suffixes for different architectures. Choose an extension 21318099Spst# that doesn't conflict with refer or any other indexing program. 21418099Spstindexext=.i 21518099Spst 21618099Spst# Directory containing the default index for refer. 21718099Spstindexdir=/usr/dict/papers 21818099Spst 21918099Spst# The filename (without suffix) of the default index for refer. 22018099Spstindexname=Ind 22118099Spst 22218099Spst# common_words_file is a file containing a list of common words. 22318099Spst# If your system provides /usr/lib/eign it will be copied onto this, 22418099Spst# otherwise the supplied eign file will be used. 22518099Spstcommon_words_file=$(datasubdir)/eign 22618099Spst 227104862Sru# `manroot' is the root of the man page directory tree. 22879543Srumandir=@mandir@ 22979543Srumanroot=$(mandir) 23018099Spst 231104862Sru# `man1ext' is the man section for user commands. 23218099Spstman1ext=1 23318099Spstman1dir=$(manroot)/man$(man1ext) 23418099Spst 235104862Sru# `man5ext' is the man section for file formats. 23618099Spstman5ext=5 23718099Spstman5dir=$(manroot)/man$(man5ext) 23818099Spst 239104862Sru# `man7ext' is the man section for macros. 24018099Spstman7ext=7 24118099Spstman7dir=$(manroot)/man$(man7ext) 24218099Spst 243104862Sru# The configure script checks whether all necessary utility programs for 244104862Sru# grohtml are available -- only then we can build the HTML documentation. 245104862Srumake_html=@make_html@ 246104862Srumake_install_html=@make_install_html@ 247104862Sru 248151497Sru# The configure script also checks whether all necessary utility programs 249151497Sru# for pdfroff are available -- only then we can build PDF documentation. 250151497Srumake_pdfdoc=@make_pdfdoc@ 251151497Srumake_install_pdfdoc=@make_install_pdfdoc@ 252151497Sru 25318099Spst# DEFINES should include the following: 25418099Spst# -DHAVE_MMAP if you have mmap() and <sys/mman.h> 25518099Spst# -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []' 256104862Sru# -DSYS_SIGLIST_DECLARED if you have sys_siglist[] 25718099Spst# -DWCOREFLAG=0200 if the 0200 bit of the status returned by 25818099Spst# wait() indicates whether a core image was 25918099Spst# produced for a process that was terminated 26018099Spst# by a signal 261104862Sru# 26218099Spst# -DHAVE_DIRENT_H if you have <dirent.h> 26318099Spst# -DHAVE_LIMITS_H if you have <limits.h> 26418099Spst# -DHAVE_CC_LIMITS_H if you have a C++ <limits.h> 265104862Sru# -DHAVE_MATH_H if you have <math.h> 266104862Sru# -DHAVE_CC_OSFCN_H if you have a C++ <osfcn.h> 267151497Sru# -DHAVE_CC_INTTYPES_H if you have a C++ <inttypes.h> 26818099Spst# -DHAVE_STDLIB_H if you have <stdlib.h> 269104862Sru# -DHAVE_STRING_H if you have <string.h> 27069626Sru# -DHAVE_STRINGS_H if you have <strings.h> 271104862Sru# -DHAVE_SYS_DIR_H if you have <sys/dir.h> 272104862Sru# -DHAVE_SYS_TIME_H if you have <sys/time.h> 273104862Sru# -DHAVE_UNISTD_H if you have <unistd.h> 274104862Sru# 275104862Sru# -DHAVE_FMOD if you have fmod() 276104862Sru# -DHAVE_GETCWD if you have getcwd() 277104862Sru# -DHAVE_GETTIMEOFDAY if you have gettimeofday() 278104862Sru# -DHAVE_ISATTY if you have isatty() 279151497Sru# -DHAVE_KILL if you have kill() 280104862Sru# -DHAVE_MKSTEMP if you have mkstemp() 281104862Sru# -DHAVE_MMAP if you have mmap() 282104862Sru# -DHAVE_PUTENV if you have putenv() 28318099Spst# -DHAVE_RENAME if you have rename() 284114402Sru# -DHAVE_SETLOCALE if you have setlocale() 285104862Sru# -DHAVE_SNPRINTF if you have snprintf() 286104862Sru# -DHAVE_STRCASECMP if you have strcasecmp() 287104862Sru# -DHAVE_STRNCASECMP if you have strncasecmp() 288104862Sru# -DHAVE_STRERROR if you have strerror() 28969626Sru# -DHAVE_STRSEP if you have strsep() 290104862Sru# -DHAVE_STRTOL if you have strtol() 291151497Sru# -DHAVE_VSNPRINTF if you have vsnprintf() 292104862Sru# 293104862Sru# -DNEED_DECLARATION_GETTIMEOFTODAY 294104862Sru# if your C++ <sys/time.h> doesn't declare 295104862Sru# gettimeofday() 29669626Sru# -DNEED_DECLARATION_HYPOT if your C++ <math.h> doesn't declare hypot() 297104862Sru# -DNEED_DECLARATION_PCLOSE if your C++ <stdio.h> doesn't declare pclose() 298104862Sru# -DNEED_DECLARATION_POPEN if your C++ <stdio.h> doesn't declare popen() 299151497Sru# -DNEED_DECLARATION_PUTENV if your C++ <stdlib.h> doesn't declare 300151497Sru# putenv() 301114402Sru# -DNEED_DECLARATION_RAND if your C++ <stdlib.h> doesn't declare rand() 302151497Sru# -DNEED_DECLARATION_SNPRINTF if your C++ <stdio.h> doesn't declare 303151497Sru# snprintf() 304114402Sru# -DNEED_DECLARATION_SRAND if your C++ <stdlib.h> doesn't declare srand() 305104862Sru# -DNEED_DECLARATION_STRCASECMP if your C++ <string.h> doesn't declare 306104862Sru# strcasecmp() 30769626Sru# -DNEED_DECLARATION_STRNCASECMP 30869626Sru# if your C++ <string.h> doesn't declare 30969626Sru# strncasecmp() 310151497Sru# -DNEED_DECLARATION_VFPRINTF if your C++ <stdio.h> doesn't declare 311151497Sru# vfprintf() 312151497Sru# -DNEED_DECLARATION_VSNPRINTF if your C++ <stdio.h> doesn't declare 313151497Sru# vsnprintf() 314104862Sru# 315104862Sru# -DRET_TYPE_SRAND_IS_VOID if srand() returns void not int 31655839Sasmodai# -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h> 31755839Sasmodai# -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or 31855839Sasmodai# <stdio.h> 31918099Spst# -DTRADITIONAL_CPP if your C++ compiler uses a traditional 32055839Sasmodai# (Reiser) preprocessor 32118099Spst# -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t * 32218099Spst# -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception 32318099Spst# -DRETSIGTYPE=int if signal handlers return int not void 32469626Sru# -DIS_EBCDIC_HOST if the host's encoding is EBCDIC 325151497Sru# -DPAGE=A4 if the the printer's page size is A4 326151497Sru# -DGHOSTSCRIPT=gs the name (and directory if required) of the 327151497Sru# ghostscript program 32818099SpstDEFINES=@DEFS@ 32918099Spst 330104862Sru# Include 331104862Sru# 332114402Sru# {fmod,getcwd,mkstemp,putenv,snprintf,strcasecmp, 333114402Sru# strerror,strncasecmp,strtol}.$(OBJEXT) 334104862Sru# 335104862Sru# in LIBOBJS if your C library is missing the corresponding function. 336151497Sru# vsnprintf is defined in the snprintf.$(OBJEXT) module. 33718099SpstLIBOBJS=@LIBOBJS@ 33818099Spst 339114402Sru# `CCC' is the compiler for C++ (.cpp) files. 34018099SpstCCC=@CXX@ 34118099SpstCC=@CC@ 34218099Spst# CCDEFINES are definitions for C++ compilations. 34318099SpstCCDEFINES=$(DEFINES) 34418099Spst# CDEFINES are definitions for C compilations. 34518099SpstCDEFINES=$(DEFINES) 34618099Spst 34718099SpstCCFLAGS=@CXXFLAGS@ 34818099SpstCFLAGS=@CFLAGS@ 349151497SruCPPFLAGS=@CPPFLAGS@ 35055839SasmodaiLDFLAGS=@LDFLAGS@ 351151497Sru 352151497SruX_CFLAGS=@X_CFLAGS@ 353151497SruX_LIBS=@X_LIBS@ 354151497SruX_EXTRA_LIBS=@X_EXTRA_LIBS@ 355151497SruX_PRE_LIBS=@X_PRE_LIBS@ 356151497Sru 35718099SpstYACC=@YACC@ 35818099SpstYACCFLAGS=-v 35918099Spst 360104862SruEXEEXT=@EXEEXT@ 361104862SruOBJEXT=@OBJEXT@ 362114402Sru# a simple heuristic assumption 363114402SruLIBEXT=`case $(OBJEXT) in obj) echo lib;; *) echo a;; esac` 36418099SpstLIBS=@LIBS@ 36555839SasmodaiLIBM=@LIBM@ 36618099SpstRANLIB=@RANLIB@ 36718099SpstINSTALL=@INSTALL@ 36818099SpstINSTALL_PROGRAM=@INSTALL_PROGRAM@ 36969626SruINSTALL_SCRIPT=@INSTALL_SCRIPT@ 37018099SpstINSTALL_DATA=@INSTALL_DATA@ 371104862SruINSTALL_INFO=@INSTALL_INFO@ 37218099SpstLN_S=@LN_S@ 37318099SpstAR=ar 37418099SpstETAGS=etags 37518099SpstETAGSFLAGS= 37618099Spst# Flag that tells etags to assume C++. 37718099SpstETAGSCCFLAG=-C 37818099Spst# Full path to perl. 37918099SpstPERLPATH=@PERLPATH@ 38018099Spst# Sed command with which to edit sh scripts. 38118099SpstSH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@ 382151497Sru# Sed script to deal with OS dependencies in sh scripts. 383151497SruSH_DEPS_SED_SCRIPT=$(top_builddir)/arch/misc/shdeps.sed 38418099Spst 385104862Sru# The program to create directory hierarchies. 386151497Srumkinstalldirs= $(SHELL) $(top_srcdir)/mkinstalldirs 38769626Sru 38818099SpstPURIFY=purify 38918099SpstPURIFYCCFLAGS= 39018099Spst#PURIFYCCFLAGS=-g++=yes \ 39118099Spst# -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld 39218099Spst 39318099Spst# Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second 39418099Spst# copy of $(MDEFINES) when making individual directories; this could 39518099Spst# cause the argument list to become too long on some systems. 39669626SruMDEFINES= \ 397151497Sru "ALT_AWK_PROGS=$(ALT_AWK_PROGS)" \ 398151497Sru "ALT_GHOSTSCRIPT_PROGS=$(ALT_GHOSTSCRIPT_PROGS)" \ 399114402Sru "AR=$(AR)" \ 40069626Sru "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \ 401114402Sru "CC=$(CC)" \ 402114402Sru "CCC=$(CCC)" \ 403114402Sru "CCDEFINES=$(CCDEFINES)" \ 404114402Sru "CCFLAGS=$(CCFLAGS)" \ 405114402Sru "CDEFINES=$(CDEFINES)" \ 406114402Sru "CFLAGS=$(CFLAGS)" \ 407151497Sru "CPPFLAGS=$(CPPFLAGS)" \ 40869626Sru "DEVICE=$(DEVICE)" \ 409114402Sru "DVIPRINT=$(DVIPRINT)" \ 410114402Sru "ETAGS=$(ETAGS)" \ 411114402Sru "ETAGSCCFLAG=$(ETAGSCCFLAG)" \ 412114402Sru "ETAGSFLAGS=$(ETAGSFLAGS)" \ 413114402Sru "EXEEXT=$(EXEEXT)" \ 414114402Sru "INSTALL_DATA=$(INSTALL_DATA)" \ 415114402Sru "INSTALL_INFO=$(INSTALL_INFO)" \ 416114402Sru "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ 417114402Sru "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ 418114402Sru "LDFLAGS=$(LDFLAGS)" \ 419114402Sru "LIBEXT=$(LIBEXT)" \ 420114402Sru "LIBM=$(LIBM)" \ 421114402Sru "LIBOBJS=$(LIBOBJS)" \ 422114402Sru "LIBS=$(LIBS)" \ 423114402Sru "MAKEOVERRIDES=$(MAKEOVERRIDES)" \ 424114402Sru "OBJEXT=$(OBJEXT)" \ 425104862Sru "OTHERDEVDIRS=$(OTHERDEVDIRS)" \ 426114402Sru "PAGE=$(PAGE)" \ 427151497Sru "GHOSTSCRIPT=$(GHOSTSCRIPT)" \ 428114402Sru "PERLPATH=$(PERLPATH)" \ 42969626Sru "PSPRINT=$(PSPRINT)" \ 430114402Sru "PURIFY=$(PURIFY)" \ 431114402Sru "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" \ 432114402Sru "RANLIB=$(RANLIB)" \ 433151497Sru "RT_SEP=$(RT_SEP)" \ 434151497Sru "SH_SEP=$(SH_SEP)" \ 435151497Sru "SHELL=$(SHELL)" \ 436114402Sru "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \ 437151497Sru "SH_DEPS_SED_SCRIPT=$(SH_DEPS_SED_SCRIPT)" \ 438114402Sru "TTYDEVDIRS=$(TTYDEVDIRS)" \ 439151497Sru "XDEVDIRS=$(XDEVDIRS)" \ 440151497Sru "XLIBDIRS=$(XLIBDIRS)" \ 441151497Sru "XPROGDIRS=$(XPROGDIRS)" \ 442151497Sru "X_CFLAGS=$(X_CFLAGS)" \ 443151497Sru "X_LIBS=$(X_LIBS)" \ 444151497Sru "X_EXTRA_LIBS=$(X_EXTRA_LIBS)" \ 445151497Sru "X_PRE_LIBS=$(X_PRE_LIBS)" \ 446114402Sru "YACC=$(YACC)" \ 447114402Sru "YACCFLAGS=$(YACCFLAGS)" \ 448151497Sru "appresdir=$(appresdir)" \ 449114402Sru "bindir=$(bindir)" \ 450114402Sru "common_words_file=$(common_words_file)" \ 45169626Sru "datadir=$(datadir)" \ 45275584Sru "dataprogramdir=$(dataprogramdir)" \ 45369626Sru "datasubdir=$(datasubdir)" \ 454104862Sru "docdir=$(docdir)" \ 455104862Sru "exampledir=$(exampledir)" \ 456114402Sru "exec_prefix=$(exec_prefix)" \ 457114402Sru "fontdir=$(fontdir)" \ 458114402Sru "fontpath=$(fontpath)" \ 459114402Sru "g=$(g)" \ 460104862Sru "htmldocdir=$(htmldocdir)" \ 461151497Sru "pdfdocdir=$(pdfdocdir)" \ 462114402Sru "indexdir=$(indexdir)" \ 463114402Sru "indexext=$(indexext)" \ 464114402Sru "indexname=$(indexname)" \ 465114402Sru "infodir=$(infodir)" \ 466114402Sru "legacyfontdir=$(legacyfontdir)" \ 46775584Sru "libdir=$(libdir)" \ 46875584Sru "libprogramdir=$(libprogramdir)" \ 469104862Sru "localfontdir=$(localfontdir)" \ 47075584Sru "localtmacdir=$(localtmacdir)" \ 471114402Sru "make_html=$(make_html)" \ 472114402Sru "make_install_html=$(make_install_html)" \ 473151497Sru "make_pdfdoc=$(make_pdfdoc)" \ 474151497Sru "make_install_pdfdoc=$(make_install_pdfdoc)" \ 475114402Sru "man1dir=$(man1dir)" \ 47669626Sru "man1ext=$(man1ext)" \ 477114402Sru "man5dir=$(man5dir)" \ 47869626Sru "man5ext=$(man5ext)" \ 479114402Sru "man7dir=$(man7dir)" \ 48069626Sru "man7ext=$(man7ext)" \ 481114402Sru "manroot=$(manroot)" \ 48269626Sru "mkinstalldirs=$(mkinstalldirs)" \ 483114402Sru "prefix=$(prefix)" \ 484114402Sru "revision=$(revision)" \ 48569626Sru "sys_tmac_prefix=$(sys_tmac_prefix)" \ 486114402Sru "pnmtops_nosetpage=$(pnmtops_nosetpage)" \ 487114402Sru "systemtmacdir=$(systemtmacdir)" \ 48818099Spst "tmac_an_prefix=$(tmac_an_prefix)" \ 489114402Sru "tmac_m_prefix=$(tmac_m_prefix)" \ 49069626Sru "tmac_s_prefix=$(tmac_s_prefix)" \ 491114402Sru "tmac_wrap=$(tmac_wrap)" \ 492114402Sru "tmacdir=$(tmacdir)" \ 493114402Sru "tmacpath=$(tmacpath)" \ 494114402Sru "top_builddir=$(top_builddir)" \ 495114402Sru "top_srcdir=$(top_srcdir)" \ 496114402Sru "version=$(version)" 49718099Spst 49869626SruINCDIRS=src/include 49969626SruLIBDIRS=\ 50069626Sru src/libs/libgroff \ 50169626Sru src/libs/libdriver \ 502151497Sru src/libs/libbib \ 503151497Sru $(XLIBDIRS) 50469626SruCCPROGDIRS=\ 50569626Sru src/roff/groff \ 50669626Sru src/roff/troff \ 50769626Sru src/preproc/tbl \ 50869626Sru src/preproc/pic \ 50969626Sru src/preproc/eqn \ 51069626Sru src/preproc/grn \ 51169626Sru src/preproc/refer \ 51269626Sru src/preproc/soelim \ 51375584Sru src/preproc/html \ 51469626Sru src/devices/grops \ 51569626Sru src/devices/grotty \ 51669626Sru src/devices/grodvi \ 51769626Sru src/devices/grolj4 \ 51869626Sru src/devices/grohtml \ 51969626Sru src/devices/grolbp \ 52069626Sru src/utils/tfmtodit \ 52169626Sru src/utils/hpftodit \ 52269626Sru src/utils/lookbib \ 52369626Sru src/utils/indxbib \ 52469626Sru src/utils/lkbib \ 52569626Sru src/utils/addftinfo 526151497SruCPROGDIRS=\ 527151497Sru src/utils/pfbtops \ 528151497Sru $(XPROGDIRS) 529151497SruPROGDEPDIRS=arch/misc 530151497SruPROGDIRS=$(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS) 53169626SruDEVDIRS=\ 53269626Sru font/devps \ 53369626Sru font/devdvi \ 534104862Sru font/devhtml 53569626SruALLTTYDEVDIRS=\ 53669626Sru font/devascii \ 53769626Sru font/devlatin1 \ 53869626Sru font/devutf8 \ 53969626Sru font/devcp1047 540151497Sru# `doc' must be processed before `contrib/pdfmark'. 54169626SruOTHERDIRS=\ 54269626Sru man \ 54369626Sru tmac \ 54469626Sru src/utils/afmtodit \ 54569626Sru src/roff/grog \ 54669626Sru src/roff/nroff \ 547151497Sru doc \ 548104862Sru contrib/mm \ 549104862Sru contrib/pic2graph \ 550104862Sru contrib/eqn2graph \ 551151497Sru contrib/grap2graph \ 552104862Sru contrib/groffer \ 553104862Sru contrib/mom \ 554151497Sru contrib/pdfmark \ 555151497Sru contrib/gdiffmk 55669626SruALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \ 557151497Sru $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS) 55869626SruEXTRADIRS=\ 55969626Sru font/devps/generate \ 56069626Sru font/devdvi/generate \ 561104862Sru font/devlj4/generate \ 56269626Sru doc 563104862SruNOMAKEDIRS=\ 564104862Sru arch/djgpp \ 565104862Sru contrib/mm/examples \ 566104862Sru contrib/mm/mm \ 567104862Sru contrib/mom/examples \ 568104862Sru contrib/mom/momdoc \ 569151497Sru contrib/gdiffmk/tests \ 570104862Sru src/libs/snprintf 571104862SruDISTDIRS=\ 572151497Sru $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) \ 573104862Sru $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS) 57418099SpstTARGETS=all install install_bin install_data clean distclean mostlyclean \ 57518099Spst realclean extraclean distfiles TAGS depend uninstall_sub 57618099Spst 57769626Sru# This ENVSETUP gork is required by the DJGPP build on Windows 9X, 57869626Sru# where Make needs to be case-sensitive to find files like BI and VERSION. 57969626SruENVSETUP=\ 58069626Sru if test -f $(srcdir)/makefile.ccpg* && \ 581151497Sru test -f $(srcdir)/Makefile.ccpg*; then \ 582151497Sru FNCASE=y; export FNCASE; \ 58369626Sru else :; \ 58469626Sru fi 58569626Sru 58618099Spstdo=all 58718099Spstdodirs=$(ALLDIRS) dot 58818099Spst# Default target for subdir_Makefile 58969626Srusubdir=src/roff/troff 59018099Spst 59118099Spst 59218099Spst$(TARGETS): 59369626Sru @$(ENVSETUP); $(MAKE) $(MDEFINES) do=$@ $(dodirs) 59418099Spst 59518099Spstdot: FORCE 59669626Sru @$(ENVSETUP); \ 59769626Sru $(MAKE) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \ 59869626Sru -f $(top_srcdir)/Makefile.comm \ 59969626Sru -f $(top_srcdir)/Makefile.sub $(do) 60055839Sasmodai 60118099Spst$(LIBDIRS): FORCE 60269626Sru @$(ENVSETUP); \ 603151497Sru if test $(srcdir) = .; then \ 604151497Sru srcdir=.; \ 605151497Sru else \ 606151497Sru srcdir=`cd $(srcdir); pwd`/$@; \ 60718099Spst fi; \ 60869626Sru test -d $@ || $(mkinstalldirs) $@; \ 60918099Spst cd $@; \ 61069626Sru test -f Makefile.dep || touch Makefile.dep; \ 61118099Spst $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \ 61269626Sru -f $(top_srcdir)/Makefile.comm \ 61369626Sru -f $$srcdir/Makefile.sub \ 61469626Sru -f $(top_srcdir)/Makefile.lib \ 61569626Sru -f Makefile.dep $(do) 61618099Spst 61718099Spst$(CPROGDIRS): FORCE 61869626Sru @$(ENVSETUP); \ 619151497Sru if test $(srcdir) = .; then \ 620151497Sru srcdir=.; \ 621151497Sru else \ 622151497Sru srcdir=`cd $(srcdir); pwd`/$@; \ 62318099Spst fi; \ 62469626Sru test -d $@ || $(mkinstalldirs) $@; \ 62518099Spst cd $@; \ 62669626Sru test -f Makefile.dep || touch Makefile.dep; \ 62718099Spst $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \ 62869626Sru -f $(top_srcdir)/Makefile.comm \ 62969626Sru -f $$srcdir/Makefile.sub \ 63069626Sru -f $(top_srcdir)/Makefile.cpg \ 63169626Sru -f Makefile.dep $(do) 63218099Spst 63318099Spst$(CCPROGDIRS): FORCE 63469626Sru @$(ENVSETUP); \ 635151497Sru if test $(srcdir) = .; then \ 636151497Sru srcdir=.; \ 637151497Sru else \ 638151497Sru srcdir=`cd $(srcdir); pwd`/$@; \ 63918099Spst fi; \ 64069626Sru test -d $@ || $(mkinstalldirs) $@; \ 64118099Spst cd $@; \ 64269626Sru test -f Makefile.dep || touch Makefile.dep; \ 64318099Spst $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \ 64469626Sru -f $(top_srcdir)/Makefile.comm \ 64569626Sru -f $$srcdir/Makefile.sub \ 64669626Sru -f $(top_srcdir)/Makefile.ccpg \ 64769626Sru -f Makefile.dep $(do) 64818099Spst 649151497Sru$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE 65069626Sru @$(ENVSETUP); \ 651151497Sru if test $(srcdir) = .; then \ 652151497Sru srcdir=.; \ 653151497Sru else \ 654151497Sru srcdir=`cd $(srcdir); pwd`/$@; \ 65518099Spst fi; \ 65669626Sru test -d $@ || $(mkinstalldirs) $@; \ 65718099Spst cd $@; \ 65818099Spst $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \ 65969626Sru -f $(top_srcdir)/Makefile.comm \ 66069626Sru -f $$srcdir/Makefile.sub \ 66169626Sru -f $(top_srcdir)/Makefile.dev $(do) 66218099Spst 663151497Sru$(INCDIRS) $(PROGDEPDIRS) $(OTHERDIRS): FORCE 66469626Sru @$(ENVSETUP); \ 665151497Sru if test $(srcdir) = .; then \ 666151497Sru srcdir=.; \ 667151497Sru else \ 668151497Sru srcdir=`cd $(srcdir); pwd`/$@; \ 66918099Spst fi; \ 67069626Sru test -d $@ || $(mkinstalldirs) $@; \ 67118099Spst cd $@; \ 67218099Spst $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \ 67369626Sru -f $(top_srcdir)/Makefile.comm \ 67469626Sru -f $$srcdir/Makefile.sub \ 67569626Sru -f $(top_srcdir)/Makefile.man $(do) 67618099Spst 67718099Spst.PHONY: dist 67818099Spstdist: 67918099Spst -rm -fr tmp 68069626Sru rm -f groff-$(version)$(revision).tar.gz 68118099Spst mkdir tmp 68218099Spst for d in $(DISTDIRS); do \ 68369626Sru $(mkinstalldirs) tmp/$$d; \ 68418099Spst done 68518099Spst srcdir=`cd $(srcdir); pwd`; \ 68618099Spst cd tmp; \ 68718099Spst $(LN_S) ../Makefile .; \ 68818099Spst $(LN_S) $$srcdir/* . 2>/dev/null || true; \ 689104862Sru rm -rf CVS; \ 69018099Spst for d in $(DISTDIRS); do \ 691104862Sru (cd $$d; \ 692104862Sru $(LN_S) $$srcdir/$$d/* . 2>/dev/null; \ 693104862Sru rm -rf CVS || true); \ 69418099Spst done; \ 695104862Sru $(MAKE) srcdir=. VPATH=. distfiles; \ 696104862Sru $(MAKE) srcdir=. VPATH=. extraclean; \ 69718099Spst for d in $(EXTRADIRS); do \ 698151497Sru (cd $$d; \ 699151497Sru if test -f Makefile; then \ 700151497Sru $(MAKE) extraclean; \ 701151497Sru else \ 702151497Sru $(MAKE) -f $(top_builddir)/$$d/Makefile extraclean; \ 703151497Sru fi); \ 70418099Spst done; \ 70518099Spst rm -f Makefile; \ 70618099Spst $(LN_S) $$srcdir/Makefile.init Makefile 70769626Sru mv tmp groff-$(version)$(revision) 70869626Sru tar cfh - groff-$(version)$(revision) | \ 70969626Sru gzip -c >groff-$(version)$(revision).tar.gz 71069626Sru rm -fr groff-$(version)$(revision) 71118099Spst 71218099Spst# $(PROGDIRS): libgroff 71318099Spst# grops grotty grodvi: libdriver 71418099Spst# refer lookbib indxbib lkbib: libbib 71518099Spst# $(LIBDIRS) $(PROGDIRS): include 71618099Spst 71718099Spst.PHONY: $(ALLDIRS) dot $(TARGETS) FORCE 71818099Spst 719104862Sru# Create a Makefile in $(subdir). This is useful for development since it 720104862Sru# avoids running make recursively. 72118099Spstsubdir_Makefile: Makefile.cfg 72218099Spst $(MAKE) do=Makefile $(subdir) 72318099Spst 72418099SpstMakefile.cfg: Makefile 72518099Spst >Makefile.cfg 72618099Spst for var in $(MDEFINES); do \ 72718099Spst echo "$$var" >>Makefile.cfg; \ 72818099Spst done 72918099Spst 73018099SpstMakefile: Makefile.in 73118099Spst $(SHELL) config.status 73218099Spst 73318099Spst.PHONY: uninstall 73418099Spstuninstall: uninstall_sub uninstall_dirs 73518099Spst 73618099Spst.PHONY: uninstall_dirs 73718099Spstuninstall_dirs: 738104862Sru# Use `rmdir' here so that the directories are only removed if they are empty. 73918099Spst -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \ 740104862Sru $(tmacdir) $(systemtmacdir) $(localtmacdir) \ 741104862Sru $(fontdir) $(localfontdir) $(bindir) \ 742151497Sru $(datasubdir) $(dataprogramdir) $(infodir) \ 743151497Sru $(exampledir) $(htmldocdir) $(pdfdocdir) $(docdir) \ 744151497Sru $(libprogramdir) $(libdir) \ 745151497Sru $(datadir)/doc/groff $(datadir)/doc $(datadir) 2>/dev/null || : 74618099Spst 747151497Sru.PHONY: check docheck 748151497Srucheck: site.exp docheck 74918099Spst 750151497Srudocheck: 751151497Sru if $(SHELL) -c "runtest --version" > /dev/null 2>&1; then \ 752151497Sru runtest; \ 753151497Sru else \ 754151497Sru echo "WARNING: could not find \`runtest'" 1>&2; \ 755151497Sru fi 75618099Spst 757151497Sru# This snippet has been taken from the automake package. 758151497Sru 759151497Srusite.exp: 760151497Sru @echo "Making a new site.exp file..." 761151497Sru @echo "## these variables are automatically generated by make ##" >site.tmp 762151497Sru @echo "# Do not edit here. If you wish to override these values" >>site.tmp 763151497Sru @echo "# edit the last section" >>site.tmp 764151497Sru @echo "set tool groff" >>site.tmp 765151497Sru @echo "set srcdir $(srcdir)/testsuite" >>site.tmp 766151497Sru @echo "set objdir `pwd`" >> site.tmp 767151497Sru @echo "## All variables above are generated by configure. Do not edit! ##" >> site.tmp 768151497Sru @test ! -f site.exp \ 769151497Sru || sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp 770151497Sru @-rm -f site.bak 771151497Sru @test ! -f site.exp || mv site.exp site.bak 772151497Sru @mv site.tmp site.exp 773151497Sru 77418099SpstFORCE: 77518099Spst 77618099Spst.NOEXPORT: 777