[hackers] [wmii] Fix some bugs in man page filtering.

From: Kris Maglione <jg_AT_suckless.org>
Date: Sat Feb 09 23:48:55 2008

changeset: 2287:75d1151c4824
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sat Feb 09 17:43:52 2008 -0500
summary: Fix some bugs in man page filtering.

diff -r 6d8ca81a50d3 -r 75d1151c4824 man/Makefile
--- a/man/Makefile Sat Feb 09 14:49:35 2008 -0500
+++ b/man/Makefile Sat Feb 09 17:43:52 2008 -0500
@@ -1,14 +1,18 @@ ROOT=..
 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
 
diff -r 6d8ca81a50d3 -r 75d1151c4824 mk/hdr.mk
--- a/mk/hdr.mk Sat Feb 09 14:49:35 2008 -0500
+++ b/mk/hdr.mk Sat Feb 09 17:43:52 2008 -0500
@@ -16,7 +16,7 @@ include $(MKCFG)
 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/$<
 
diff -r 6d8ca81a50d3 -r 75d1151c4824 mk/man.mk
--- a/mk/man.mk Sat Feb 09 14:49:35 2008 -0500
+++ b/mk/man.mk Sat Feb 09 17:43:52 2008 -0500
@@ -1,3 +1,6 @@ install: ${TARG:.1=.install}
+OFILES=$(TARG:.1=.man1)
+
+all: $(OFILES)
 install: ${TARG:.1=.install}
 uninstall: ${TARG:.1=.uninstall}
 
diff -r 6d8ca81a50d3 -r 75d1151c4824 mk/wmii.mk
--- a/mk/wmii.mk Sat Feb 09 14:49:35 2008 -0500
+++ b/mk/wmii.mk Sat Feb 09 17:43:52 2008 -0500
@@ -1,2 +1,4 @@ VERSION = $$(hg tip --template 'hg{rev}'
 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
Received on Sat Feb 09 2008 - 23:48:55 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:59:21 UTC