home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / util / gnu / groff_src.lha / groff-1.10src / Makefile.in < prev    next >
Makefile  |  1995-06-27  |  14KB  |  397 lines

  1. # Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  2. #      Written by James Clark (jjc@jclark.com)
  3. # This file is part of groff.
  4. # groff is free software; you can redistribute it and/or modify it under
  5. # the terms of the GNU General Public License as published by the Free
  6. # Software Foundation; either version 2, or (at your option) any later
  7. # version.
  8. # groff is distributed in the hope that it will be useful, but WITHOUT ANY
  9. # WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  11. # for more details.
  12. # You should have received a copy of the GNU General Public License along
  13. # with groff; see the file COPYING.  If not, write to the Free Software
  14. # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  15.  
  16. # Define `page' to be letter if your PostScript printer uses 8.5x11
  17. # paper (USA) and define it to be A4, if it uses A4 paper (rest of the
  18. # world).
  19. PAGE=@PAGE@
  20.  
  21. # Normally the Postscript driver, grops, produces output that conforms
  22. # to version 3.0 of the Adobe Document Structuring Conventions.
  23. # Unfortunately some spoolers and previewers can't handle such output.
  24. # The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
  25. # make its output acceptable to such programs.  This variable controls
  26. # only the default behaviour of grops; the behaviour can be changed at
  27. # runtime by the grops -b option (and so by groff -P-b).
  28. # Use a value of 0 if your spoolers and previewers are able to handle
  29. # conforming PostScript correctly.
  30. # Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
  31. # this is needed for early versions of TranScript that get confused by
  32. # anything between the %%EndProlog line and the first %%Page: comment.
  33. # Add 2 if lines in included files beginning with %! should be
  34. # stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
  35. # Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
  36. # stripped out of included files; this is needed for spoolers that
  37. # don't understand the %%{Begin,End}Document comments. I suspect this
  38. # includes early versions of TranScript.
  39. # Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
  40. # rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
  41. # with a printer that requires page reversal.
  42. BROKEN_SPOOLER_FLAGS=@BROKEN_SPOOLER_FLAGS@
  43.  
  44. # DEVICE is the default device.
  45. DEVICE=ps
  46.  
  47. # PSPRINT is the command to use for printing a PostScript file,
  48. # for example `lpr'.
  49. PSPRINT=@PSPRINT@
  50.  
  51. # DVIPRINT is the command to use for printing a TeX dvi file,
  52. # for example `lpr -d'.
  53. DVIPRINT=@DVIPRINT@
  54.  
  55. # Prefix for names of programs that have Unix counterparts.
  56. # For example, if `g' is `g' then troff will be installed as
  57. # gtroff.  This doesn't affect programs like grops or groff that have
  58. # no Unix counterparts.  Note that the groff versions of eqn and tbl
  59. # will not work with Unix troff.
  60. g=@g@
  61.  
  62. # Common prefix for installation directories.
  63. # Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
  64. # This must already exist when you do make install.
  65. prefix=@prefix@
  66.  
  67. exec_prefix=@exec_prefix@
  68.  
  69. # bindir says where to install executables.
  70. bindir=$(exec_prefix)/bin
  71.  
  72. # datasubdir says where to install data files
  73. datadir=$(prefix)/share
  74. datasubdir=$(datadir)/groff
  75.  
  76. # fontdir says where to install dev*/*.
  77. fontdir=$(datasubdir)/font
  78.  
  79. # fontpath says where to look for dev*/*.
  80. fontpath=.:$(fontdir):/usr/lib/font
  81.  
  82. # tmacdir says where to install macros.
  83. tmacdir=$(datasubdir)/tmac
  84.  
  85. # tmacpath says where to look for macro files.
  86. tmacpath=.:$(tmacdir)
  87.  
  88. # sys_tmac_prefix is prefix (if any) for system macro packages
  89. sys_tmac_prefix=@sys_tmac_prefix@
  90.  
  91. # tmac_wrap is list of system macro packages that should be made
  92. # available to groff by creating a corresponding macro package
  93. # in the groff macro directory that references the system macro
  94. # package.
  95. tmac_wrap=@tmac_wrap@
  96.  
  97. # If there is a groff version of a macro package listed in $(tmac_wrap),
  98. # then the groff version will be installed with a prefix of this.
  99. # Don't make this empty.
  100. tmac_prefix=g
  101.  
  102. # The groff -mm macros will be available as -m($(tmac_m_prefix)m.
  103. tmac_m_prefix=\
  104.  `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
  105. # The groff -ms macros will be available as -m($(tmac_m_prefix)s.
  106. tmac_s_prefix=\
  107.  `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
  108. # The groff -man macros will be available as -m($(tmac_m_prefix)an.
  109. tmac_an_prefix=\
  110.  `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`
  111.  
  112. # Extension to be used for refer index files.  Index files are not
  113. # sharable between different architectures, so you might want to use
  114. # different suffixes for different architectures.  Choose an extension
  115. # that doesn't conflict with refer or any other indexing program.
  116. indexext=.i
  117.  
  118. # Directory containing the default index for refer.
  119. indexdir=/usr/dict/papers
  120.  
  121. # The filename (without suffix) of the default index for refer.
  122. indexname=Ind
  123.  
  124. # common_words_file is a file containing a list of common words.
  125. # If your system provides /usr/lib/eign it will be copied onto this,
  126. # otherwise the supplied eign file will be used.
  127. common_words_file=$(datasubdir)/eign
  128.  
  129. # manroot is the root of the man page directory tree.
  130. manroot=$(prefix)/man
  131.  
  132. # man1ext is the man section for user commands.
  133. man1ext=1
  134. man1dir=$(manroot)/man$(man1ext)
  135.  
  136. # man5ext is the man section for file formats.
  137. man5ext=5
  138. man5dir=$(manroot)/man$(man5ext)
  139.  
  140. # man7ext is the man section for macros.
  141. man7ext=7
  142. man7dir=$(manroot)/man$(man7ext)
  143.  
  144. # DEFINES should include the following:
  145. # -DHAVE_MMAP            if you have mmap() and <sys/mman.h>
  146. # -DARRAY_DELETE_NEEDS_SIZE    if your C++ doesn't understand `delete []'
  147. # -DHAVE_SYS_SIGLIST        if you have sys_siglist[]
  148. # -DWCOREFLAG=0200        if the 0200 bit of the status returned by
  149. #                wait() indicates whether a core image was
  150. #                produced for a process that was terminated
  151. #                by a signal
  152. # -DHAVE_UNISTD_H        if you have <unistd.h>
  153. # -DHAVE_CC_OSFCN_H        if you have a C++ <osfcn.h>
  154. # -DHAVE_DIRENT_H        if you have <dirent.h>
  155. # -DHAVE_LIMITS_H        if you have <limits.h>
  156. # -DHAVE_CC_LIMITS_H        if you have a C++ <limits.h>
  157. # -DHAVE_SYS_DIR_H        if you have <sys/dir.h>
  158. # -DHAVE_STDLIB_H        if you have <stdlib.h>
  159. # -DHAVE_RENAME            if you have rename()
  160. # -DHAVE_MKSTEMP        if you have mkstemp()
  161. # -DSTDLIB_H_DECLARES_GETOPT    if your C++ <stdlib.h> declares getopt()
  162. # -DUNISTD_H_DECLARES_GETOPT    if your C++ <unistd.h> declares getopt()
  163. # -DSTDLIB_H_DECLARES_PUTENV    if your C++ <stdlib.h> declares putenv()
  164. # -DSTDIO_H_DECLARES_POPEN    if your C++ <stdio.h> declares popen()
  165. # -DTRADITIONAL_CPP        if your C++ compiler uses a traditional
  166. #                (Reiser) preprocessor.
  167. # -DLONG_FOR_TIME_T        if localtime() takes a long * not a time_t *
  168. # -DHAVE_STRUCT_EXCEPTION    if <math.h> defines struct exception
  169. # -DRETSIGTYPE=int        if signal handlers return int not void    
  170. DEFINES=@DEFS@
  171.  
  172. # Include fmod.o, strtol.o, getcwd.o, strerror.o, putenv.o  in LIBOBJS if
  173. # your C library is missing the corresponding function.
  174. LIBOBJS=@LIBOBJS@
  175.  
  176. # CCC is the compiler for C++ (.cc) files.
  177. CCC=@CXX@
  178. CC=@CC@
  179. # CCDEFINES are definitions for C++ compilations.
  180. CCDEFINES=$(DEFINES)
  181. # CDEFINES are definitions for C compilations.
  182. CDEFINES=$(DEFINES)
  183.  
  184. CCFLAGS=@CXXFLAGS@
  185. CFLAGS=@CFLAGS@
  186. LDFLAGS=
  187. YACC=@YACC@
  188. YACCFLAGS=-v
  189.  
  190. LIBS=@LIBS@
  191. RANLIB=@RANLIB@
  192. INSTALL=@INSTALL@
  193. INSTALL_PROGRAM=@INSTALL_PROGRAM@
  194. INSTALL_DATA=@INSTALL_DATA@
  195. LN_S=@LN_S@
  196. AR=ar
  197. ETAGS=etags
  198. ETAGSFLAGS=
  199. # Flag that tells etags to assume C++.
  200. ETAGSCCFLAG=-C
  201. # Full path to perl.
  202. PERLPATH=@PERLPATH@
  203. # Sed command with which to edit sh scripts.
  204. SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@
  205. srcdir = @srcdir@
  206. VPATH = @srcdir@
  207.  
  208. PURIFY=purify
  209. PURIFYCCFLAGS=
  210. #PURIFYCCFLAGS=-g++=yes \
  211. #  -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
  212.  
  213. # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
  214. # copy of $(MDEFINES) when making individual directories; this could
  215. # cause the argument list to become too long on some systems.
  216. MDEFINES="MAKEOVERRIDES=$(MAKEOVERRIDES)" \
  217.   "PAGE=$(PAGE)" "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
  218.   "DEVICE=$(DEVICE)" "PSPRINT=$(PSPRINT)" "DVIPRINT=$(DVIPRINT)" \
  219.   "prefix=$(prefix)" "exec_prefix=$(exec_prefix)" "bindir=$(bindir)" \
  220.   "g=$(g)" "datadir=$(datadir)" "datasubdir=$(datasubdir)" \
  221.   "fontdir=$(fontdir)" "fontpath=$(fontpath)" \
  222.   "tmacdir=$(tmacdir)" "tmacpath=$(tmacpath)" \
  223.   "indexext=$(indexext)" "indexdir=$(indexdir)" \
  224.   "indexname=$(indexname)" "common_words_file=$(common_words_file)" \
  225.   "manroot=$(manroot)" "man1ext=$(man1ext)" "man1dir=$(man1dir)" \
  226.   "man5ext=$(man5ext)" "man5dir=$(man5dir)" \
  227.   "man7ext=$(man7ext)" "man7dir=$(man7dir)" \
  228.   "tmac_wrap=$(tmac_wrap)" "sys_tmac_prefix=$(sys_tmac_prefix)" \
  229.   "tmac_an_prefix=$(tmac_an_prefix)" \
  230.   "tmac_s_prefix=$(tmac_s_prefix)" "tmac_m_prefix=$(tmac_m_prefix)" \
  231.   "CCC=$(CCC)" "CC=$(CC)" "CCDEFINES=$(CCDEFINES)" "CDEFINES=$(CDEFINES)" \
  232.   "CCFLAGS=$(CCFLAGS)" "CFLAGS=$(CFLAGS)" "LDFLAGS=$(LDFLAGS)" \
  233.   "YACC=$(YACC)" "YACCFLAGS=$(YACCFLAGS)" \
  234.   "LIBS=$(LIBS)" "LIBOBJS=$(LIBOBJS)" "RANLIB=$(RANLIB)" "AR=$(AR)" \
  235.   "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_DATA=$(INSTALL_DATA)" \
  236.   "ETAGS=$(ETAGS)" "ETAGSFLAGS=$(ETAGSFLAGS)" "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
  237.   "PERLPATH=$(PERLPATH)" "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
  238.   "PURIFY=$(PURIFY)" "PURIFYCCFLAGS=$(PURIFYCCFLAGS)"
  239.  
  240. SHELL=/bin/sh
  241. INCDIRS=include
  242. LIBDIRS=libgroff libdriver libbib
  243. CCPROGDIRS=groff troff tbl pic eqn grops grotty grodvi tfmtodit \
  244.   grolj4 hpftodit refer lookbib indxbib lkbib soelim addftinfo
  245. CPROGDIRS=pfbtops psbb
  246. PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS)
  247. DEVDIRS=devps devdvi devascii devlatin1 devX75 devX75-12 devX100 devX100-12 \
  248.   devlj4
  249. OTHERDIRS=man tmac afmtodit grog nroff mm
  250. ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDIRS)
  251. EXTRADIRS=devps/generate devdvi/generate xditview doc
  252. DISTDIRS=$(ALLDIRS) $(EXTRADIRS)
  253. TARGETS=all install install_bin install_data clean distclean mostlyclean \
  254.   realclean extraclean distfiles TAGS depend uninstall_sub
  255.  
  256. do=all
  257. dodirs=$(ALLDIRS) dot
  258. # Default target for subdir_Makefile
  259. subdir=troff
  260.  
  261.  
  262. $(TARGETS):
  263.     @$(MAKE) $(MDEFINES) do=$@ $(dodirs)
  264.  
  265. dot: FORCE
  266.     @$(MAKE) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \
  267.         -f $(srcdir)/Makefile.comm -f $(srcdir)/Makefile.sub $(do)
  268.     
  269. $(LIBDIRS): FORCE
  270.     @if test $(srcdir) = .; \
  271.     then srcdir=.; \
  272.     else srcdir=`cd $(srcdir); pwd`/$@; \
  273.     fi; \
  274.     test -d $@ || mkdir $@; \
  275.     cd $@; \
  276.     $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
  277.         -f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
  278.             -f $$srcdir/../Makefile.lib -f $$srcdir/Makefile.dep $(do)
  279.  
  280. $(CPROGDIRS): FORCE
  281.     @if test $(srcdir) = .; \
  282.     then srcdir=.; \
  283.     else srcdir=`cd $(srcdir); pwd`/$@; \
  284.     fi; \
  285.     test -d $@ || mkdir $@; \
  286.     cd $@; \
  287.     $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
  288.         -f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
  289.             -f $$srcdir/../Makefile.cpg -f $$srcdir/Makefile.dep $(do)
  290.  
  291. $(CCPROGDIRS): FORCE
  292.     @if test $(srcdir) = .; \
  293.     then srcdir=.; \
  294.     else srcdir=`cd $(srcdir); pwd`/$@; \
  295.     fi; \
  296.     test -d $@ || mkdir $@; \
  297.     cd $@; \
  298.     $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
  299.         -f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
  300.             -f $$srcdir/../Makefile.ccpg -f $$srcdir/Makefile.dep $(do)
  301.  
  302. $(DEVDIRS): FORCE
  303.     @if test $(srcdir) = .; \
  304.     then srcdir=.; \
  305.     else srcdir=`cd $(srcdir); pwd`/$@; \
  306.     fi; \
  307.     test -d $@ || mkdir $@; \
  308.     cd $@; \
  309.     $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
  310.         -f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
  311.         -f $$srcdir/../Makefile.dev $(do)
  312.  
  313. $(INCDIRS) $(OTHERDIRS): FORCE
  314.     @if test $(srcdir) = .; \
  315.     then srcdir=.; \
  316.     else srcdir=`cd $(srcdir); pwd`/$@; \
  317.     fi; \
  318.     test -d $@ || mkdir $@; \
  319.     cd $@; \
  320.     $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
  321.         -f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
  322.             -f $$srcdir/../Makefile.man $(do)
  323.  
  324. version=`cat $(srcdir)/VERSION`
  325.  
  326. .PHONY: dist
  327. dist:
  328.     -rm -fr tmp
  329.     mkdir tmp
  330.     for d in $(DISTDIRS); do \
  331.       mkdir    tmp/$$d; \
  332.     done
  333.     srcdir=`cd $(srcdir); pwd`; \
  334.     cd tmp; \
  335.     $(LN_S) ../Makefile .; \
  336.     $(LN_S) $$srcdir/* . 2>/dev/null || true; \
  337.     for d in $(DISTDIRS); do \
  338.       (cd $$d; $(LN_S) $$srcdir/$$d/* . 2>/dev/null || true); \
  339.     done; \
  340.     $(MAKE) srcdir=$$srcdir VPATH=$$srcdir extraclean; \
  341.     for d in $(EXTRADIRS); do \
  342.       (cd $$d; $(MAKE) extraclean); \
  343.     done; \
  344.     rm -f Makefile; \
  345.     $(LN_S) $$srcdir/Makefile.init Makefile
  346.     mv tmp groff-$(version)
  347.     tar cfh - groff-$(version) | gzip -c >groff-$(version).tar.gz
  348.     rm -fr groff-$(version)
  349.  
  350. # $(PROGDIRS): libgroff
  351. # grops grotty grodvi: libdriver
  352. # refer lookbib indxbib lkbib: libbib
  353. # $(LIBDIRS) $(PROGDIRS): include
  354.  
  355. .PHONY: $(ALLDIRS) dot $(TARGETS) FORCE
  356.  
  357. subdir_Makefile: Makefile.cfg
  358.     $(MAKE) do=Makefile $(subdir)
  359.  
  360. Makefile.cfg: Makefile
  361.     >Makefile.cfg
  362.     for var in $(MDEFINES); do \
  363.       echo "$$var" >>Makefile.cfg; \
  364.     done
  365.  
  366. depend: srcdir_must_be_dot
  367.  
  368. .PHONY: srcdir_must_be_dot
  369. srcdir_must_be_dot:
  370.     @test "X$(srcdir)" = "X." \
  371.       || (echo This target can only be made in the source directory; \
  372.           exit 1)
  373.  
  374. Makefile: Makefile.in
  375.     $(SHELL) config.status
  376.  
  377. .PHONY: uninstall
  378. uninstall: uninstall_sub uninstall_dirs
  379.  
  380. .PHONY: uninstall_dirs
  381. uninstall_dirs:
  382. # Use rmdir here so that the directories are only removed if they're empty
  383.     -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
  384.       $(tmacdir) $(fontdir) $(bindir) $(datasubdir) $(datadir)
  385.  
  386.  
  387. .PHONY: check
  388. check:
  389.  
  390. FORCE:
  391.  
  392. .NOEXPORT:
  393.