Fix some bugs in man page filtering.

This commit is contained in:
Kris Maglione 2008-02-09 17:43:52 -05:00
parent 756230ee93
commit 9787756936
4 changed files with 25 additions and 12 deletions

View File

@ -1,14 +1,18 @@
ROOT=..
include ${ROOT}/mk/hdr.mk
include ${ROOT}/mk/wmii.mk
TARG = wmii.1 \
wmiiloop.1 \
wmiir.1
FILTER = sed "s|CONFPREFIX|${ETC}|g; \
s|CONFVERSION|${CONFVERSION}|g; \
s|P9PATHS|${P9PATHS}|g; \
s|AWKPATH|${AWKPATH}|g"
$(TARG): Makefile $(ROOT)/mk/wmii.mk
FILTER = sed "s|CONFPREFIX|$(ETC)|g; \
s|CONFVERSION|$(CONFVERSION)|g; \
s|P9PATHS|$(P9PATHS)|g; \
s|AWKPATH|$(AWKPATH)|g; \
s|VERSION|$(VERSION)|g"
include ${ROOT}/mk/man.mk

View File

@ -16,7 +16,7 @@ MKCFG!=${MKCFGSH}
include $(MKCFG)
.SILENT:
.SUFFIXES: .O .o .o_pic .c .sh .rc .$(SOEXT) .awk .1 .depend .install .uninstall .clean
.SUFFIXES: .O .o .o_pic .c .sh .rc .$(SOEXT) .awk .1 .man1 .depend .install .uninstall .clean
all:
.c.depend:
@ -28,13 +28,11 @@ all:
.c.o:
$(COMPILE) $@ $<
.c.o_pic:
$(COMPILEPIC) $@ $<
.o.O:
$(LINK) $@ $<
.c.O:
$(COMPILE) ${<:.c=.o} $<
$(LINK) $@ ${<:.c=.o}
@ -48,6 +46,9 @@ all:
echo FILTER $(BASE)$<
$(FILTER) $< >$@
chmod 0755 $@
.1.man1:
echo FILTER $(BASE)$<
$(FILTER) $< >$@
.O.install:
echo INSTALL $$($(CLEANNAME) $(BASE)$*)
@ -73,11 +74,14 @@ all:
echo UNINSTALL $$($(CLEANNAME) $(BASE)$<)
rm -f $(INCLUDE)/$<
.1.install:
echo INSTALL man $$($(CLEANNAME) $*'(1)')
$(FILTER) $< >$(MAN)/man1/$<
chmod 0644 $(MAN)/man1/$<
.1.uninstall:
.man1.install:
set -e; \
man=$(<:$*.man%=%); \
path="$(MAN)/man$$man/$*.$$man"; \
echo INSTALL man $$($(CLEANNAME) "$(BASE)/$*($$man)"); \
cp "$<" "$$path"; \
chmod 0644 "$$path"
.man1.uninstall:
echo UNINSTALL man $$($(CLEANNAME) $*'(1)')
rm -f $(MAN)/man1/$<

View File

@ -1,3 +1,6 @@
OFILES=$(TARG:.1=.man1)
all: $(OFILES)
install: ${TARG:.1=.install}
uninstall: ${TARG:.1=.uninstall}

View File

@ -1,2 +1,4 @@
VERSION = $$(hg tip --template 'hg{rev}' 2>/dev/null)
VERSION := $(shell hg tip --template 'hg{rev}' 2>/dev/null)
VERSION != hg tip --template 'hg{rev}' 2>/dev/null
CONFVERSION = 3.5