From 31468d702ff67ca49b120f946387228cf72df1ff Mon Sep 17 00:00:00 2001 From: John Marino Date: Sun, 12 Feb 2012 18:35:45 +0100 Subject: [PATCH] binutils: Make manpage handling generic to ease maintenance DragonFly has two sets of binutils with one designated as primary and the other is the backup. In the recent past, every time these designation were switched or a new binutils was brought in, around 30 makefiles had to be manually and tediously updated in at least 3 places per file. This commit implements common variables that will make future primary designation changes not require changes to individual makefiles, but rather limit the update to a couple of commons ones. --- gnu/usr.bin/Makefile | 10 ++++++---- gnu/usr.bin/Makefile.buo | 23 ++++++++++++++++++++++ gnu/usr.bin/binutils221/Makefile.inc | 2 +- gnu/usr.bin/binutils221/Makefile.inc1 | 2 ++ gnu/usr.bin/binutils221/addr2line/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/ar/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/as/Makefile.inc0 | 12 ++++++++--- gnu/usr.bin/binutils221/cxxfilt/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/elfedit/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/gprof/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/ld/Makefile | 14 ++++++++----- gnu/usr.bin/binutils221/nm/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/objcopy/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/objdump/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/ranlib/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/readelf/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/size/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/strings/Makefile | 12 ++++++++--- gnu/usr.bin/binutils221/strip/Makefile | 12 ++++++++--- gnu/usr.bin/binutils222/Makefile.inc | 2 +- gnu/usr.bin/binutils222/Makefile.inc1 | 2 ++ gnu/usr.bin/binutils222/addr2line/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/ar/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/as/Makefile.inc0 | 13 ++++++++---- gnu/usr.bin/binutils222/cxxfilt/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/elfedit/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/gprof/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/ld/Makefile | 15 ++++++++------ gnu/usr.bin/binutils222/nm/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/objcopy/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/objdump/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/ranlib/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/readelf/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/size/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/strings/Makefile | 13 ++++++++---- gnu/usr.bin/binutils222/strip/Makefile | 13 ++++++++---- 36 files changed, 305 insertions(+), 115 deletions(-) create mode 100644 gnu/usr.bin/Makefile.buo create mode 100644 gnu/usr.bin/binutils221/Makefile.inc1 create mode 100644 gnu/usr.bin/binutils222/Makefile.inc1 diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index a2229fa9ce..76cd187f55 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -1,5 +1,7 @@ # $FreeBSD: src/gnu/usr.bin/Makefile,v 1.51 2000/01/16 00:11:34 obrien Exp $ +.include "Makefile.buo" + SUBDIR= dialog diff grep groff man rcs texinfo .if !defined(NO_CVS) @@ -10,18 +12,18 @@ SUBDIR+=cvs SUBDIR+=gdb .endif -SUBDIR+= binutils222 +SUBDIR+= ${BU_PRIMARY} .if !defined(NO_BINUTILS221) -SUBDIR+= binutils221 +SUBDIR+= ${BU_SECONDARY} .endif .if !defined(NO_GCC41) SUBDIR+= cc41 -.ORDER: binutils222 cc41 +.ORDER: ${BU_PRIMARY} cc41 .endif SUBDIR+= cc44 -.ORDER: binutils222 cc44 +.ORDER: ${BU_PRIMARY} cc44 # maximum parallelism # diff --git a/gnu/usr.bin/Makefile.buo b/gnu/usr.bin/Makefile.buo new file mode 100644 index 0000000000..d1fac85dc1 --- /dev/null +++ b/gnu/usr.bin/Makefile.buo @@ -0,0 +1,23 @@ +# DragonFly maintains two sets of binutils. The last time it was necessary to swap the primary and +# backup status between them, 37 files had to be changed. This makefile include aims to make that process +# much simpler by having common variables located in one place to control the state. +# +# Additionally, with each new import or upgrade of binutils, dozens of Makefiles have to be individually +# customized over the previous version. Ideally in the future the Makefiles are generic and only have to be +# copied over in most cases. + +BU_PRIMARY= binutils222 +BU_BACKUP= binutils221 + +.if defined(BUVERSION) +.if (${BUVERSION} == ${BU_PRIMARY}) +IS_PRIMARY= 1 +MANPAGEVER= 222 +.else +.endif + +.if (${BUVERSION} == ${BU_BACKUP}) +MANPAGEVER= 221 +.else +.endif +.endif diff --git a/gnu/usr.bin/binutils221/Makefile.inc b/gnu/usr.bin/binutils221/Makefile.inc index 09fc6b14bb..d947795138 100644 --- a/gnu/usr.bin/binutils221/Makefile.inc +++ b/gnu/usr.bin/binutils221/Makefile.inc @@ -1 +1 @@ -BINDIR?= /usr/libexec/binutils221/elf +BINDIR?= /usr/libexec/${BUVERSION}/elf diff --git a/gnu/usr.bin/binutils221/Makefile.inc1 b/gnu/usr.bin/binutils221/Makefile.inc1 new file mode 100644 index 0000000000..b8e73787c8 --- /dev/null +++ b/gnu/usr.bin/binutils221/Makefile.inc1 @@ -0,0 +1,2 @@ +BUVERSION= binutils221 +.include "../Makefile.buo" diff --git a/gnu/usr.bin/binutils221/addr2line/Makefile b/gnu/usr.bin/binutils221/addr2line/Makefile index 94378e4df3..fe64d9062c 100644 --- a/gnu/usr.bin/binutils221/addr2line/Makefile +++ b/gnu/usr.bin/binutils221/addr2line/Makefile @@ -1,15 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= addr2line SRCS= addr2line.c -MAN= addr2line221.1 +MFILE= addr2line${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 2 -addr2line221.1: ${SRCDIR}/binutils/doc/addr2line.1 +${MFILE}: ${SRCDIR}/binutils/doc/addr2line.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= addr2line221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} addr2line.1 +.endif .include diff --git a/gnu/usr.bin/binutils221/ar/Makefile b/gnu/usr.bin/binutils221/ar/Makefile index f96681f3ab..ceb2049e06 100644 --- a/gnu/usr.bin/binutils221/ar/Makefile +++ b/gnu/usr.bin/binutils221/ar/Makefile @@ -1,15 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= ar SRCS= ar.c not-ranlib.c -MAN= ar221.1 +MFILE= ar${MANPAGEVER}.1 +MAN= ${MFILE} NOSHARED?= yes -ar221.1: ${SRCDIR}/binutils/doc/ar.1 +${MFILE}: ${SRCDIR}/binutils/doc/ar.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= ar221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} ar.1 +.endif .include diff --git a/gnu/usr.bin/binutils221/as/Makefile.inc0 b/gnu/usr.bin/binutils221/as/Makefile.inc0 index ff98bc4625..963c7e182f 100644 --- a/gnu/usr.bin/binutils221/as/Makefile.inc0 +++ b/gnu/usr.bin/binutils221/as/Makefile.inc0 @@ -1,4 +1,5 @@ .include "${.CURDIR}/../../Makefile.inc0" +.include "${.CURDIR}/../../Makefile.inc1" RELTOP:= ../${RELTOP} .PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config ${.CURDIR}/.. @@ -6,7 +7,8 @@ RELTOP:= ../${RELTOP} TARGET_OS?= dragonfly PROG= as -MAN= as221.1 +MFILE= as${MANPAGEVER}.1 +MAN= ${MFILE} SRCS+= app.c \ as.c \ atof-generic.c \ @@ -54,7 +56,11 @@ NOSHARED?= yes DPADD+= ${RELTOP}/libopcodes/libopcodes.a LDADD+= ${RELTOP}/libopcodes/libopcodes.a -as221.1: ${SRCDIR}/gas/doc/as.1 +${MFILE}: ${SRCDIR}/gas/doc/as.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= as221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} as.1 +.endif diff --git a/gnu/usr.bin/binutils221/cxxfilt/Makefile b/gnu/usr.bin/binutils221/cxxfilt/Makefile index 3d709b155d..6769f7075e 100644 --- a/gnu/usr.bin/binutils221/cxxfilt/Makefile +++ b/gnu/usr.bin/binutils221/cxxfilt/Makefile @@ -1,15 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils PROG= c++filt SRCS= cxxfilt.c -MAN= c++filt221.1 +MFILE= c++filt${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 -c++filt221.1: ${.CURDIR}/c++filt.1 +${MFILE}: ${.CURDIR}/c++filt.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= c++filt221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} c++filt.1 +.endif .include diff --git a/gnu/usr.bin/binutils221/elfedit/Makefile b/gnu/usr.bin/binutils221/elfedit/Makefile index b15b4cb263..68e16611cb 100644 --- a/gnu/usr.bin/binutils221/elfedit/Makefile +++ b/gnu/usr.bin/binutils221/elfedit/Makefile @@ -1,15 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= elfedit SRCS= elfedit.c elfcomm.c -MAN= elfedit221.1 +MFILE= elfedit${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 -elfedit221.1: ${SRCDIR}/binutils/doc/elfedit.1 +${MFILE}: ${SRCDIR}/binutils/doc/elfedit.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= elfedit221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} elfedit.1 +.endif .include diff --git a/gnu/usr.bin/binutils221/gprof/Makefile b/gnu/usr.bin/binutils221/gprof/Makefile index 1bd9482e23..1130154497 100644 --- a/gnu/usr.bin/binutils221/gprof/Makefile +++ b/gnu/usr.bin/binutils221/gprof/Makefile @@ -1,3 +1,4 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/gprof @@ -27,13 +28,14 @@ SRCS= basic_blocks.c \ flat_bl.c \ bsd_callg_bl.c \ fsf_callg_bl.c -MAN= gprof221.1 +MFILE= gprof${MANPAGEVER}.1 +MAN= ${MFILE} CFLAGS= -DHAVE_CONFIG_H CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../libbfd -I${.OBJDIR}/../libbfd CFLAGS+=-I${SRCDIR}/include -I${SRCDIR}/bfd -gprof221.1: ${.CURDIR}/gprof.1 +${MFILE}: ${.CURDIR}/gprof.1 cp ${.ALLSRC} ${.TARGET} flat_bl.c: @@ -51,9 +53,13 @@ fsf_callg_bl.c: FUNCTION=`(echo fsf_callg_bl|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \ FILE=fsf_callg_bl.m ${SRCDIR}/gprof/fsf_callg_bl.m -CLEANFILES+= gprof221.1 \ +CLEANFILES+= ${MFILE} \ flat_bl.c \ bsd_callg_bl.c \ fsf_callg_bl.c +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} gprof.1 +.endif + .include diff --git a/gnu/usr.bin/binutils221/ld/Makefile b/gnu/usr.bin/binutils221/ld/Makefile index 55bce0f2e6..051b211d16 100644 --- a/gnu/usr.bin/binutils221/ld/Makefile +++ b/gnu/usr.bin/binutils221/ld/Makefile @@ -1,11 +1,13 @@ ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw .include "../Makefile.inc0" +.include "../Makefile.inc1" .PATH: ${SRCDIR}/ld PROG= ld.bfd -MAN= ld221.1 +MFILE= ld${MANPAGEVER}.1 +MAN= ${MFILE} LIBEXEC_BINUTILS= ${BINDIR}/.. SCRIPTDIR= ${LIBEXEC_BINUTILS}/ldscripts SRCS+= ldgram.y \ @@ -35,8 +37,6 @@ NOSHARED?= yes CLEANDIRS+= ldscripts tmpdir CLEANFILES+= ldemul-list.h stringify.sed -LINKS= ${BINDIR}/ld.bfd ${BINDIR}/ld - EMXFR= EMLST= .for _e in ${EMS} @@ -51,10 +51,14 @@ ldemul-list.h: stringify.sed: ${LN} -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET} -ld221.1: ${SRCDIR}/ld/ld.1 +${MFILE}: ${SRCDIR}/ld/ld.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= ld221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} ld.1 +.endif afterinstall: install-ldscripts diff --git a/gnu/usr.bin/binutils221/nm/Makefile b/gnu/usr.bin/binutils221/nm/Makefile index a41a7babe1..07e425b3ee 100644 --- a/gnu/usr.bin/binutils221/nm/Makefile +++ b/gnu/usr.bin/binutils221/nm/Makefile @@ -1,14 +1,20 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= nm -MAN= nm221.1 +MFILE= nm${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 2 -nm221.1: ${SRCDIR}/binutils/doc/nm.1 +${MFILE}: ${SRCDIR}/binutils/doc/nm.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= nm221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} nm.1 +.endif .include diff --git a/gnu/usr.bin/binutils221/objcopy/Makefile b/gnu/usr.bin/binutils221/objcopy/Makefile index 15c65ecae4..47e29ccc0b 100644 --- a/gnu/usr.bin/binutils221/objcopy/Makefile +++ b/gnu/usr.bin/binutils221/objcopy/Makefile @@ -1,15 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= objcopy SRCS= not-strip.c objcopy.c -MAN= objcopy221.1 +MFILE= objcopy${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 -objcopy221.1: ${SRCDIR}/binutils/doc/objcopy.1 +${MFILE}: ${SRCDIR}/binutils/doc/objcopy.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= objcopy221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} objcopy.1 +.endif .include diff --git a/gnu/usr.bin/binutils221/objdump/Makefile b/gnu/usr.bin/binutils221/objdump/Makefile index f16093020c..29c89a45d3 100644 --- a/gnu/usr.bin/binutils221/objdump/Makefile +++ b/gnu/usr.bin/binutils221/objdump/Makefile @@ -1,18 +1,24 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= objdump SRCS= elfcomm.c objdump.c -MAN= objdump221.1 +MFILE= objdump${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 DPADD+= ${.OBJDIR}/../libopcodes/libopcodes.a LDADD+= ${.OBJDIR}/../libopcodes/libopcodes.a -objdump221.1: ${SRCDIR}/binutils/doc/objdump.1 +${MFILE}: ${SRCDIR}/binutils/doc/objdump.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= objdump221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} objdump.1 +.endif .include diff --git a/gnu/usr.bin/binutils221/ranlib/Makefile b/gnu/usr.bin/binutils221/ranlib/Makefile index 5e0e26f36d..c93851beee 100644 --- a/gnu/usr.bin/binutils221/ranlib/Makefile +++ b/gnu/usr.bin/binutils221/ranlib/Makefile @@ -1,16 +1,22 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= ranlib SRCS= ar.c is-ranlib.c -MAN= ranlib221.1 +MFILE= ranlib${MANPAGEVER}.1 +MAN= ${MFILE} NOSHARED?= yes -ranlib221.1: ${SRCDIR}/binutils/doc/ranlib.1 +${MFILE}: ${SRCDIR}/binutils/doc/ranlib.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= ranlib221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} ranlib.1 +.endif .include diff --git a/gnu/usr.bin/binutils221/readelf/Makefile b/gnu/usr.bin/binutils221/readelf/Makefile index 74d26b89ee..12dd662833 100644 --- a/gnu/usr.bin/binutils221/readelf/Makefile +++ b/gnu/usr.bin/binutils221/readelf/Makefile @@ -1,15 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= readelf SRCS= readelf.c unwind-ia64.c dwarf.c elfcomm.c -MAN= readelf221.1 +MFILE= readelf${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 -readelf221.1: ${SRCDIR}/binutils/doc/readelf.1 +${MFILE}: ${SRCDIR}/binutils/doc/readelf.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= readelf221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} readelf.1 +.endif .include diff --git a/gnu/usr.bin/binutils221/size/Makefile b/gnu/usr.bin/binutils221/size/Makefile index c699d34de3..db9b51b78a 100644 --- a/gnu/usr.bin/binutils221/size/Makefile +++ b/gnu/usr.bin/binutils221/size/Makefile @@ -1,14 +1,20 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= size -MAN= size221.1 +MFILE= size${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 2 -size221.1: ${SRCDIR}/binutils/doc/size.1 +${MFILE}: ${SRCDIR}/binutils/doc/size.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= size221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} size.1 +.endif .include diff --git a/gnu/usr.bin/binutils221/strings/Makefile b/gnu/usr.bin/binutils221/strings/Makefile index 221b24b428..09f68c213e 100644 --- a/gnu/usr.bin/binutils221/strings/Makefile +++ b/gnu/usr.bin/binutils221/strings/Makefile @@ -1,14 +1,20 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= strings -MAN= strings221.1 +MFILE= strings${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 2 -strings221.1: ${SRCDIR}/binutils/doc/strings.1 +${MFILE}: ${SRCDIR}/binutils/doc/strings.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= strings221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} strings.1 +.endif .include diff --git a/gnu/usr.bin/binutils221/strip/Makefile b/gnu/usr.bin/binutils221/strip/Makefile index bf37e47973..80496b1728 100644 --- a/gnu/usr.bin/binutils221/strip/Makefile +++ b/gnu/usr.bin/binutils221/strip/Makefile @@ -1,10 +1,12 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= strip SRCS= objcopy.c is-strip.c -MAN= strip221.1 +MFILE= strip${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 CLEANFILES+= maybe_stripped @@ -19,10 +21,14 @@ maybe_stripped: strip .endif .endif -strip221.1: ${SRCDIR}/binutils/doc/strip.1 +${MFILE}: ${SRCDIR}/binutils/doc/strip.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= strip221.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} strip.1 +.endif realinstall: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ diff --git a/gnu/usr.bin/binutils222/Makefile.inc b/gnu/usr.bin/binutils222/Makefile.inc index f1c139380d..d947795138 100644 --- a/gnu/usr.bin/binutils222/Makefile.inc +++ b/gnu/usr.bin/binutils222/Makefile.inc @@ -1 +1 @@ -BINDIR?= /usr/libexec/binutils222/elf +BINDIR?= /usr/libexec/${BUVERSION}/elf diff --git a/gnu/usr.bin/binutils222/Makefile.inc1 b/gnu/usr.bin/binutils222/Makefile.inc1 new file mode 100644 index 0000000000..5e6e6449d6 --- /dev/null +++ b/gnu/usr.bin/binutils222/Makefile.inc1 @@ -0,0 +1,2 @@ +BUVERSION= binutils222 +.include "../Makefile.buo" diff --git a/gnu/usr.bin/binutils222/addr2line/Makefile b/gnu/usr.bin/binutils222/addr2line/Makefile index a6d89801f3..fe64d9062c 100644 --- a/gnu/usr.bin/binutils222/addr2line/Makefile +++ b/gnu/usr.bin/binutils222/addr2line/Makefile @@ -1,16 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= addr2line SRCS= addr2line.c -MAN= addr2line222.1 -MLINKS+=addr2line222.1 addr2line.1 +MFILE= addr2line${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 2 -addr2line222.1: ${SRCDIR}/binutils/doc/addr2line.1 +${MFILE}: ${SRCDIR}/binutils/doc/addr2line.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= addr2line222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} addr2line.1 +.endif .include diff --git a/gnu/usr.bin/binutils222/ar/Makefile b/gnu/usr.bin/binutils222/ar/Makefile index 1c622c0cd3..ceb2049e06 100644 --- a/gnu/usr.bin/binutils222/ar/Makefile +++ b/gnu/usr.bin/binutils222/ar/Makefile @@ -1,16 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= ar SRCS= ar.c not-ranlib.c -MAN= ar222.1 -MLINKS+=ar222.1 ar.1 +MFILE= ar${MANPAGEVER}.1 +MAN= ${MFILE} NOSHARED?= yes -ar222.1: ${SRCDIR}/binutils/doc/ar.1 +${MFILE}: ${SRCDIR}/binutils/doc/ar.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= ar222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} ar.1 +.endif .include diff --git a/gnu/usr.bin/binutils222/as/Makefile.inc0 b/gnu/usr.bin/binutils222/as/Makefile.inc0 index daa169dc9d..963c7e182f 100644 --- a/gnu/usr.bin/binutils222/as/Makefile.inc0 +++ b/gnu/usr.bin/binutils222/as/Makefile.inc0 @@ -1,4 +1,5 @@ .include "${.CURDIR}/../../Makefile.inc0" +.include "${.CURDIR}/../../Makefile.inc1" RELTOP:= ../${RELTOP} .PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config ${.CURDIR}/.. @@ -6,8 +7,8 @@ RELTOP:= ../${RELTOP} TARGET_OS?= dragonfly PROG= as -MAN= as222.1 -MLINKS+=as222.1 as.1 +MFILE= as${MANPAGEVER}.1 +MAN= ${MFILE} SRCS+= app.c \ as.c \ atof-generic.c \ @@ -55,7 +56,11 @@ NOSHARED?= yes DPADD+= ${RELTOP}/libopcodes/libopcodes.a LDADD+= ${RELTOP}/libopcodes/libopcodes.a -as222.1: ${SRCDIR}/gas/doc/as.1 +${MFILE}: ${SRCDIR}/gas/doc/as.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= as222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} as.1 +.endif diff --git a/gnu/usr.bin/binutils222/cxxfilt/Makefile b/gnu/usr.bin/binutils222/cxxfilt/Makefile index c1d21e4ab7..6769f7075e 100644 --- a/gnu/usr.bin/binutils222/cxxfilt/Makefile +++ b/gnu/usr.bin/binutils222/cxxfilt/Makefile @@ -1,16 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils PROG= c++filt SRCS= cxxfilt.c -MAN= c++filt222.1 -MLINKS+=c++filt222.1 c++filt.1 +MFILE= c++filt${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 -c++filt222.1: ${.CURDIR}/c++filt.1 +${MFILE}: ${.CURDIR}/c++filt.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= c++filt222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} c++filt.1 +.endif .include diff --git a/gnu/usr.bin/binutils222/elfedit/Makefile b/gnu/usr.bin/binutils222/elfedit/Makefile index cbefa397d6..68e16611cb 100644 --- a/gnu/usr.bin/binutils222/elfedit/Makefile +++ b/gnu/usr.bin/binutils222/elfedit/Makefile @@ -1,16 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= elfedit SRCS= elfedit.c elfcomm.c -MAN= elfedit222.1 -MLINKS+=elfedit222.1 elfedit.1 +MFILE= elfedit${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 -elfedit222.1: ${SRCDIR}/binutils/doc/elfedit.1 +${MFILE}: ${SRCDIR}/binutils/doc/elfedit.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= elfedit222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} elfedit.1 +.endif .include diff --git a/gnu/usr.bin/binutils222/gprof/Makefile b/gnu/usr.bin/binutils222/gprof/Makefile index d05b1f0269..1130154497 100644 --- a/gnu/usr.bin/binutils222/gprof/Makefile +++ b/gnu/usr.bin/binutils222/gprof/Makefile @@ -1,3 +1,4 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/gprof @@ -27,14 +28,14 @@ SRCS= basic_blocks.c \ flat_bl.c \ bsd_callg_bl.c \ fsf_callg_bl.c -MAN= gprof222.1 -MLINKS+=gprof222.1 gprof.1 +MFILE= gprof${MANPAGEVER}.1 +MAN= ${MFILE} CFLAGS= -DHAVE_CONFIG_H CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../libbfd -I${.OBJDIR}/../libbfd CFLAGS+=-I${SRCDIR}/include -I${SRCDIR}/bfd -gprof222.1: ${.CURDIR}/gprof.1 +${MFILE}: ${.CURDIR}/gprof.1 cp ${.ALLSRC} ${.TARGET} flat_bl.c: @@ -52,9 +53,13 @@ fsf_callg_bl.c: FUNCTION=`(echo fsf_callg_bl|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \ FILE=fsf_callg_bl.m ${SRCDIR}/gprof/fsf_callg_bl.m -CLEANFILES+= gprof222.1 \ +CLEANFILES+= ${MFILE} \ flat_bl.c \ bsd_callg_bl.c \ fsf_callg_bl.c +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} gprof.1 +.endif + .include diff --git a/gnu/usr.bin/binutils222/ld/Makefile b/gnu/usr.bin/binutils222/ld/Makefile index 59f93b878a..051b211d16 100644 --- a/gnu/usr.bin/binutils222/ld/Makefile +++ b/gnu/usr.bin/binutils222/ld/Makefile @@ -1,12 +1,13 @@ ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw .include "../Makefile.inc0" +.include "../Makefile.inc1" .PATH: ${SRCDIR}/ld PROG= ld.bfd -MAN= ld222.1 -MLINKS+=ld222.1 ld.1 +MFILE= ld${MANPAGEVER}.1 +MAN= ${MFILE} LIBEXEC_BINUTILS= ${BINDIR}/.. SCRIPTDIR= ${LIBEXEC_BINUTILS}/ldscripts SRCS+= ldgram.y \ @@ -36,8 +37,6 @@ NOSHARED?= yes CLEANDIRS+= ldscripts tmpdir CLEANFILES+= ldemul-list.h stringify.sed -LINKS= ${BINDIR}/ld.bfd ${BINDIR}/ld - EMXFR= EMLST= .for _e in ${EMS} @@ -52,10 +51,14 @@ ldemul-list.h: stringify.sed: ${LN} -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET} -ld222.1: ${SRCDIR}/ld/ld.1 +${MFILE}: ${SRCDIR}/ld/ld.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= ld222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} ld.1 +.endif afterinstall: install-ldscripts diff --git a/gnu/usr.bin/binutils222/nm/Makefile b/gnu/usr.bin/binutils222/nm/Makefile index 9f43414129..07e425b3ee 100644 --- a/gnu/usr.bin/binutils222/nm/Makefile +++ b/gnu/usr.bin/binutils222/nm/Makefile @@ -1,15 +1,20 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= nm -MAN= nm222.1 -MLINKS+=nm222.1 nm.1 +MFILE= nm${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 2 -nm222.1: ${SRCDIR}/binutils/doc/nm.1 +${MFILE}: ${SRCDIR}/binutils/doc/nm.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= nm222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} nm.1 +.endif .include diff --git a/gnu/usr.bin/binutils222/objcopy/Makefile b/gnu/usr.bin/binutils222/objcopy/Makefile index a81fd995b1..47e29ccc0b 100644 --- a/gnu/usr.bin/binutils222/objcopy/Makefile +++ b/gnu/usr.bin/binutils222/objcopy/Makefile @@ -1,16 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= objcopy SRCS= not-strip.c objcopy.c -MAN= objcopy222.1 -MLINKS+=objcopy222.1 objcopy.1 +MFILE= objcopy${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 -objcopy222.1: ${SRCDIR}/binutils/doc/objcopy.1 +${MFILE}: ${SRCDIR}/binutils/doc/objcopy.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= objcopy222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} objcopy.1 +.endif .include diff --git a/gnu/usr.bin/binutils222/objdump/Makefile b/gnu/usr.bin/binutils222/objdump/Makefile index 9524d3a4f5..a2a003e91b 100644 --- a/gnu/usr.bin/binutils222/objdump/Makefile +++ b/gnu/usr.bin/binutils222/objdump/Makefile @@ -1,11 +1,12 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= objdump SRCS= elfcomm.c objdump.c -MAN= objdump222.1 -MLINKS+=objdump222.1 objdump.1 +MFILE= objdump${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 CFLAGS+= -DOBJDUMP_PRIVATE_VECTORS="" @@ -13,9 +14,13 @@ CFLAGS+= -DOBJDUMP_PRIVATE_VECTORS="" DPADD+= ${.OBJDIR}/../libopcodes/libopcodes.a LDADD+= ${.OBJDIR}/../libopcodes/libopcodes.a -objdump222.1: ${SRCDIR}/binutils/doc/objdump.1 +${MFILE}: ${SRCDIR}/binutils/doc/objdump.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= objdump222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} objdump.1 +.endif .include diff --git a/gnu/usr.bin/binutils222/ranlib/Makefile b/gnu/usr.bin/binutils222/ranlib/Makefile index 90cd25e6bf..c93851beee 100644 --- a/gnu/usr.bin/binutils222/ranlib/Makefile +++ b/gnu/usr.bin/binutils222/ranlib/Makefile @@ -1,17 +1,22 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= ranlib SRCS= ar.c is-ranlib.c -MAN= ranlib222.1 -MLINKS+=ranlib222.1 ranlib.1 +MFILE= ranlib${MANPAGEVER}.1 +MAN= ${MFILE} NOSHARED?= yes -ranlib222.1: ${SRCDIR}/binutils/doc/ranlib.1 +${MFILE}: ${SRCDIR}/binutils/doc/ranlib.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= ranlib222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} ranlib.1 +.endif .include diff --git a/gnu/usr.bin/binutils222/readelf/Makefile b/gnu/usr.bin/binutils222/readelf/Makefile index bc18e948a3..12dd662833 100644 --- a/gnu/usr.bin/binutils222/readelf/Makefile +++ b/gnu/usr.bin/binutils222/readelf/Makefile @@ -1,16 +1,21 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= readelf SRCS= readelf.c unwind-ia64.c dwarf.c elfcomm.c -MAN= readelf222.1 -MLINKS+=readelf222.1 readelf.1 +MFILE= readelf${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 -readelf222.1: ${SRCDIR}/binutils/doc/readelf.1 +${MFILE}: ${SRCDIR}/binutils/doc/readelf.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= readelf222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} readelf.1 +.endif .include diff --git a/gnu/usr.bin/binutils222/size/Makefile b/gnu/usr.bin/binutils222/size/Makefile index de92b950b9..db9b51b78a 100644 --- a/gnu/usr.bin/binutils222/size/Makefile +++ b/gnu/usr.bin/binutils222/size/Makefile @@ -1,15 +1,20 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= size -MAN= size222.1 -MLINKS+=size222.1 size.1 +MFILE= size${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 2 -size222.1: ${SRCDIR}/binutils/doc/size.1 +${MFILE}: ${SRCDIR}/binutils/doc/size.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= size222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} size.1 +.endif .include diff --git a/gnu/usr.bin/binutils222/strings/Makefile b/gnu/usr.bin/binutils222/strings/Makefile index 958ed71a8f..09f68c213e 100644 --- a/gnu/usr.bin/binutils222/strings/Makefile +++ b/gnu/usr.bin/binutils222/strings/Makefile @@ -1,15 +1,20 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= strings -MAN= strings222.1 -MLINKS+=strings222.1 strings.1 +MFILE= strings${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 2 -strings222.1: ${SRCDIR}/binutils/doc/strings.1 +${MFILE}: ${SRCDIR}/binutils/doc/strings.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= strings222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} strings.1 +.endif .include diff --git a/gnu/usr.bin/binutils222/strip/Makefile b/gnu/usr.bin/binutils222/strip/Makefile index 20264e89c4..80496b1728 100644 --- a/gnu/usr.bin/binutils222/strip/Makefile +++ b/gnu/usr.bin/binutils222/strip/Makefile @@ -1,11 +1,12 @@ +.include "../Makefile.inc1" .include "../Makefile.bu" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc PROG= strip SRCS= objcopy.c is-strip.c -MAN= strip222.1 -MLINKS+=strip222.1 strip.1 +MFILE= strip${MANPAGEVER}.1 +MAN= ${MFILE} WARNS= 1 CLEANFILES+= maybe_stripped @@ -20,10 +21,14 @@ maybe_stripped: strip .endif .endif -strip222.1: ${SRCDIR}/binutils/doc/strip.1 +${MFILE}: ${SRCDIR}/binutils/doc/strip.1 cp ${.ALLSRC} ${.TARGET} -CLEANFILES+= strip222.1 +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} strip.1 +.endif realinstall: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ -- 2.41.0