# Makefile for the documentation directory of Meta-HTML.
# Copyright (c) 1995, 1996 Brian J. Fox
# Author: Brian J. Fox (bfox@ai.mit.edu)
CP = cp
RM = rm -f
DBPACK = ../dbutils/dbpack

webroot = /www/`hostname`
docroot = $(webroot)/docs
docdir  = $(docroot)/meta-html

all: manual/functions.db manual/sections.db

manual/functions.db: manual/functions.db.packed
	$(DBPACK) manual/functions.db.packed

manual/sections.db: manual/sections.db.packed
	$(DBPACK) manual/sections.db.packed

# manual/functions.db.packed: manual/functions.db
# 	$(DBPACK) manual/functions.db

# manual/sections.db.packed: manual/sections.db
# 	$(DBPACK) manual/sections.db

install: all
	-if [ "$(docdir)" = "$(docroot)/meta-html" ]; then \
	  mkdir $(webroot); mkdir $(docroot); \
	fi
	-mkdir $(docdir)
	$(CP) -r . $(docdir)/

dist: FORCE
	(cd manual; ../../dbutils/dbpack *.db)

distclean clean: FORCE
	$(RM) *~ */*.db
	$(RM) -rf manual/ORIG

FORCE:
