# $XFree86: doctools/sgmlformat/transpec/Makefile,v 1.4 1999/06/12 16:50:52 dawes Exp $

SHELL=/bin/sh

# These are defaults which are normally overriden
PREFIX = /usr/local
INSTALL = install
TRANSPEC_DIR = $(PREFIX)/share/sgml/transpec
TMAC_DIR = $(PREFIX)/share/sgml/tmac

INSTDIR = $(TRANSPEC_DIR)

FILES = roff.cmap roff.sdata linuxdoc-roff.ts docbook-roff.ts \
	html.cmap html.sdata linuxdoc-html.ts docbook-html.ts \
	linuxdoc-index.ts \
	linuxdoc-docbook.ts iso12083article-roff.ts transpec.dtd catalog

all: $(FILES)

linuxdoc-roff.ts: linuxdoc-roff.ts.src
	rm -f linuxdoc-roff.ts
	sed -e 's|##TMACDIR##|$(TMAC_DIR)|' \
	    < linuxdoc-roff.ts.src > linuxdoc-roff.ts

docbook-roff.ts: docbook-roff.ts.src
	rm -f docbook-roff.ts
	sed -e 's|##TMACDIR##|$(TMAC_DIR)|' \
	    < docbook-roff.ts.src > docbook-roff.ts


install: $(FILES)
	@if [ ! -d $(INSTDIR) ]; then \
	  (set -x; mkdir -p $(INSTDIR)); \
	fi
	@for i in $(FILES); do \
	  (set -x; $(INSTALL) -c -m 444 $$i $(INSTDIR)); \
	done

clean:
	rm -f linuxdoc-roff.ts docbook-roff.ts
