1 # Makefile.in for the documentation of yash
2 # (C) 2007-2014 magicant
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # NOTE: In this Makefile it is assumed that the make implementation allows the
18 # use of hyphens in target names. This means that there may be a strictly
19 # POSIX-conforming implementation of make that rejects this Makefile. I have
20 # never seen such an implementation but if you know of one please let me know.
23 .SUFFIXES: .txt .1 .xml .html
27 subdir = doc/$(LOCALE)
31 ASCIIDOCFLAGS = @ASCIIDOCFLAGS@
32 ASCIIDOCATTRS = @ASCIIDOCATTRS@
36 INSTALL_PROGRAM = @INSTALL_PROGRAM@
37 INSTALL_DATA = @INSTALL_DATA@
38 INSTALL_DIR = @INSTALL_DIR@
44 # MAINTXTS must be in the contents order
45 MAINTXTS = intro.txt invoke.txt syntax.txt params.txt expand.txt pattern.txt redir.txt exec.txt interact.txt job.txt builtin.txt lineedit.txt posix.txt faq.txt fgrammar.txt
46 # BUILTINTXTS must be in the alphabetic order
47 BUILTINTXTS = _alias.txt _array.txt _bg.txt _bindkey.txt _break.txt _cd.txt _colon.txt _command.txt _complete.txt _continue.txt _dirs.txt _disown.txt _dot.txt _echo.txt _eval.txt _exec.txt _exit.txt _export.txt _false.txt _fc.txt _fg.txt _getopts.txt _hash.txt _help.txt _history.txt _jobs.txt _kill.txt _popd.txt _printf.txt _pushd.txt _pwd.txt _read.txt _readonly.txt _return.txt _set.txt _shift.txt _suspend.txt _test.txt _times.txt _trap.txt _true.txt _type.txt _typeset.txt _ulimit.txt _umask.txt _unalias.txt _unset.txt _wait.txt
48 # CONTENTSTXTS must be in the contents order
49 CONTENTSTXTS = $(MAINTXTS) $(BUILTINTXTS)
50 TXTS = $(MANTXT) $(INDEXTXT) $(CONTENTSTXTS)
51 MANFILE = $(MANTXT:.txt=.1)
52 INDEXHTML = $(INDEXTXT:.txt=.html)
53 HTMLFILES = $(INDEXHTML) $(CONTENTSTXTS:.txt=.html)
54 HTMLAUXFILES = asciidoc.css
55 TARGETS = $(MANFILE) $(HTMLFILES)
56 CONFFILE = asciidoc.conf
60 exec_prefix = @exec_prefix@
62 datarootdir = @datarootdir@
64 yashdatadir = $(datadir)/$(TARGET)
65 localedir = @localedir@
67 man1dir = $(mandir)/man1
71 localemandir = $(mandir)/$(LOCALE)
72 localeman1dir = $(localemandir)/man1
73 localedocdir = $(docdir)/$(LOCALE)
74 localehtmldir = $(htmldir)/$(LOCALE)
87 $(A2X) -d manpage -f manpage -L $(A2XFLAGS) $(ASCIIDOCATTRS) $<
89 $(ASCIIDOC) -b html -d article $(ASCIIDOCFLAGS) $(ASCIIDOCATTRS) $<
91 $(MANTXT): ../makeyash.sh $(MANTXT).in
92 $(SHELL) ../makeyash.sh $(CONTENTSTXTS) <$@.in >$@
93 $(INDEXTXT): ../makeindex.sh $(INDEXTXT).in $(MAINTXTS)
94 $(SHELL) ../makeindex.sh $(MAINTXTS) <$@.in >$@
95 $(MANFILE): $(MANTXT) $(CONTENTSTXTS) $(CONFFILE) Makefile
96 $(HTMLFILES): $(CONFFILE) Makefile
97 # update date in index.html when any contents file has been modified
98 $(INDEXHTML): $(CONTENTSTXTS)
101 install-data-rec: install-data
102 install-html-rec: install-html
103 installdirs-rec: installdirs
104 installdirs-data-rec: installdirs-data
105 installdirs-html-rec: installdirs-html
106 uninstall-rec: uninstall
107 uninstall-data-rec: uninstall-data
109 INSTALLDIRS = $(DESTDIR)$(localeman1dir) $(DESTDIR)$(localehtmldir)
110 install: install-data
111 install-data: man installdirs-data
112 $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(localeman1dir)
113 install-html: html installdirs-html
114 $(INSTALL_DATA) $(HTMLFILES) $(HTMLAUXFILES) $(DESTDIR)$(localehtmldir)
115 installdirs: installdirs-data
116 installdirs-data: $(DESTDIR)$(localeman1dir)
117 installdirs-html: $(DESTDIR)$(localehtmldir)
120 uninstall: uninstall-data
122 rm -f $(DESTDIR)$(localeman1dir)/$(MANFILE)
123 (if cd $(DESTDIR)$(localehtmldir); then rm -f $(HTMLFILES) $(HTMLAUXFILES); fi)
124 -rmdir $(DESTDIR)$(localehtmldir)
126 DISTFILES = $(TARGETS) $(HTMLAUXFILES) $(TXTS) $(MANTXT).in $(INDEXTXT).in Makefile.in $(CONFFILE)
127 distfiles: $(DISTFILES)
128 copy-distfiles: distfiles
129 mkdir -p $(topdir)/$(DISTTARGETDIR)
130 cp $(DISTFILES) $(topdir)/$(DISTTARGETDIR)
132 mostlyclean: _mostlyclean
136 distclean: _distclean
139 maintainer-clean: _maintainer-clean
140 _maintainer-clean: _distclean
141 rm -fr $(TARGETS) $(MANTXT) $(INDEXTXT)
143 Makefile: Makefile.in $(topdir)/config.status
144 @+(cd $(topdir) && $(MAKE) config.status)
145 @(cd $(topdir) && $(SHELL) config.status $(subdir)/$@)
147 default-rec all-rec man-rec html-rec install-rec install-data-rec install-html-rec installdirs-rec installdirs-data-rec installdirs-html-rec uninstall-rec uninstall-data-rec mostlyclean clean distclean maintainer-clean:
148 @+for dir in $(recdirs); do (cd $$dir && $(MAKE) $@) done
150 .PHONY: default-rec all-rec man-rec html-rec default all man html install-rec install-data-rec install-html-rec installdirs-rec installdirs-data-rec installdirs-html-rec uninstall-rec uninstall-data-rec install install-data install-html installdirs installdirs-data installdirs-html uninstall uninstall-data distfiles copy-distfiles mostlyclean _mostlyclean clean _clean distclean _distclean maintainer-clean _maintainer-clean