# doc/Makefile.in	-*- Makefile -*-
# $Id: Makefile.in,v 1.2 2001/08/10 06:14:09 sashav Exp $
@MCOMMON@

srcdir = @srcdir@
VPATH = @srcdir@

basedir = ..
thisdir = doc

first_rule: all
dummy:

#
# Distribution variables
#

YODL_RXVT = yodl/aterm.yo yodl/aterm-colours.yo yodl/aterm-environment.yo\
	    yodl/rxvt-files.yo yodl/rxvt-fonts.yo yodl/aterm-login.yo\
	    yodl/rxvt-mousereporting.yo yodl/aterm-options.yo\
	    yodl/aterm-resources.yo yodl/aterm-scrollbar.yo\
	    yodl/aterm-textselection.yo
YODL_RREF = yodl/rxvtRef.yo yodl/rxvtRef-csi.yo yodl/rxvtRef-definitions.yo\
	    yodl/rxvtRef-graphics.yo yodl/rxvtRef-keycodes.yo\
	    yodl/rxvtRef-menubar.yo yodl/rxvtRef-mouse.yo\
	    yodl/rxvtRef-privatemodes.yo yodl/rxvtRef-sequences.yo\
	    yodl/rxvtRef-values.yo yodl/rxvtRef-xpm.yo yodl/rxvtRef-xterm.yo

DIST_ETC  = etc/rxvt.termcap etc/rxvt.terminfo etc/XTerm.ad
DIST_YODL = yodl/masonyodl.yo yodl/versioninfo.yo yodl/versioninfo.yo.in\
	    $(YODL_RXVT) $(YODL_RREF)
DIST_MENU = menu/menu menu/example.menu menu/rxvt.menu menu/terminal.menu\
	    menu/jedmenu.sl
DIST	  = Makefile.in README.greek README.menu README.xvt BUGS FAQ TODO\
	    changes.txt xterm.seq LSM.in aterm.1 aterm.pretbl atermRef.txt\
	    atermRef.html atermRef-frame.html atermRef-toc.html aterm.html 

#-------------------------------------------------------------------------

all:

SEDREPLACE = -e 's%@RXVT_VERSION@%$(VERSION)%g;'\
	     -e 's%@RXVT_LSMDATE@%$(LSMDATE)%g;'\
	     -e 's%@RXVT_DATE@%$(DATE)%g;'\
	     -e 's%@RXVT_MAINTEMAIL@%$(MAINTEMAIL)%g;'\
	     -e 's%@RXVT_MAINT@%$(MAINT)%g;'\
	     -e 's%@RXVT_WEBPAGE@%$(WEBPAGE)%g;'\
	     -e 's%@RXVT_WEBMAINTEMAIL@%$(WEBMAINTEMAIL)%g;'\
	     -e 's%@RXVT_WEBMAINT@%$(WEBMAINT)%g;'\
	     -e 's%@RXVT_FTPSITENAME@%$(FTPSITENAME)%g;'\
	     -e 's%@RXVT_FTPSITEDIR@%$(FTPSITEDIR)%g;'

yodl/versioninfo.yo: yodl/versioninfo.yo.in ../autoconf/Make.common.in
	$(SED) $(SEDREPLACE) < yodl/versioninfo.yo.in > $@

tags allbin:

alldoc:	$(basedir)/aterm.lsm aterm.1 aterm.html atermRef.html atermRef.txt

atermdoc: $(basedir)/$(VERNAME).lsm aterm.1 aterm.html

$(basedir)/aterm.lsm: LSM.in ../autoconf/Make.common.in
	$(SED) $(SEDREPLACE) < LSM.in > $@

aterm.pretbl: $(YODL_RXVT) yodl/versioninfo.yo yodl/masonyodl.yo
	yodl2man -oaterm.pretbl yodl/aterm.yo

aterm.1: aterm.pretbl
	tbl aterm.pretbl > $@

aterm.html: $(YODL_RXVT) yodl/versioninfo.yo yodl/masonyodl.yo
	yodl2html -o$@ yodl/aterm.yo

atermRef.html: $(YODL_RREF) yodl/masonyodl.yo
	yodl2html -o$@ yodl/rxvtRef.yo

atermRef.txt: $(YODL_RREF) yodl/masonyodl.yo
	yodl2txt -o$@ yodl/rxvtRef.yo

clean:
	$(RMF) aterm.man *~ yodl/*~

realclean: clean
	$(RMF) tags aterm.1 aterm.html atermRef.html atermRef.txt

distclean: clean
	$(RMF) Makefile

install: aterm.1
	$(INSTALL_DATA) aterm.1 $(DESTDIR)$(mandir)/$(manprefix)aterm.$(manext)

uninstall:
	-cd $(mandir); $(RMF) $(manprefix)aterm.$(manext)

distdirs:
	mkdir $(basedir)/../$(VERNAME)/$(thisdir)
	mkdir $(basedir)/../$(VERNAME)/$(thisdir)/etc
	mkdir $(basedir)/../$(VERNAME)/$(thisdir)/menu
	mkdir $(basedir)/../$(VERNAME)/$(thisdir)/yodl

distcopy: distdepend
	$(CP) -p $(basedir)/$(VERNAME).lsm $(basedir)/../$(VERNAME);
	$(CP) -p $(DIST)      $(basedir)/../$(VERNAME)/$(thisdir)
	$(CP) -p $(DIST_ETC)  $(basedir)/../$(VERNAME)/$(thisdir)/etc
	$(CP) -p $(DIST_MENU) $(basedir)/../$(VERNAME)/$(thisdir)/menu
	$(CP) -p $(DIST_YODL) $(basedir)/../$(VERNAME)/$(thisdir)/yodl

distdepend: alldoc

# ------------------------------------------------------------------------
# DO NOT DELETE: ugly dependency list follows
