home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / groff / man / Makefile < prev    next >
Encoding:
Makefile  |  1991-04-30  |  3.0 KB  |  107 lines

  1. #Copyright (C) 1990 Free Software Foundation, Inc.
  2. #     Written by James Clark (jjc@jclark.uucp)
  3. #
  4. #This file is part of groff.
  5. #
  6. #groff is free software; you can redistribute it and/or modify it under
  7. #the terms of the GNU General Public License as published by the Free
  8. #Software Foundation; either version 1, or (at your option) any later
  9. #version.
  10. #
  11. #groff is distributed in the hope that it will be useful, but WITHOUT ANY
  12. #WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. #FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14. #for more details.
  15. #
  16. #You should have received a copy of the GNU General Public License along
  17. #with groff; see the file LICENSE.  If not, write to the Free Software
  18. #Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. MANROOT=/usr/local/man
  21. # MAN1EXT is the man section for user commands
  22. MAN1EXT=1
  23. MAN1DIR=$(MANROOT)/man$(MAN1EXT)
  24. # MAN5EXT is the man section for file formats
  25. MAN5EXT=5
  26. MAN5DIR=$(MANROOT)/man$(MAN5EXT)
  27. # MAN7EXT is the man section for macros
  28. MAN7EXT=7
  29. MAN7DIR=$(MANROOT)/man$(MAN7EXT)
  30. # FONTDIR says where to install dev*/*
  31. FONTDIR=/usr/local/lib/groff/font
  32. # FONTPATH says where to look for dev*/*
  33. FONTPATH=.:$(FONTDIR):/usr/lib/font
  34. MACRODIR=/usr/local/lib/groff/tmac
  35. # MACROPATH says where to look for tmac.* macro files
  36. MACROPATH=.:$(MACRODIR):/usr/lib/tmac
  37. # DEVICE is the default device
  38. DEVICE=ps
  39. # HYPHENFILE is the file containing the hyphenation patterns
  40. HYPHENFILE=/usr/local/lib/groff/hyphen
  41. TMAC_S=gs
  42. SHELL=/bin/sh
  43. MAN1PAGES=gtroff.n gpic.n grops.n groff.n geqn.n gtbl.n psbb.n gsoelim.n \
  44.     addftinfo.n grodvi.n grotty.n tfmtodit.n afmtodit.n grog.n
  45. MAN5PAGES=groff_font.n groff_out.n
  46. MAN7PAGES=groff_me.n groff_ms.n
  47. MANPAGES= $(MAN1PAGES) $(MAN5PAGES) $(MAN7PAGES)
  48.  
  49. .SUFFIXES: .man .n
  50.  
  51. .man.n:
  52.     @echo Making $@ from $<
  53.     @-rm -f $@
  54.     @sed -e "s;@HYPHENFILE@;$(HYPHENFILE);" \
  55.     -e "s;@FONTDIR@;$(FONTDIR);" \
  56.     -e "s;@FONTPATH@;$(FONTPATH);" \
  57.     -e "s;@MACRODIR@;$(MACRODIR);" \
  58.     -e "s;@MACROPATH@;$(MACROPATH);" \
  59.     -e "s;@DEVICE@;$(DEVICE);" \
  60.     -e "s;@MAN1EXT@;$(MAN1EXT);" \
  61.     -e "s;@MAN5EXT@;$(MAN5EXT);" \
  62.     -e "s;@MAN7EXT@;$(MAN7EXT);" \
  63.     -e "s;@TMAC_S@;$(TMAC_S);" \
  64.     -e "s;@VERSION@;`cat ../VERSION`;" \
  65.     $< >$@
  66.     @chmod 444 $@
  67.  
  68. all: $(MANPAGES)
  69.  
  70. install.nobin: $(MANPAGES)
  71.     -[ -d $(MAN1DIR) ] || mkdir $(MAN1DIR)
  72.     -[ -d $(MAN5DIR) ] || mkdir $(MAN5DIR)
  73.     -[ -d $(MAN7DIR) ] || mkdir $(MAN7DIR)
  74.     @for page in $(MAN1PAGES) ; do \
  75.     target=$(MAN1DIR)/`basename $$page .n`.$(MAN1EXT); \
  76.     rm -f $$target ; \
  77.     echo cp $$page $$target ; \
  78.     cp $$page $$target ; \
  79.     done
  80.     @for page in $(MAN5PAGES) ; do \
  81.     target=$(MAN5DIR)/`basename $$page .n`.$(MAN5EXT); \
  82.     rm -f $$target ; \
  83.     echo cp $$page $$target ; \
  84.     cp $$page $$target ; \
  85.     done
  86.     @for page in $(MAN7PAGES) ; do \
  87.     target=$(MAN7DIR)/`basename $$page .n`.$(MAN7EXT); \
  88.     rm -f $$target ; \
  89.     echo cp $$page $$target ; \
  90.     cp $$page $$target ; \
  91.     done
  92.  
  93. $(MANPAGES): ../VERSION
  94.  
  95. install.bin:
  96.  
  97. install: install.bin install.nobin
  98.  
  99. clean:
  100.     -rm -f $(MANPAGES)
  101.  
  102. distclean: clean
  103.  
  104. realclean: clean
  105.  
  106. TAGS:
  107.