175584Sru#
2104862Sru# $Id: Makefile.sim,v 2.3 2002/05/22 06:26:12 jhaegg Exp $
375584Sru#
475584Sru# To install mgm separately as gm.tmac:
575584Sru# make -f Makefile.sub tmacdir=/usr/local/lib/groff/tmac srcdir=. \
675584Sru#	INSTALL_DATA='install -m 644' tmac_m=gm install
775584Sru#
875584Sru# or as m.tmac:
975584Sru#
1075584Sru# tmacdir is the destination for your groff/tmac-directory, srcdir is
1175584Sru# this directory and INSTALL_DATA is the command to install a file with.
1275584Sru# If you dont have 'install': use 'cp'.
1375584Sru
1475584Sru
1575584Sru# change this to whatever you like
1675584Srutmacdir=/usr/local/lib/groff/tmac
1775584Sru#tmac_m = gm
1875584Srutmac_m = m
1975584Sruindexdir = xx
2075584Sruinstall = install -m 644
2175584Sru
2275584Sru# Do not change anything below this line
2375584Srusrcdir = .
24104862Sruversion = 2.8
25104862Srumdate = 2002-05-11
2675584Sru
2775584Sru.SUFFIXES: .n .man
2875584Sru
2975584Sruall:
3075584Sru
3175584Sru
3275584Sruinstall: groff_mm.n groff_mmse.n
3375584Sru	$(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \
3475584Sru		INSTALL_DATA='$(install)' tmac_m=$(tmac_m) install
3575584Sru
36104862Sruuninstall: groff_mm.n groff_mmse.n
37104862Sru	$(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \
38104862Sru		INSTALL_DATA='$(install)' tmac_m=$(tmac_m) uninstall_sub
3975584Sru
4075584Sru
4175584Sru.man.n:
4275584Sru	@echo Making $@ from $<
4375584Sru	@-rm -f $@
4475584Sru	@sed -e "s|@HYPHENFILE@|$(hyphenfile)|g" \
4575584Sru	-e "s|@FONTDIR@|$(fontdir)|g" \
4675584Sru	-e "s|@FONTPATH@|$(fontpath)|g" \
4775584Sru	-e "s|@MACRODIR@|$(tmacdir)|g" \
4875584Sru	-e "s|@MACROPATH@|$(tmacpath)|g" \
4975584Sru	-e "s|@DEVICE@|$(DEVICE)|g" \
5075584Sru	-e "s|@DEFAULT_INDEX@|$(indexdir)/$(indexname)|g" \
5175584Sru	-e "s|@DEFAULT_INDEX_NAME@|$(indexname)|g" \
5275584Sru	-e "s|@INDEX_SUFFIX@|$(indexext)|g" \
5375584Sru	-e "s|@COMMON_WORDS_FILE@|$(common_words_file)|g" \
5475584Sru	-e "s|@MAN1EXT@|$(man1ext)|g" \
5575584Sru	-e "s|@MAN5EXT@|$(man5ext)|g" \
5675584Sru	-e "s|@MAN7EXT@|$(man7ext)|g" \
5775584Sru	-e "s|@TMAC_S@|$(tmac_s)|g" \
5875584Sru	-e "s|@TMAC_M@|$(tmac_m)|g" \
5975584Sru	-e "s|@TMAC_MDIR@|$(tmacdir)/mm|g" \
6075584Sru	-e "s|@BROKEN_SPOOLER_FLAGS@|$(BROKEN_SPOOLER_FLAGS)|g" \
6175584Sru	-e "s|@VERSION@|$(version)|g" \
6275584Sru	-e "s|@MDATE@|$(mdate)|g" \
6375584Sru	-e "s|@g@|$(g)|g" \
6475584Sru	-e "s!@G@;`echo $(g) | tr [a-z] [A-Z]`!g" \
6575584Sru	$< >$@
6675584Sru
67