# doc/Makefile.in	-*- Makefile -*-
# $Id: Makefile.in,v 1.12.4.4 2000/04/15 08:59:44 gcw Exp $
@MCOMMON@

srcdir =	@srcdir@
VPATH =		@srcdir@
.PATH:		@srcdir@

basedir = ..
thisdir = doc

first_rule: all
dummy:

#
# Distribution variables
#

YODL_RXVT = yodl/rxvt-colours.yo yodl/rxvt-environment.yo\
	    yodl/rxvt-files.yo yodl/rxvt-fonts.yo yodl/rxvt-login.yo\
	    yodl/rxvt-mousereporting.yo yodl/rxvt-options.yo\
	    yodl/rxvt-resources.yo yodl/rxvt-scrollbar.yo\
	    yodl/rxvt-textselection.yo
YODL_RREF = 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/rxvt.yo yodl/rxvt.yo.in $(YODL_RREF)\
	    yodl/rxvtRef.yo.in
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 rxvt.1 rxvt.tbl rxvtRef.txt\
	    rxvtRef.html rxvtRef-frame.html rxvtRef-toc.html rxvt.html 

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

all: rxvt.1

rxvt.1: Makefile
	@if test x$(TBL) = x; then : ; else echo "$(TBL) $(srcdir)/rxvt.tbl | grep -v '^.lf' > rxvt.1"; $(TBL) $(srcdir)/rxvt.tbl | grep -v '^.lf' > rxvt.1 ; fi

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;'

tags allbin:

alldoc:	$(basedir)/$(VERNAME).lsm rxvt.tbl rxvt.1 rxvt.html rxvtRef.html rxvtRef.txt

yodl/versioninfo.yo: yodl/versioninfo.yo.in ../src/version.h
	$(SED) $(SEDREPLACE) < $(srcdir)/yodl/versioninfo.yo.in > $@

$(basedir)/$(VERNAME).lsm: LSM.in $(srcdir)/../autoconf/Make.common.in $(srcdir)/../src/version.h
	$(SED) $(SEDREPLACE) < $(srcdir)/LSM.in > $@

rxvt.tbl: yodl/rxvt.yo $(YODL_RXVT) yodl/versioninfo.yo yodl/masonyodl.yo
	yodl2man -orxvt.tbl yodl/rxvt.yo

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

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

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

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

realclean: clean
	$(RMF) tags rxvt.1 rxvt.html rxvtRef.html rxvtRef.txt

distclean:

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

uninstall:
	-cd $(mandir); $(RMF) $(manprefix)rxvt.$(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
