## ------------------------------------------------
## Makefile for openal/docs/


## DocBook stuff
DB2PS  =  db2ps
DB2PDF =  db2pdf
DB2HTML = db2html

## TexInfo stuff
MAKEINFO  = makeinfo



## Targets
OALSPEC = oalspecs
DB_OBJS = $(OALSPEC).ps  $(OALSPEC)/index.html

TEXI_OBJS = openal.info





.SUFFIXES: .texi .info

## Rules
%.ps   : %.sgml
	$(DB2PS) $<

%/index.html : %.sgml
	$(DB2HTML) $<


# Fixme - config.h
%.info : %.texi ../config.h
	$(MAKEINFO) $<

default: all

all:	specs 

specs:  $(DB_OBJS)

texi:   $(TEXI_OBJS)

full:	specs
	mv $(OALSPEC)/      $(OALSPEC)-full/
	mv $(OALSPEC).ps    $(OALSPEC)-full.ps

zip:
	zip -r9 $(OALSPEC).ps.zip       $(OALSPEC).ps
	zip -r9 $(OALSPEC)-full.ps.zip  $(OALSPEC)-full.ps

dist:	zip
	tar -zcvf oalspecs.tgz \
	$(OALSPEC).ps.zip       \
	$(OALSPEC)-full.ps.zip  \
	*.html                  \
	$(OALSPEC)/             \
	$(OALSPEC)-full/        \
	$(OALSPEC).sgml


clean:  db_clean texi_clean

db_clean:
	-rm -f $(OALSPEC).dvi
	-rm -f $(OALSPEC).aux
	-rm -f $(OALSPEC).log
	-rm -f $(OALSPEC).tex
	-rm -rf $(OALSPEC).junk
	-rm -f \#*\#

texi_clean:
	@echo "Not done."

install:
	@echo "Not done."

distclean: clean
	-rm -f $(DB_OBJS)
	-rm -rf $(OALSPEC)/*
	-rm -f $(TEXI_OBJS)