about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Makefile.in266
1 files changed, 209 insertions, 57 deletions
diff --git a/Doc/Makefile.in b/Doc/Makefile.in
index 1883abfd1..c2bd6f0d9 100644
--- a/Doc/Makefile.in
+++ b/Doc/Makefile.in
@@ -27,65 +27,106 @@
 subdir = Doc
 dir_top = ..
 
-@@version.mk@@
-@@defs.mk@@
+@VERSION_MK@
+
+# source/build directories
+VPATH           = @srcdir@
+sdir            = @srcdir@
+sdir_top        = @top_srcdir@
+INSTALL         = @INSTALL@
+
+@DEFS_MK@
 
 MAKEINFO = makeinfo
 TEXI2DVI = texi2dvi
-DVIPS = dvips -D 300
+DVIPS = dvips
 TEXI2HTML = texi2html -expandinfo -split_chapter
 
 .SUFFIXES: .yo .1
 
 # man pages to install
-MAN = zsh.1 zshbuiltins.1 zshcompctl.1 \
+MAN = zsh.1 zshbuiltins.1 zshcompctl.1 zshcompwid.1 zshcompsys.1 \
 zshexpn.1 zshmisc.1 zshmodules.1 \
-zshoptions.1 zshparam.1 zshzle.1 zshall.1
+zshoptions.1 zshparam.1 zshzftpsys.1 zshzle.1 zshall.1
 
 # yodl documentation
-YODLDOC = $(MAN) zsh.texi
+
+YODLDOC = $(MAN) texi
+
+MODDOCSRC = \
+Zsh/mod_cap.yo Zsh/mod_clone.yo \
+Zsh/mod_compctl.yo Zsh/mod_complete.yo Zsh/mod_complist.yo \
+Zsh/mod_computil.yo \
+Zsh/mod_deltochar.yo Zsh/mod_example.yo Zsh/mod_files.yo \
+Zsh/mod_mapfile.yo Zsh/mod_mathfunc.yo Zsh/mod_parameter.yo Zsh/mod_sched.yo \
+Zsh/mod_stat.yo Zsh/mod_zftp.yo Zsh/mod_zle.yo Zsh/mod_zleparameter.yo \
+Zsh/mod_zutil.yo Zsh/mod_zprof.yo Zsh/mod_zpty.yo
+
 YODLSRC = zmacros.yo zman.yo ztexi.yo Zsh/arith.yo Zsh/builtins.yo \
-Zsh/compat.yo Zsh/compctl.yo Zsh/cond.yo Zsh/exec.yo Zsh/expn.yo \
-Zsh/filelist.yo Zsh/files.yo Zsh/func.yo Zsh/grammar.yo Zsh/guide.yo \
+Zsh/compat.yo Zsh/compctl.yo Zsh/compsys.yo Zsh/compwid.yo Zsh/cond.yo \
+Zsh/exec.yo Zsh/expn.yo \
+Zsh/filelist.yo Zsh/files.yo Zsh/func.yo Zsh/grammar.yo Zsh/manual.yo \
 Zsh/index.yo Zsh/intro.yo Zsh/invoke.yo Zsh/jobs.yo Zsh/metafaq.yo \
-Zsh/modules.yo Zsh/mod_cap.yo \
-Zsh/mod_clone.yo Zsh/mod_comp1.yo Zsh/mod_compctl.yo Zsh/mod_deltochar.yo \
-Zsh/mod_example.yo Zsh/mod_files.yo Zsh/mod_stat.yo \
-Zsh/mod_zle.yo Zsh/options.yo \
-Zsh/params.yo Zsh/prompt.yo Zsh/redirect.yo Zsh/restricted.yo \
-Zsh/seealso.yo Zsh/zle.yo
+Zsh/modules.yo Zsh/modlist.yo Zsh/modmenu.yo Zsh/manmodmenu.yo $(MODDOCSRC) \
+Zsh/options.yo Zsh/params.yo Zsh/prompt.yo Zsh/redirect.yo Zsh/restricted.yo \
+Zsh/seealso.yo Zsh/zftpsys.yo Zsh/zle.yo
 
 # ========== DEPENDENCIES FOR BUILDING ==========
 
-all: $(MAN) zsh.texi zsh.info ../META-FAQ
+all: man texi ../META-FAQ
+.PHONY: all
 
-everything: all zsh.dvi zsh_us.ps zsh_a4.ps zsh_toc.html
+everything: all dvi ps html
+.PHONY: everything
 
-zsh.dvi: zsh.texi
+dvi: zsh.dvi
+.PHONY: dvi
+
+zsh.dvi: $(sdir)/zsh.texi
 	$(TEXI2DVI) $(sdir)/zsh.texi
 
-zsh.info: zsh.texi
-	$(MAKEINFO) $(sdir)/zsh.texi; exit 0
+texi: $(sdir)/zsh.texi
+.PHONY: texi
+
+$(sdir)/zsh.texi:
+	$(YODL) -o $@ -I$(sdir) -w ztexi.yo version.yo zsh.yo; \
+	test -f $@
 
-zsh.texi: zsh.yo
-	$(YODL) -o $(sdir)/zsh.texi -I$(sdir) -w ztexi.yo version.yo zsh.yo
-	test -f $(sdir)/zsh.texi
+info: zsh.info
+.PHONY: info
+
+zsh.info: $(sdir)/zsh.texi
+	$(MAKEINFO) $(sdir)/zsh.texi
 
 .yo.1:
 	case $@ in \
 	  */*) target=$@ ;; \
 	  *) target=$(sdir)/$@ ;; \
 	esac; \
-	$(YODL) -o $$target -I$(sdir) -w zman.yo version.yo $< || exit 1; \
+	case '$(YODL)' in :*) ;; *) \
+	    $(YODL) -I$(sdir) -w zman.yo version.yo $< | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target \
+	;; esac; \
 	test -f $$target
 
+ps: us_ps a4_ps
+.PHONY: ps
+
+us_ps: zsh_us.ps
+.PHONY: us_ps
+
 zsh_us.ps: zsh.dvi
 	$(DVIPS) -t letter -o $@ zsh.dvi
 
+a4_ps: zsh_a4.ps
+.PHONY: a4_ps
+
 zsh_a4.ps: zsh.dvi
 	$(DVIPS) -t a4 -o $@ zsh.dvi
 
-zsh_toc.html: zsh.texi
+html: zsh_toc.html
+.PHONY: html
+
+zsh_toc.html: $(sdir)/zsh.texi
 	$(TEXI2HTML) $(sdir)/zsh.texi
 
 zshall.1: zsh.yo
@@ -93,14 +134,52 @@ zshall.1: zsh.yo
 	  */*) target=$@ ;; \
 	  *) target=$(sdir)/$@ ;; \
 	esac; \
-	$(YODL) -o $$target -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo || exit 1; \
+	case '$(YODL)' in :*) ;; *) \
+	    $(YODL) -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target \
+	;; esac; \
 	test -f $$target
 
 ../META-FAQ: META-FAQ.yo Zsh/metafaq.yo
-	$(YODL) -I$(sdir) META-FAQ.yo | sed -e '/NEXTLINE/N' -e '/DELLINE/d' -e '/^SECTHEAD$$/{N;s/^SECTHEAD.//;h;s/./-/g;H;g;}' -e 's/  *$$//' > $(sdir_top)/META-FAQ
+	case '$(YODL)' in :*) ;; *) \
+	    $(YODL) -I$(sdir) META-FAQ.yo | sed -e '/NEXTLINE/N' -e '/DELLINE/d' -e '/^SECTHEAD$$/{N;s/^SECTHEAD.//;h;s/./-/g;H;g;}' -e 's/  *$$//' > $(sdir_top)/META-FAQ \
+	;; esac
 	test -f $(sdir_top)/META-FAQ
 
-$(YODLDOC): $(YODLSRC) version.yo
+$(YODLDOC): version.yo
+
+$(sdir)/zsh.texi: $(YODLSRC)
+
+man: $(MAN)
+.PHONY: man
+
+$(MAN): zmacros.yo zman.yo
+
+zsh.1 zshall.1: Zsh/intro.yo Zsh/metafaq.yo Zsh/invoke.yo Zsh/files.yo \
+                Zsh/filelist.yo Zsh/filelist.yo Zsh/seealso.yo
+
+zshbuiltins.1: Zsh/builtins.yo
+
+zshcompctl.1: Zsh/compctl.yo
+
+zshcompwid.1: Zsh/compwid.yo
+
+zshcompsys.1: Zsh/compsys.yo
+
+zshexpn.1: Zsh/expn.yo
+
+zshmisc.1: Zsh/grammar.yo Zsh/redirect.yo Zsh/exec.yo Zsh/func.yo \
+           Zsh/jobs.yo Zsh/arith.yo Zsh/cond.yo Zsh/compat.yo \
+           Zsh/prompt.yo Zsh/restricted.yo
+
+zshmodules.1: Zsh/modules.yo Zsh/modlist.yo Zsh/modmenu.yo $(MODDOCSRC)
+
+zshoptions.1: Zsh/options.yo
+
+zshparam.1: Zsh/params.yo
+
+zshzftpsys.1: Zsh/zftpsys.yo
+
+zshzle.1: Zsh/zle.yo
 
 version.yo: $(sdir_top)/Config/version.mk
 	( \
@@ -110,63 +189,136 @@ version.yo: $(sdir_top)/Config/version.mk
 	  echo 'ENDDEF()#' | tr '#' '\\'; \
 	) > $(sdir)/version.yo
 
+Zsh/modlist.yo: $(MODDOCSRC)
+	( \
+	    echo "startitem()"; \
+	    for modfile in $(MODDOCSRC); do \
+		sed -n '1{s|^COMMENT(!MOD!\(.*\)$$|item(tt(\1))(|;p;d;};/^!MOD!)$$/q;p' \
+		    < $(sdir)/$$modfile; \
+		echo ")"; \
+	    done; \
+	    echo "enditem()"; \
+	    echo "includefile(Zsh/modmenu.yo)"; \
+	    set '' $(MODDOCSRC); \
+	    mod1= mod2= mod3=; \
+	    test ".$$2" = . || \
+		mod2=`sed -n '1{s|^COMMENT(!MOD!||;p;q;}' < $(sdir)/$$2`; \
+	    while test ".$$2" != .; do \
+		mod3=; \
+		test ".$$3" = . || \
+		    mod3=`sed -n '1{s|^COMMENT(!MOD!||;p;q;}' < $(sdir)/$$3`; \
+		echo "texinode(The $$mod2 Module)($${mod3:+The $$mod3 Module})($${mod1:+The $$mod1 Module})(Zsh Modules)"; \
+		echo "sect(The $$mod2 Module)"; \
+		echo "includefile($${2})"; \
+		shift; \
+		mod1=$$mod2; \
+		mod2=$$mod3; \
+	    done \
+	) > $(sdir)/Zsh/modlist.yo
+
+Zsh/modmenu.yo: $(MODDOCSRC)
+	( \
+	    echo "startmenu()"; \
+	    for modfile in $(MODDOCSRC); do \
+		sed -n '1{s|^COMMENT(!MOD!\(.*\)$$|menu(The \1 Module)|;p;q;}' \
+		    < $(sdir)/$$modfile; \
+	    done; \
+	    echo "endmenu()" \
+	) > $(sdir)/Zsh/modmenu.yo
+
+Zsh/manmodmenu.yo: $(MODDOCSRC)
+	( \
+	    for modfile in $(MODDOCSRC); do \
+		sed -n '1{s|^COMMENT(!MOD!\(.*\)$$|menu(The \1 Module)|;p;q;}' \
+		    < $(sdir)/$$modfile; \
+	    done \
+	) > $(sdir)/Zsh/manmodmenu.yo
+
 # ========== DEPENDENCIES FOR INSTALLING ==========
 
-# install all the documentation
-install: install.man install.info
+# install just installs the manual pages
+install: install.man
+.PHONY: install
 
-# uninstall all the documentation
-uninstall: uninstall.man uninstall.info
+# uninstall just unistalls the manual pages
+uninstall: uninstall.man
+.PHONY: uninstall
 
 # install man pages, creating install directory if necessary
-install.man: $(MAN)
-	$(sdir_top)/mkinstalldirs $(mandir)/man1
+install.man: man
+	$(sdir_top)/mkinstalldirs $(DESTDIR)$(mandir)/man1
 	for file in $(MAN); do \
-	  if test -f $$file; then \
-	    $(INSTALL_DATA) $$file $(mandir)/man1; \
-	  elif test -f $(sdir)/$$file; then \
-	    $(INSTALL_DATA) $(sdir)/$$file $(mandir)/man1; \
-	  else :; \
-	  fi || exit 1; \
+	    $(INSTALL_DATA) $(sdir)/$$file $(DESTDIR)$(mandir)/man1/`echo $$file | sed 's|zsh|$(tzsh)|'` || exit 1; \
 	done
+.PHONY: install.man
 
 # install info pages, creating install directory if necessary
-install.info: zsh.info
-	$(sdir_top)/mkinstalldirs $(infodir)
-	for file in zsh.info zsh.info-[1-9]; do \
-	  if test -f $$file; then \
-	    $(INSTALL_DATA) $$file $(infodir); \
-	  elif test -f $(sdir)/$$file; then \
-	    $(INSTALL_DATA) $(sdir)/$$file $(infodir); \
-	  else :; \
-	  fi || exit 1; \
-	done
+install.info: texi
+	$(sdir_top)/mkinstalldirs $(DESTDIR)$(infodir)
+	rm -rf infodir
+	mkdir infodir
+	if ( \
+	    sed '/^@setfilename/s|zsh|$(tzsh)|' \
+		< $(sdir)/zsh.texi > infodir/tzsh.texi && \
+	    (cd infodir && $(MAKEINFO) tzsh.texi) && \
+	    for file in infodir/$(tzsh).info*; do \
+		$(INSTALL_DATA) $$file $(DESTDIR)$(infodir) || exit 1; \
+	    done \
+	); then \
+	    rm -rf infodir; \
+	    exit 0; \
+	else \
+	    rm -rf infodir; \
+	    exit 1; \
+	fi
+.PHONY: install.info
 
 # uninstall man pages
 uninstall.man:
 	for file in $(MAN); do \
-	  rm -f $(mandir)/man1/$$file; \
+	    rm -f $(DESTDIR)$(mandir)/man1/`echo $$file | sed 's|zsh|$(tzsh)|'`; \
 	done
+.PHONY: uninstall.man
 
 # uninstall info pages
 uninstall.info:
-	rm -f $(infodir)/zsh.info $(infodir)/zsh.info-[1-9]
+	rm -f $(DESTDIR)$(infodir)/$(tzsh).info
+	rm -f $(DESTDIR)$(infodir)/$(tzsh).info-[1-9]*
+.PHONY: uninstall.info
+
+# install HTML manual
+install.html: html
+	$(sdir_top)/mkinstalldirs $(DESTDIR)$(htmldir)
+	for file in zsh_*.html; do \
+	    $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir) || exit 1; \
+	done
+.PHONY: install.html
 
-# ========== DEPENDENCIES FOR CLEANUP ==========
+# uninstall HTML manual
+uninstall.html:
+	rm -f $(DESTDIR)$(htmldir)/zsh_*.html
+.PHONY: uninstall.html
 
-@@clean.mk@@
+# ========== DEPENDENCIES FOR CLEANUP ==========
 
 clean-here:
 	rm -f *.html *.info* *.dvi *.ps
 	rm -f *.aux *.cp *.cps *.fn *.fns *.ky *.log
 	rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
+	rm -rf infodir
+.PHONY: clean-here
 
-distclean-here:
+distclean-here: clean-here
 	rm -f Makefile
+.PHONY: distclean-here
+
+realclean-here: distclean-here
+	cd $(sdir) && rm -f Zsh/modlist.yo Zsh/modmenu.yo Zsh/manmodmenu.yo
+	cd $(sdir) && rm -f version.yo ../META-FAQ zsh.texi $(MAN)
+.PHONY: realclean-here
 
-realclean-here:
-	cd $(sdir) && rm -f version.yo *.1 *.texi ../META-FAQ
+@CLEAN_MK@
 
 # ========== DEPENDENCIES FOR MAINTENANCE ==========
 
-@@config.mk@@
+@CONFIG_MK@