gcc4X man pages: Introduce generic MLINK handling
authorJohn Marino <draco@marino.st>
Sun, 21 Oct 2012 09:08:28 +0000 (11:08 +0200)
committerJohn Marino <draco@marino.st>
Sun, 21 Oct 2012 09:32:54 +0000 (11:32 +0200)
A few months ago, the MLINK handling for binutils was updated to make
it easier to switch the primary version.  For binutils, every manpage
has a suffix based on the binutils version and the "real" man page is
linked to the primary version.

The two base compilers had the same organization, but the manual system
was not converted when binutils system was.  When gcc47 was brought in,
the manual organization wasn't implemented correctly and the gcc47 pages
ended up getting linked to the "real" man page instead of the primary
compiler gcc44.

While fixing this, bring in the binutils MLINK handling to prepare for
switching gcc47 to the primary compiler in the future.

15 files changed:
gnu/usr.bin/Makefile.cco [new file with mode: 0644]
gnu/usr.bin/cc44/Makefile.inc
gnu/usr.bin/cc44/Makefile.langs
gnu/usr.bin/cc44/c++/Makefile
gnu/usr.bin/cc44/cc/Makefile
gnu/usr.bin/cc44/cpp/Makefile
gnu/usr.bin/cc44/doc/Makefile
gnu/usr.bin/cc44/gcov/Makefile
gnu/usr.bin/cc47/Makefile.inc
gnu/usr.bin/cc47/Makefile.langs
gnu/usr.bin/cc47/c++/Makefile
gnu/usr.bin/cc47/cc/Makefile
gnu/usr.bin/cc47/cpp/Makefile
gnu/usr.bin/cc47/doc/Makefile
gnu/usr.bin/cc47/gcov/Makefile

diff --git a/gnu/usr.bin/Makefile.cco b/gnu/usr.bin/Makefile.cco
new file mode 100644 (file)
index 0000000..815a2db
--- /dev/null
@@ -0,0 +1,21 @@
+# DragonFly maintains two sets of compilers.
+# In order to keep man page generation simple when the primary compiler
+# changes, this makefile will direct the makefile that included it how
+# to name the man pages and if it should hardlink a generic man page to it.
+# The same approach is used for the two sets of binutils
+
+CC_PRIMARY=    gcc44
+CC_BACKUP=     gcc47
+
+.if defined(COMPVERSION)
+.if (${COMPVERSION} == ${CC_PRIMARY})
+IS_PRIMARY=    1
+MANPAGEVER=    44
+.else
+.endif
+
+.if (${COMPVERSION} == ${CC_BACKUP})
+MANPAGEVER=    47
+.else
+.endif
+.endif
index b1f622b..406044e 100644 (file)
@@ -6,8 +6,6 @@ GCCDATESTAMP=   2012.03.13
 GCCPOINTVER=   ${GCCCOMPLETEVER:R}
 GCCSHORTVER=   ${GCCPOINTVER:S/.//}
 
 GCCPOINTVER=   ${GCCCOMPLETEVER:R}
 GCCSHORTVER=   ${GCCPOINTVER:S/.//}
 
-GCCDOCSUFFIX=  ${GCCSHORTVER}
-
 CSTD?=         gnu89
 
 CFLAGS+=       -DGCCPOINTVER=\"${GCCPOINTVER}\"
 CSTD?=         gnu89
 
 CFLAGS+=       -DGCCPOINTVER=\"${GCCPOINTVER}\"
index 7b2b137..e1f56ee 100644 (file)
@@ -1,5 +1,7 @@
 .include "Makefile.inc"
 
 .include "Makefile.inc"
 
+COMPVERSION=   gcc44
+
 .if !defined(NO_CXX)
 lang_tree_files=       cp/cp-tree.def
 .endif
 .if !defined(NO_CXX)
 lang_tree_files=       cp/cp-tree.def
 .endif
index d0ce034..00116e7 100644 (file)
@@ -2,24 +2,26 @@ GCC_LANG_DIR= gcc/cp
 
 .include "../Makefile.inc"
 .include "../Makefile.langs"
 
 .include "../Makefile.inc"
 .include "../Makefile.langs"
+.include "../../Makefile.cco"
 
 PROG=  c++
 LINKS= ${BINDIR}/c++ ${BINDIR}/g++
 LINKS+=        ${BINDIR}/c++ ${BINDIR}/CC
 
 PROG=  c++
 LINKS= ${BINDIR}/c++ ${BINDIR}/g++
 LINKS+=        ${BINDIR}/c++ ${BINDIR}/CC
-MAN=   g++${GCCSHORTVER}.1
-
-.if ${GCCDOCSUFFIX} != ${GCCSHORTVER}
-MLINKS=        g++${GCCSHORTVER}.1 g++${GCCDOCSUFFIX}.1
-.endif
+MFILE= g++${MANPAGEVER}.1
+MAN=   ${MFILE}
 
 SRCS=  ${GCC_SRCS} g++spec.c intl.c prefix.c version.c
 SRCS+= ${EXTRA_GCC_SRCS}
 
 CFLAGS+= -DGCC_DRIVER
 
 
 SRCS=  ${GCC_SRCS} g++spec.c intl.c prefix.c version.c
 SRCS+= ${EXTRA_GCC_SRCS}
 
 CFLAGS+= -DGCC_DRIVER
 
-g++${GCCSHORTVER}.1: ${GCCDIR}/gcc/doc/g++.1
+${MFILE}: ${GCCDIR}/gcc/doc/g++.1
        cp ${.ALLSRC} ${.TARGET}
 
        cp ${.ALLSRC} ${.TARGET}
 
-CLEANFILES+=   g++${GCCSHORTVER}.1
+CLEANFILES+=   ${MFILE}
+
+.if defined(IS_PRIMARY)
+MLINKS+= ${MFILE} g++.1
+.endif
 
 .include <bsd.prog.mk>
 
 .include <bsd.prog.mk>
index 3a8f0f7..975294b 100644 (file)
@@ -1,31 +1,33 @@
 .include "../Makefile.inc"
 .include "../Makefile.langs"
 .include "../Makefile.inc"
 .include "../Makefile.langs"
+.include "../../Makefile.cco"
 
 PROG=  cc
 LINKS= ${BINDIR}/cc ${BINDIR}/gcc
 
 PROG=  cc
 LINKS= ${BINDIR}/cc ${BINDIR}/gcc
-MAN=   gcc${GCCSHORTVER}.1
-MLINKS=        gcc${GCCSHORTVER}.1 cc.1 \
-       gcc${GCCSHORTVER}.1 c++.1 \
-       gcc${GCCSHORTVER}.1 g++.1 \
-       gcc${GCCSHORTVER}.1 gcc.1 \
-       gcc${GCCSHORTVER}.1 CC.1
-
-.if ${GCCDOCSUFFIX} != ${GCCSHORTVER}
-MLINKS+=gcc${GCCSHORTVER}.1 cc${GCCDOCSUFFIX}.1
-MLINKS+=gcc${GCCSHORTVER}.1 c++${GCCDOCSUFFIX}.1
-MLINKS+=gcc${GCCSHORTVER}.1 g++${GCCDOCSUFFIX}.1
-MLINKS+=gcc${GCCSHORTVER}.1 gcc${GCCDOCSUFFIX}.1
-MLINKS+=gcc${GCCSHORTVER}.1 CC${GCCDOCSUFFIX}.1
-.endif
+MFILE= gcc${MANPAGEVER}.1
+MAN=   ${MFILE}
 
 SRCS=  ${GCC_SRCS} gccspec.c intl.c prefix.c version.c
 SRCS+= ${EXTRA_GCC_SRCS}
 
 CFLAGS+= -DGCC_DRIVER
 
 
 SRCS=  ${GCC_SRCS} gccspec.c intl.c prefix.c version.c
 SRCS+= ${EXTRA_GCC_SRCS}
 
 CFLAGS+= -DGCC_DRIVER
 
-gcc${GCCSHORTVER}.1: ${GCCDIR}/gcc/doc/gcc.1
+${MFILE}: ${GCCDIR}/gcc/doc/gcc.1
        cp ${.ALLSRC} ${.TARGET}
 
        cp ${.ALLSRC} ${.TARGET}
 
-CLEANFILES+=   gcc${GCCSHORTVER}.1
+CLEANFILES+=   ${MFILE}
+
+MLINKS+= ${MFILE} cc${MANPAGEVER}.1
+MLINKS+= ${MFILE} CC${MANPAGEVER}.1
+MLINKS+= ${MFILE} c++${MANPAGEVER}.1
+MLINKS+= ${MFILE} g++${MANPAGEVER}.1
+       
+.if defined(IS_PRIMARY)
+MLINKS+= ${MFILE} cc.1
+MLINKS+= ${MFILE} CC.1
+MLINKS+= ${MFILE} gcc.1
+MLINKS+= ${MFILE} c++.1
+MLINKS+= ${MFILE} g++.1
+.endif
 
 .include <bsd.prog.mk>
 
 .include <bsd.prog.mk>
index fbe2f10..e96e380 100644 (file)
@@ -1,22 +1,23 @@
 .include "../Makefile.inc"
 .include "../Makefile.langs"
 .include "../Makefile.inc"
 .include "../Makefile.langs"
+.include "../../Makefile.cco"
 
 PROG=  cpp
 
 PROG=  cpp
-MAN=   cpp${GCCSHORTVER}.1
-MLINKS=        cpp${GCCSHORTVER}.1 cpp.1
-
-.if ${GCCSHORTVER} != ${GCCDOCSUFFIX}
-MLINKS+=cpp${GCCSHORTVER}.1 cpp${GCCDOCSUFFIX}.1
-.endif
+MFILE= cpp${GCCSHORTVER}.1
+MAN=   ${MFILE}
 
 SRCS=  ${GCC_SRCS} cppspec.c intl.c prefix.c version.c
 SRCS+= ${EXTRA_GCC_SRCS}
 
 CFLAGS+= -DGCC_DRIVER
 
 
 SRCS=  ${GCC_SRCS} cppspec.c intl.c prefix.c version.c
 SRCS+= ${EXTRA_GCC_SRCS}
 
 CFLAGS+= -DGCC_DRIVER
 
-cpp${GCCSHORTVER}.1: ${GCCDIR}/gcc/doc/cpp.1
+${MFILE}: ${GCCDIR}/gcc/doc/cpp.1
        cp ${.ALLSRC} ${.TARGET}
 
        cp ${.ALLSRC} ${.TARGET}
 
-CLEANFILES+=   cpp${GCCSHORTVER}.1
+CLEANFILES+=   ${MFILE}
+
+.if defined(IS_PRIMARY)
+MLINKS+= ${MFILE} cpp.1
+.endif
 
 .include <bsd.prog.mk>
 
 .include <bsd.prog.mk>
index 43b99e6..5348364 100644 (file)
@@ -15,7 +15,7 @@ INFOENTRY_gcint=      "* GCC-internals.                       The GNU Compiler Collection's internals."
 
 # Install as nameVER for the time being
 .for _i in ${ORIGINFO}
 
 # Install as nameVER for the time being
 .for _i in ${ORIGINFO}
-.for docsfx in ${GCCSHORTVER} ${GCCDOCSUFFIX}
+.for docsfx in ${GCCSHORTVER}
 .if empty(INFO:M${_i}${docsfx})
 INFO+= ${_i}${docsfx}
 INFOENTRY_${_i}${docsfx}= ${INFOENTRY_${_i}:C/\./${docsfx}./1}
 .if empty(INFO:M${_i}${docsfx})
 INFO+= ${_i}${docsfx}
 INFOENTRY_${_i}${docsfx}= ${INFOENTRY_${_i}:C/\./${docsfx}./1}
@@ -30,9 +30,6 @@ CLEANFILES+=  ${_i}${docsufx}.info
 .endfor
 .endfor
 # End magic rewriting
 .endfor
 .endfor
 # End magic rewriting
-.if ${GCCDOCSUFFIX} == ""
-INFO+= ${ORIGINFO}
-.endif
 
 cpp.info: cpp.texi fdl.texi cppenv.texi cppopts.texi           \
         gcc-common.texi gcc-vers.texi
 
 cpp.info: cpp.texi fdl.texi cppenv.texi cppopts.texi           \
         gcc-common.texi gcc-vers.texi
index 1cbd18c..774e35c 100644 (file)
@@ -1,19 +1,20 @@
 .include "../Makefile.inc"
 .include "../Makefile.langs"
 .include "../Makefile.inc"
 .include "../Makefile.langs"
+.include "../../Makefile.cco"
 
 PROG=  gcov
 
 PROG=  gcov
-MAN=   gcov${GCCSHORTVER}.1
-MLINKS=        gcov${GCCSHORTVER}.1 gcov.1
-
-.if ${GCCDOCSUFFIX} != ${GCCSHORTVER}
-MLINKS+=gcov${GCCSHORTVER}.1 gcov${GCCDOCSUFFIX}.1
-.endif
+MFILE= gcov${GCCSHORTVER}.1
+MAN=   ${MFILE}
 
 SRCS=  gcov.c intl.c errors.c version.c
 
 
 SRCS=  gcov.c intl.c errors.c version.c
 
-gcov${GCCSHORTVER}.1: ${GCCDIR}/gcc/doc/gcov.1
+${MFILE}: ${GCCDIR}/gcc/doc/gcov.1
        cp ${.ALLSRC} ${.TARGET}
 
        cp ${.ALLSRC} ${.TARGET}
 
-CLEANFILES+=   gcov${GCCSHORTVER}.1
+CLEANFILES+=   ${MFILE}
+
+.if defined(IS_PRIMARY)
+MLINKS+= ${MFILE} gcov.1
+.endif
 
 .include <bsd.prog.mk>
 
 .include <bsd.prog.mk>
index 966d674..cc8275c 100644 (file)
@@ -6,9 +6,6 @@ GCCDATESTAMP=   2012-09-20
 GCCPOINTVER=   ${GCCCOMPLETEVER:R}
 GCCSHORTVER=   ${GCCPOINTVER:S/.//}
 
 GCCPOINTVER=   ${GCCCOMPLETEVER:R}
 GCCSHORTVER=   ${GCCPOINTVER:S/.//}
 
-GCCDOCSUFFIX=  ${GCCSHORTVER}
-
-
 CFLAGS+=       -DGCCPOINTVER=\"${GCCPOINTVER}\"
 CFLAGS+=       -DGCCSHORTVER=\"${GCCSHORTVER}\"
 CFLAGS+=       -DBASEVER=\"${GCCCOMPLETEVER}\"
 CFLAGS+=       -DGCCPOINTVER=\"${GCCPOINTVER}\"
 CFLAGS+=       -DGCCSHORTVER=\"${GCCSHORTVER}\"
 CFLAGS+=       -DBASEVER=\"${GCCCOMPLETEVER}\"
index 8cef1d1..0ed188b 100644 (file)
@@ -1,5 +1,7 @@
 .include "Makefile.inc"
 
 .include "Makefile.inc"
 
+COMPVERSION=   gcc47
+
 .if !defined(NO_CXX)
 lang_tree_files+=      cp/cp-tree.def
 .endif
 .if !defined(NO_CXX)
 lang_tree_files+=      cp/cp-tree.def
 .endif
index 83e607f..cc71758 100644 (file)
@@ -1,14 +1,13 @@
 GCC_LANG_DIR=  gcc/cp
 .include "../Makefile.langs"
 GCC_LANG_DIR=  gcc/cp
 .include "../Makefile.langs"
+.include "../../Makefile.cco"
 
 PROG=  c++
 
 PROG=  c++
+MFILE= g++${MANPAGEVER}.1
+MAN=   ${MFILE}
+
 LINKS= ${BINDIR}/c++ ${BINDIR}/g++
 LINKS+=        ${BINDIR}/c++ ${BINDIR}/CC
 LINKS= ${BINDIR}/c++ ${BINDIR}/g++
 LINKS+=        ${BINDIR}/c++ ${BINDIR}/CC
-MAN=   g++${GCCSHORTVER}.1
-
-.if ${GCCDOCSUFFIX} != ${GCCSHORTVER}
-MLINKS=        g++${GCCSHORTVER}.1 g++${GCCDOCSUFFIX}.1
-.endif
 
 OBJS+= ${GCC_SRCS:S/^/..\/cc\//:.c=.o}
 OBJS+= ${EXTRA_GCC_SRCS:S/^/..\/cc\//:.c=.o}
 
 OBJS+= ${GCC_SRCS:S/^/..\/cc\//:.c=.o}
 OBJS+= ${EXTRA_GCC_SRCS:S/^/..\/cc\//:.c=.o}
@@ -16,9 +15,13 @@ SRCS=        g++spec.c
 
 CFLAGS+= -DCONFIGURE_SPECS="\"\""
 
 
 CFLAGS+= -DCONFIGURE_SPECS="\"\""
 
-g++${GCCSHORTVER}.1: ${GCCDIR}/gcc/doc/g++.1
+${MFILE}: ${GCCDIR}/gcc/doc/g++.1
        cp ${.ALLSRC} ${.TARGET}
 
        cp ${.ALLSRC} ${.TARGET}
 
-CLEANFILES+=   g++${GCCSHORTVER}.1
+CLEANFILES+=   ${MFILE}
+
+.if defined(IS_PRIMARY)
+MLINKS+= ${MFILE} g++.1
+.endif
 
 .include <bsd.prog.mk>
 
 .include <bsd.prog.mk>
index fe40171..7b9667b 100644 (file)
@@ -1,30 +1,32 @@
 .include "../Makefile.langs"
 .include "../Makefile.langs"
+.include "../../Makefile.cco"
 
 PROG=  cc
 LINKS= ${BINDIR}/cc ${BINDIR}/gcc
 
 PROG=  cc
 LINKS= ${BINDIR}/cc ${BINDIR}/gcc
-MAN=   gcc${GCCSHORTVER}.1
-MLINKS=        gcc${GCCSHORTVER}.1 cc.1 \
-       gcc${GCCSHORTVER}.1 c++.1 \
-       gcc${GCCSHORTVER}.1 g++.1 \
-       gcc${GCCSHORTVER}.1 gcc.1 \
-       gcc${GCCSHORTVER}.1 CC.1
-
-.if ${GCCDOCSUFFIX} != ${GCCSHORTVER}
-MLINKS+=gcc${GCCSHORTVER}.1 cc${GCCDOCSUFFIX}.1
-MLINKS+=gcc${GCCSHORTVER}.1 c++${GCCDOCSUFFIX}.1
-MLINKS+=gcc${GCCSHORTVER}.1 g++${GCCDOCSUFFIX}.1
-MLINKS+=gcc${GCCSHORTVER}.1 gcc${GCCDOCSUFFIX}.1
-MLINKS+=gcc${GCCSHORTVER}.1 CC${GCCDOCSUFFIX}.1
-.endif
+MFILE= gcc${MANPAGEVER}.1
+MAN=   ${MFILE}
 
 SRCS=  ${GCC_SRCS} gccspec.c
 SRCS+= ${EXTRA_GCC_SRCS}
 
 CFLAGS+= -DCONFIGURE_SPECS="\"\""
 
 
 SRCS=  ${GCC_SRCS} gccspec.c
 SRCS+= ${EXTRA_GCC_SRCS}
 
 CFLAGS+= -DCONFIGURE_SPECS="\"\""
 
-gcc${GCCSHORTVER}.1: ${GCCDIR}/gcc/doc/gcc.1
+${MFILE}: ${GCCDIR}/gcc/doc/gcc.1
        cp ${.ALLSRC} ${.TARGET}
 
        cp ${.ALLSRC} ${.TARGET}
 
-CLEANFILES+=   gcc${GCCSHORTVER}.1
+CLEANFILES+=   ${MFILE}
+
+MLINKS+= ${MFILE} cc${MANPAGEVER}.1
+MLINKS+= ${MFILE} CC${MANPAGEVER}.1
+MLINKS+= ${MFILE} c++${MANPAGEVER}.1
+MLINKS+= ${MFILE} g++${MANPAGEVER}.1
+       
+.if defined(IS_PRIMARY)
+MLINKS+= ${MFILE} cc.1
+MLINKS+= ${MFILE} CC.1
+MLINKS+= ${MFILE} gcc.1
+MLINKS+= ${MFILE} c++.1
+MLINKS+= ${MFILE} g++.1
+.endif
 
 .include <bsd.prog.mk>
 
 .include <bsd.prog.mk>
index cf012d4..abf6bf1 100644 (file)
@@ -1,13 +1,10 @@
 .include "../Makefile.inc"
 .include "../Makefile.langs"
 .include "../Makefile.inc"
 .include "../Makefile.langs"
+.include "../../Makefile.cco"
 
 PROG=  cpp
 
 PROG=  cpp
-MAN=   cpp${GCCSHORTVER}.1
-MLINKS=        cpp${GCCSHORTVER}.1 cpp.1
-
-.if ${GCCSHORTVER} != ${GCCDOCSUFFIX}
-MLINKS+=cpp${GCCSHORTVER}.1 cpp${GCCDOCSUFFIX}.1
-.endif
+MFILE= cpp${MANPAGEVER}.1
+MAN=   ${MFILE}
 
 OBJS+= ${GCC_SRCS:S/^/..\/cc\//:.c=.o}
 OBJS+= ${EXTRA_GCC_SRCS:S/^/..\/cc\//:.c=.o}
 
 OBJS+= ${GCC_SRCS:S/^/..\/cc\//:.c=.o}
 OBJS+= ${EXTRA_GCC_SRCS:S/^/..\/cc\//:.c=.o}
@@ -15,9 +12,13 @@ SRCS=        cppspec.c
 
 CFLAGS+= -DCONFIGURE_SPECS="\"\""
 
 
 CFLAGS+= -DCONFIGURE_SPECS="\"\""
 
-cpp${GCCSHORTVER}.1: ${GCCDIR}/gcc/doc/cpp.1
+${MFILE}: ${GCCDIR}/gcc/doc/cpp.1
        cp ${.ALLSRC} ${.TARGET}
 
        cp ${.ALLSRC} ${.TARGET}
 
-CLEANFILES+=   cpp${GCCSHORTVER}.1
+CLEANFILES+=   ${MFILE}
+
+.if defined(IS_PRIMARY)
+MLINKS+= ${MFILE} cpp.1
+.endif
 
 .include <bsd.prog.mk>
 
 .include <bsd.prog.mk>
index 5ebec27..0baabee 100644 (file)
@@ -15,7 +15,7 @@ INFOENTRY_gcint=      "* GCC-internals.                       The GNU Compiler Collection's internals."
 
 # Install as nameVER for the time being
 .for _i in ${ORIGINFO}
 
 # Install as nameVER for the time being
 .for _i in ${ORIGINFO}
-.for docsfx in ${GCCSHORTVER} ${GCCDOCSUFFIX}
+.for docsfx in ${GCCSHORTVER}
 .if empty(INFO:M${_i}${docsfx})
 INFO+= ${_i}${docsfx}
 INFOENTRY_${_i}${docsfx}= ${INFOENTRY_${_i}:C/\./${docsfx}./1}
 .if empty(INFO:M${_i}${docsfx})
 INFO+= ${_i}${docsfx}
 INFOENTRY_${_i}${docsfx}= ${INFOENTRY_${_i}:C/\./${docsfx}./1}
@@ -30,9 +30,6 @@ CLEANFILES+=  ${_i}${docsufx}.info
 .endfor
 .endfor
 # End magic rewriting
 .endfor
 .endfor
 # End magic rewriting
-.if ${GCCDOCSUFFIX} == ""
-INFO+= ${ORIGINFO}
-.endif
 
 cpp.info: cpp.texi fdl.texi cppenv.texi cppopts.texi           \
         gcc-common.texi gcc-vers.texi
 
 cpp.info: cpp.texi fdl.texi cppenv.texi cppopts.texi           \
         gcc-common.texi gcc-vers.texi
index 71b22a5..c063d3b 100644 (file)
@@ -1,18 +1,19 @@
 .include "../Makefile.langs"
 .include "../Makefile.langs"
+.include "../../Makefile.cco"
 
 PROG=  gcov
 
 PROG=  gcov
-MAN=   gcov${GCCSHORTVER}.1
-MLINKS=        gcov${GCCSHORTVER}.1 gcov.1
-
-.if ${GCCDOCSUFFIX} != ${GCCSHORTVER}
-MLINKS+=gcov${GCCSHORTVER}.1 gcov${GCCDOCSUFFIX}.1
-.endif
+MFILE= gcov${MANPAGEVER}.1
+MAN=   ${MFILE}
 
 SRCS=  gcov.c
 
 
 SRCS=  gcov.c
 
-gcov${GCCSHORTVER}.1: ${GCCDIR}/gcc/doc/gcov.1
+${MFILE}: ${GCCDIR}/gcc/doc/gcov.1
        cp ${.ALLSRC} ${.TARGET}
 
        cp ${.ALLSRC} ${.TARGET}
 
-CLEANFILES+=   gcov${GCCSHORTVER}.1
+CLEANFILES+=   ${MFILE}
+
+.if defined(IS_PRIMARY)
+MLINKS+= ${MFILE} gcov.1
+.endif
 
 .include <bsd.prog.mk>
 
 .include <bsd.prog.mk>