Imported Upstream version 1.22.4
[platform/upstream/groff.git] / contrib / mm / Makefile.sim
1 # Copyright 1991-2018 Free Software Foundation, Inc.
2 #
3 # Last update: 5 Aug 2015
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.sim
21 #
22 # To install mgm separately as gm.tmac:
23 # make -f Makefile.sub tmacdir=/usr/local/lib/groff/tmac srcdir=. \
24 #       INSTALL_DATA='install -m 644' tmac_m=gm install
25 #
26 # or as m.tmac:
27 #
28 # tmacdir is the destination for your groff/tmac-directory, srcdir is
29 # this directory and INSTALL_DATA is the command to install a file with.
30 # If you dont have 'install': use 'cp'.
31
32
33 # change this to whatever you like
34 tmacdir=/usr/local/lib/groff/tmac
35 #tmac_m = gm
36 tmac_m = m
37 indexdir = xx
38 install = install -m 644
39
40 # Do not change anything below this line
41 srcdir = .
42 version = 2.8
43 mdate = 2002-05-11
44
45 .SUFFIXES: .n .man
46
47 all:
48
49 install: groff_mm.n groff_mmse.n
50         $(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \
51           INSTALL_DATA='$(install)' tmac_m=$(tmac_m) install
52
53 uninstall: groff_mm.n groff_mmse.n
54         $(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \
55           INSTALL_DATA='$(install)' tmac_m=$(tmac_m) uninstall_sub
56
57 .man.n:
58         @echo Making $@ from $<
59         @rm -f $@
60         @sed -e "s|@HYPHENFILE@|$(hyphenfile)|g" \
61              -e "s|@FONTDIR@|$(fontdir)|g" \
62              -e "s|@FONTPATH@|$(fontpath)|g" \
63              -e "s|@MACRODIR@|$(tmacdir)|g" \
64              -e "s|@MACROPATH@|$(tmacpath)|g" \
65              -e "s|@DEVICE@|$(DEVICE)|g" \
66              -e "s|@DEFAULT_INDEX@|$(indexdir)/$(indexname)|g" \
67              -e "s|@DEFAULT_INDEX_NAME@|$(indexname)|g" \
68              -e "s|@INDEX_SUFFIX@|$(indexext)|g" \
69              -e "s|@COMMON_WORDS_FILE@|$(common_words_file)|g" \
70              -e "s|@MAN1EXT@|$(man1ext)|g" \
71              -e "s|@MAN5EXT@|$(man5ext)|g" \
72              -e "s|@MAN7EXT@|$(man7ext)|g" \
73              -e "s|@TMAC_S@|$(tmac_s)|g" \
74              -e "s|@TMAC_M@|$(tmac_m)|g" \
75              -e "s|@TMAC_MDIR@|$(tmacdir)/mm|g" \
76              -e "s|@BROKEN_SPOOLER_FLAGS@|$(BROKEN_SPOOLER_FLAGS)|g" \
77              -e "s|@VERSION@|$(version)|g" \
78              -e "s|@MDATE@|$(mdate)|g" \
79              -e "s|@g@|$(g)|g" \
80              -e "s!@G@;`echo $(g) | tr [a-z] [A-Z]`!g" \
81          $< >$@
82
83 ########################################################################
84 # Editor settings
85 ########################################################################
86 #
87 # Local Variables:
88 # mode: makefile
89 # fill-column: 72
90 # End:
91 # vim: set filetype=make textwidth=72: