Process all asciidoc-generated man pages with sed

This makes things a bit simpler and more generic.
This commit is contained in:
Jim Ramsay 2009-02-17 20:52:35 -05:00
parent bd8275b33c
commit 6beb1f96b2
5 changed files with 22 additions and 16 deletions

View file

@ -2,17 +2,14 @@
# Makefile.am for fluxbox/doc # Makefile.am for fluxbox/doc
SUBDIRS = ru SUBDIRS = ru
CLEANFILES = fluxbox.1 fluxbox-style.5 CLEANFILES = fluxbox.1 fluxbox-apps.5 fluxbox-keys.5 fluxbox-remote.1 fluxbox-style.5
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
man_MANS = fluxbox.1 fbsetroot.1 fbrun.1 fbsetbg.1 \ man_MANS = fbsetroot.1 fbrun.1 fbsetbg.1 startfluxbox.1 \
startfluxbox.1 fluxbox-style.5 fluxbox-keys.5 fluxbox-apps.5 fluxbox-remote.1 fluxbox.1 fluxbox-apps.5 fluxbox-keys.5 fluxbox-remote.1 fluxbox-style.5
EXTRA_DIST=fluxbox.1.in fbsetroot.1 fbrun.1 fluxbox-keys.5 fluxbox-apps.5 fluxbox-remote.1 startfluxbox.1 fbsetbg.1 \ EXTRA_DIST=fbsetroot.1 fbrun.1 fbsetbg.1 startfluxbox.1 CODESTYLE \
fluxbox-style.5.in CODESTYLE fluxbox.1.in fluxbox-apps.5.in fluxbox-keys.5.in fluxbox-remote.1.in fluxbox-style.5.in
distclean-local: distclean-local:
rm -f *\~ rm -f *\~
fluxbox.1: fluxbox.1.in %: %.in
@regex_cmd@ -e "s,@pkgdatadir@,$(pkgdatadir)," $(srcdir)/fluxbox.1.in > fluxbox.1 @regex_cmd@ -e "s,@pkgdatadir@,$(pkgdatadir)," $^ > $@
fluxbox-style.5: fluxbox-style.5.in
@regex_cmd@ -e "s,@pkgdatadir@,$(pkgdatadir)," $(srcdir)/fluxbox-style.5.in > fluxbox-style.5

View file

@ -2,25 +2,34 @@
# create manpages from the asciidoc files # create manpages from the asciidoc files
# #
SRC1 = fluxbox.txt fluxbox-keys.txt fluxbox-remote.txt SRC1 = fluxbox.txt fluxbox-remote.txt
SRC5 = fluxbox-keys.txt fluxbox-apps.txt fluxbox-style.txt SRC5 = fluxbox-keys.txt fluxbox-apps.txt fluxbox-style.txt
MAN = $(SRC1:.txt=.1) $(SRC5:.txt=.5) MAN = $(SRC1:.txt=.1.in) $(SRC5:.txt=.5.in)
all : $(MAN) all: $(MAN)
install-above: all
cp $(MAN) ../
clean: clean:
rm -fv $(MAN) rm -fv $(MAN)
%.xml : %.txt
asciidoc -b docbook -d manpage -o $@ $<
%.1 : %.xml %.1 : %.xml
xmlto man $< xmlto man $<
%.5 : %.xml %.5 : %.xml
xmlto man $< xmlto man $<
%.1.in: %.1
cp $< $@
%.5.in: %.5
cp $< $@
%.xml : %.txt
asciidoc -b docbook -d manpage -o $@ $<
# Dependencies: # Dependencies:
# #
# fluxbox-apps(5) and fluxbox-keys(5) both include client-patterns.txt # fluxbox-apps(5) and fluxbox-keys(5) both include client-patterns.txt