summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/groff
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-10-01 09:36:43 +0000
committerbapt <bapt@FreeBSD.org>2015-10-01 09:36:43 +0000
commitf57d9054651c33b822be7c35cebf630912ba0aae (patch)
treea5914e0a02f1f78fbcece53ec11bfddc64f76781 /gnu/usr.bin/groff
parent934c5c6da6753f906bc4a905e249449fd15b850d (diff)
parent4636024b4abd268cb5e384fc0702be9f013f6fdb (diff)
downloadFreeBSD-src-f57d9054651c33b822be7c35cebf630912ba0aae.zip
FreeBSD-src-f57d9054651c33b822be7c35cebf630912ba0aae.tar.gz
Merge from head
Diffstat (limited to 'gnu/usr.bin/groff')
-rw-r--r--gnu/usr.bin/groff/src/utils/indxbib/Makefile6
-rw-r--r--gnu/usr.bin/groff/tmac/Makefile66
-rw-r--r--gnu/usr.bin/groff/tmac/fr.ISO8859-1.in (renamed from gnu/usr.bin/groff/tmac/fr.ISO8859-1)0
-rw-r--r--gnu/usr.bin/groff/tmac/mdoc.local.in (renamed from gnu/usr.bin/groff/tmac/mdoc.local)0
-rw-r--r--gnu/usr.bin/groff/tmac/ru.KOI8-R.in (renamed from gnu/usr.bin/groff/tmac/ru.KOI8-R)0
5 files changed, 42 insertions, 30 deletions
diff --git a/gnu/usr.bin/groff/src/utils/indxbib/Makefile b/gnu/usr.bin/groff/src/utils/indxbib/Makefile
index b2c59a2..048fed0 100644
--- a/gnu/usr.bin/groff/src/utils/indxbib/Makefile
+++ b/gnu/usr.bin/groff/src/utils/indxbib/Makefile
@@ -5,9 +5,7 @@ SRCS= indxbib.cpp signal.c
DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM}
LDADD= ${LIBBIB} ${LIBGROFF} -lm
CLEANFILES= ${MAN}
-
-beforeinstall:
- ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
- ${DIST_DIR}/eign ${DESTDIR}${SHAREDIR}/dict/
+FILES= ${DIST_DIR}/eign
+FILESDIR= ${SHAREDIR}/dict/
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/tmac/Makefile b/gnu/usr.bin/groff/tmac/Makefile
index d74f76a..b756ec0 100644
--- a/gnu/usr.bin/groff/tmac/Makefile
+++ b/gnu/usr.bin/groff/tmac/Makefile
@@ -14,7 +14,7 @@ MLINKS= groff_ms.7 ms.7
MLINKS+= groff_me.7 me.7
MLINKS+= groff_mdoc.7 mdoc.samples.7
-CLEANFILES= ${MAN} ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/}
+CLEANFILES= ${MAN}
NORMALFILES= mandoc.tmac andoc.tmac an-old.tmac \
me.tmac \
@@ -39,45 +39,59 @@ NORMALFILES= mandoc.tmac andoc.tmac an-old.tmac \
composite.tmac \
eqnrc \
troffrc troffrc-end \
+ koi8-r.tmac hyphen.ru \
hyphen.us hyphenex.us
+# These are all generated into the OBJDIR.
SPECIALFILES= an.tmac man.tmac s.tmac ms.tmac www.tmac
STRIPFILES= e.tmac doc.tmac mdoc.local
MDOCFILES= doc-common doc-ditroff doc-nroff doc-syms \
fr.ISO8859-1 ru.KOI8-R
+# These are in srcdir and must be built special to avoid colliding with
+# CURDIR=OBJDIR.
+SRCFILES= fr.ISO8859-1 mdoc.local ru.KOI8-R
+CLEANFILES+= ${SRCFILES}
-all: ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/}
+FILESGROUPS= FILES
+FILES= ${NORMALFILES}
+FILESOWN= ${TMACOWN}
+FILESGRP= ${TMACGRP}
+FILESMODE= ${TMACMODE}
+FILESDIR= ${TMACDIR}
+MDOCFILESDIR= ${MDOCDIR}
+# Setup handling for the generated and special file groups
+.for var in SPECIAL STRIP MDOC
+FILESGROUPS+= ${var}FILES
+CLEANFILES+= ${${var}FILES}
+${var}FILESOWN?=${TMACOWN}
+${var}FILESGRP?=${TMACGRP}
+${var}FILESMODE?=${TMACMODE}
+${var}FILESDIR?=${TMACDIR}
+.endfor
+
+beforeinstall:
+.if !exists(${DESTDIR}${TMACDIR}/man.local)
+ ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
+ ${DIST_DIR}/man.local ${DESTDIR}${TMACDIR}
+.endif
+
+.include <bsd.prog.mk>
+
+# Do this after ../Makefile.inc gets included so DIST_DIR is defined.
.for f in ${MDOCFILES} ${STRIPFILES}
-$f-s: $f
+# Generate the file from the contrib dir or src dir as needed.
+.if ${SRCFILES:M${f}} != ""
+${f}: ${.CURDIR}/${f}.in
+.else
+${f}: ${DIST_DIR}/${f}
+.endif
sed -f ${DIST_DIR}/strip.sed ${.ALLSRC} > ${.TARGET}
.endfor
.for f in ${SPECIALFILES}
-$f-s: $f
+${f}: ${DIST_DIR}/${f}
sed -e "s;@TMAC_AN_PREFIX@;${tmac_an_prefix};g" \
-e "s;@TMAC_S_PREFIX@;${tmac_s_prefix};g" \
-e "s;@PNMTOPS_NOSETPAGE@;pnmtops;g" \
${.ALLSRC} > ${.TARGET}
.endfor
-
-beforeinstall:
- (cd ${DIST_DIR} && \
- ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
- ${NORMALFILES} ${DESTDIR}${TMACDIR})
- (cd ${.CURDIR} && \
- ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
- koi8-r.tmac hyphen.ru ${DESTDIR}${TMACDIR})
-.for f in ${STRIPFILES} ${SPECIALFILES}
- ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
- $f-s ${DESTDIR}${TMACDIR}/$f
-.endfor
-.for f in ${MDOCFILES}
- ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
- $f-s ${DESTDIR}${MDOCDIR}/$f
-.endfor
-.if !exists(${DESTDIR}${TMACDIR}/man.local)
- ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
- ${DIST_DIR}/man.local ${DESTDIR}${TMACDIR}
-.endif
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/tmac/fr.ISO8859-1 b/gnu/usr.bin/groff/tmac/fr.ISO8859-1.in
index 2ec54f5..2ec54f5 100644
--- a/gnu/usr.bin/groff/tmac/fr.ISO8859-1
+++ b/gnu/usr.bin/groff/tmac/fr.ISO8859-1.in
diff --git a/gnu/usr.bin/groff/tmac/mdoc.local b/gnu/usr.bin/groff/tmac/mdoc.local.in
index e7ec4cf..e7ec4cf 100644
--- a/gnu/usr.bin/groff/tmac/mdoc.local
+++ b/gnu/usr.bin/groff/tmac/mdoc.local.in
diff --git a/gnu/usr.bin/groff/tmac/ru.KOI8-R b/gnu/usr.bin/groff/tmac/ru.KOI8-R.in
index 4ae5697..4ae5697 100644
--- a/gnu/usr.bin/groff/tmac/ru.KOI8-R
+++ b/gnu/usr.bin/groff/tmac/ru.KOI8-R.in
OpenPOWER on IntegriCloud