[canopy-httpd] r1112 committed - remove all of the PostScript stubs in man.mk, and change all the for l...

0 views
Skip to first unread message

codesite...@google.com

unread,
Dec 5, 2010, 7:31:34 PM12/5/10
to canopy-s...@googlegroups.com
Revision: 1112
Author: phrakt
Date: Sun Dec 5 16:30:46 2010
Log: remove all of the PostScript stubs in man.mk, and change all the for
loops to
use only one iteration variable so that it works with other versions of
make(1)

http://code.google.com/p/canopy-httpd/source/detail?r=1112

Modified:
/trunk/src/share/mk/man.mk

=======================================
--- /trunk/src/share/mk/man.mk Mon Aug 31 19:45:42 2009
+++ /trunk/src/share/mk/man.mk Sun Dec 5 16:30:46 2010
@@ -5,7 +5,6 @@

MANTARGET?= cat
NROFF?= nroff -Tascii
-TBL?= tbl
MANLINT?= \#

.if !target(.MAIN)
@@ -17,47 +16,24 @@
.endif

.SUFFIXES: .1 .2 .3 .3p .4 .5 .6 .7 .8 .9 \
- .1tbl .2tbl .3tbl .4tbl .5tbl .6tbl .7tbl .8tbl .9tbl \
- .cat1 .cat2 .cat3 .cat3p .cat4 .cat5 .cat6 .cat7 .cat8 .cat9 \
- .ps1 .ps2 .ps3 .ps3p .ps4 .ps5 .ps6 .ps7 .ps8 .ps9
+ .cat1 .cat2 .cat3 .cat3p .cat4 .cat5 .cat6 .cat7 .cat8 .cat9

.9.cat9 .8.cat8 .7.cat7 .6.cat6 .5.cat5 .4.cat4 .3p.cat3p .3.cat3 .2.cat2 .1.cat1:
@echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}"
@${MANLINT} ${.IMPSRC}
@${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || (rm -f ${.TARGET}; false)

-.9tbl.cat9 .8tbl.cat8 .7tbl.cat7 .6tbl.cat6 .5tbl.cat5 .4tbl.cat4 .3tbl.cat3
\
-.2tbl.cat2 .1tbl.cat1:
- @echo "${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET}"
- @${MANLINT} -tbl ${.IMPSRC}
- @${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-
-.9.ps9 .8.ps8 .7.ps7 .6.ps6 .5.ps5 .4.ps4 .3p.ps3p .3.ps3 .2.ps2 .1.ps1:
- @echo "nroff -Tps -mandoc ${.IMPSRC} > ${.TARGET}"
- @nroff -Tps -mandoc ${.IMPSRC} > ${.TARGET} || (rm -f ${.TARGET}; false)
-
-.9tbl.ps9 .8tbl.ps8 .7tbl.ps7 .6tbl.ps6 .5tbl.ps5 .4tbl.ps4 .3tbl.ps3 \
-.2tbl.ps2 .1tbl.ps1:
- @echo "${TBL} ${.IMPSRC} | nroff -Tps -mandoc > ${.TARGET}"
- @${TBL} ${.IMPSRC} | nroff -Tps -mandoc > ${.TARGET} || (rm -f
${.TARGET}; false)
-
-.if defined(OPENBSD)
+
+
.if defined(MAN) && !empty(MAN) && !defined(MANALL)
-. for v s in MANALL .cat PS2ALL .ps
-
-$v=
${MAN:S/.1$/$s1/g:S/.2$/$s2/g:S/.3$/$s3/g:S/.3p$/$s3p/g:S/.4$/$s4/g:S/.5$/$s5/g:S/.6$/$s6/g:S/.7$/$s7/g:S/.8$/$s8/g:S/.9$/$s9/g:S/.1tbl$/$s1/g:S/.2tbl$/$s2/g:S/.3tbl$/$s3/g:S/.4tbl$/$s4/g:S/.5tbl$/$s5/g:S/.6tbl$/$s6/g:S/.7tbl$/$s7/g:S/.8tbl$/$s8/g:S/.9tbl$/$s9/g}
-
-. endfor
+
+MANALL= ${MAN:C/.([1-9])$/.cat\1/g}
+#MANALL=
${MAN:S/.1$/.cat1/g:S/.2$/.cat2/g:S/.3$/.cat3/g:S/.3p$/.cat3p/g:S/.4$/.cat4/g:S/.5$/.cat5/g:S/.6$/.cat6/g:S/.7$/7/g:S/.8$/$s8/g:S/.9$/$s9/g}
+
.endif

-. if defined(MANPS)
-PSALL=${PS2ALL}
-. endif
-
-.endif
-
-MINSTALL= ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m
${MANMODE}
+MINSTALL= ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m
${MANMODE}
+
.if defined(MANZ)
# chown and chmod are done afterward automatically
MCOMPRESS= gzip -cf
@@ -85,26 +61,22 @@
chmod ${MANMODE} $$instpage
.endif

-.if defined(OPENBSD)
maninstall:
-.for v d s t in MANALL ${MANDIR} .cat .0 PSALL ${PSDIR} .ps .ps
-. if defined($v)
- @for page in ${$v}; do \
+.if defined(MANALL)
+ @for page in ${MANALL}; do \
set -- ${MANSUBDIR}; \
subdir=$$1; \
- dir=${DESTDIR}$d$${page##*$s}; \
+ dir=${DESTDIR}${MANDIR}$${page##*.cat}; \
base=$${page##*/}; \
- instpage=$${dir}$${subdir}/$${base%.*}$t${MCOMPRESSSUFFIX}; \
+ instpage=$${dir}$${subdir}/$${base%.*}.0${MCOMPRESSSUFFIX}; \
${install_manpage_fragment}; \
while test $$# -ge 2; do \
shift; \
- extra=$${dir}$$1/$${base%.*}$t${MCOMPRESSSUFFIX}; \
+ extra=$${dir}$$1/$${base%.*}.0${MCOMPRESSSUFFIX}; \
echo $$extra -\> $$instpage; \
ln -f $$instpage $$extra; \
done; \
done
-. endif
-.endfor
.endif

.if defined(MLINKS) && !empty(MLINKS)
@@ -118,10 +90,10 @@
. endfor
.endif

-.if (defined(MANALL) || defined(PSALL)) && !defined(MANLOCALBUILD)
-all: ${MANALL} ${PSALL}
+.if defined(MANALL) && !defined(MANLOCALBUILD)
+all: ${MANALL}

cleandir: cleanman
cleanman:
- rm -f ${MANALL} ${PS2ALL}
+ rm -f ${MANALL}
.endif
Reply all
Reply to author
Forward
0 new messages