#= Makefile for dcpam/doc
#
# Authors::   Yasuhiro MORIKAWA
# Version::   $Id: Makefile,v 1.1.1.1 2008-07-30 08:41:33 morikawa Exp $
# Tag Name::  $Name: dcpam5-20080812 $
# Copyright:: Copyright (C) GFD Dennou Club, 2004-2007. All rights reserved.
# License::   See COPYRIGHT[link:../COPYRIGHT]
#
######################################################################
#
#== Settings

INCLUDEFILE = ../Config.mk
include $(INCLUDEFILE)

DIRS		= code_reference tutorial basic_equations derivation

# End Settings
######################################################################

######################################################################
#== Rules
#
all: rd2html docs

rd2html:
	$(MAKE) -f Makefile.rd2html

docs:
	@for i in $(DIRS) ; do \
	  cd $$i ; \
	  echo "Making $$i/" ; \
	  $(MAKE) || exit 1 ; \
	  cd .. ; \
	done

lpr:
	@for i in $(DIRS) ; do \
	  cd $$i ; \
	  echo "Making $$i/" ; \
	  $(MAKE) lpr || exit 1 ; \
	  cd .. ; \
	done

clean: clean.rd2html clean.local clean.dir

clean.rd2html:
	$(MAKE) -f Makefile.rd2html clean.all

clean.local:
	-$(RM) *~ *.aux

clean.dir:
	@for i in $(DIRS) ; do \
	  cd $$i ; \
	  echo "Cleaning $$i/" ; \
	  $(MAKE) clean || exit 1 ; \
	  cd .. ; \
	done
