# Definitions for:
#
# $Header: /home/uebb/uebb/CVS/ocs/doc/oasysman/SysDefs,v 1.6 1999/10/25 19:09:16 kd Exp $


# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Fundamental system definitions (please fill out)


# Name of the system 

NODENAME = oasysman
DOCNAME = OasysManual
HTMLS = $(DOCNAME).html $(DOCNAME)_toc.html $(DOCNAME)_body.html \
        $(DOCNAME)_indices.html $(DOCNAME)_title.html


# The names of the direct subdirectories of this node 
# also to be built. NOTE that these are not the OCS subsystems 
# but rather reflect the hierarchy of the project tree. 

SUBNODES  = 


# Sources of the system included into a release

SOURCES = SysDefs


# Manuals attached to this system included into a release

MANUALS = 


# All components of this system. Add here auxiliary
# files which shall not be included into a release.

COMPONENTS = $(SOURCES) $(MANUALS) $(DOCNAME).texi SysDefs

# Include this statement to deactivate the derived object cache. 
#.BPOOL:


# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Fundamental system rules (please fill out)


# The default target

_default: $(DOCNAME).html


# The action on this node associated with 'all'

_all: $(DOCNAME).html $(DOCNAME).ps


## need to redefine TEXI2DVI
TEXI2DVI = MAKEINFO=$(DOSFOP)/bin/dosfopMacroExpander \
           TEXINPUTS=$(DOSFOP)/tex:$(TEXINPUTS) \
	   $(DOSFOP)/bin/texi2dvi

#just in case the rule is not predefined
%.dvi: %.expanded
	mv $*.texi $*.texi.old
	cp $*.expanded $*.texi
	$(TEXI2DVI) $<
	mv $*.texi.old $*.texi

%.expanded: %.texi
	$(PERL) $(DOSFOP)/bin/dosfopMacroExpander -E $@ $<

%.html %_toc.html %_body.html %_indices.html %_title.html: %.expanded
	mv $*.texi $*.texi.old
	cp $*.expanded $*.texi
	$(PERL) $(DOSFOP)/bin/texi2html -menu  -toc_name "Table of Contents" -verbose $*.texi
	mv $*.texi.old $*.texi

%.ps: %.dvi
	$(DVIPS) $< -o $@

# The action on this node associated with 'check'

_check: $(DOCNAME).texi
	

# The action on this node associated with 'clean'

_clean:
	$(RM) -f *.aux *.log *.toc  *.ps *.cp *.cps *.fn *.fns *.ky *.pg *.tp *.tps *.vr *.dvi *.html

# The action associated with 'install' 

_install: $(INSTALLDOCPATH)/html/$(DOCNAME).html $(INSTALLDOCPATH)/ps/$(DOCNAME).ps

$(INSTALLDOCPATH)/html/$(DOCNAME).html: $(HTMLS)
	@if [ -z $(INSTALLDOCPATH) ] ; \
	then $(ECHO) "You must define the variable INSTALLDOCPATH and INSTALLDOCFLAGS."; \
	else $(ECHO) "Installing document $(DOCNAME).html in $(INSTALLDOCPATH)/html"; \
	     $(OCSOM)/etc/xinstall $(INSTALLDOCFLAGS) $(HTMLS) \
                  $(INSTALLDOCPATH)/html || exit 1; \
        fi

$(INSTALLDOCPATH)/ps/$(DOCNAME).ps: $(DOCNAME).ps
	@if [ -z $(INSTALLDOCPATH) ] ; \
	then $(ECHO) "You must define the variable INSTALLDOCPATH and INSTALLDOCFLAGS."; \
	else $(ECHO) "Installing document $(DOCNAME).ps in $(INSTALLDOCPATH)/ps"; \
	     $(OCSOM)/etc/xinstall $(INSTALLDOCFLAGS) $^ \
                  $(INSTALLDOCPATH)/ps || exit 1; \
        fi



# A definitions and rules file which shall be build and afterwards recursivly 
# included with each run of shape. If LOCALDEFS is defined, you must 
# also give a rule how to create it.

LOCALDEFS =

#include $(LOCALDEFS)
#$(LOCALDEFS):


# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Release management definitions (fill out if required)

# The file which carries the `lastrelease' and `inrelease' attributes
#   If this variable is defined, the project tree starting at this
#   node is considered to be a subrelease.

VERSIONFILE =

# Additional files which shall get the attributes
# (can be located in other systems)

AUXVERSIONFILES =


# Path to this node relative to the root of the release tree

RELEASENODEPATH = doc

# Derived objects which shall be included into the release

RELEASEOBJECTS = $(DOCNAME).ps $(DOCNAME).dvi $(HTMLS)


# Path to the boot area for this node relative to the release tree

RELEASEBOOTPATH = 

# Sources which shall be included into the boot area of a release

BOOTSOURCES =

# Derived objects which shall be included into the boot area of a release

BOOTOBJECTS =


# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Release management rules (fill out if required)


# The action to derive the release objects

_releaseobjects:$(RELEASEOBJECTS)

# The action to derive the boot objects

_bootobjects:


# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Include generic rules (do not change)

include $(OMLIBPATH)/GlobalRules
