From f3b9b77d64eb8ade44628a36b6cb59157649d067 Mon Sep 17 00:00:00 2001 From: ngie Date: Sat, 4 Mar 2017 11:26:40 +0000 Subject: [PATCH] share: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon --- share/colldef/Makefile | 2 +- share/ctypedef/Makefile | 2 +- share/doc/atf/Makefile | 5 ++--- share/doc/legal/intel_ipw/Makefile | 2 +- share/doc/legal/intel_iwi/Makefile | 2 +- share/doc/legal/intel_iwn/Makefile | 2 +- share/doc/legal/intel_wpi/Makefile | 2 +- share/doc/legal/realtek/Makefile | 2 +- share/doc/llvm/Makefile | 2 +- share/doc/llvm/clang/Makefile | 2 +- share/doc/smm/08.sendmailop/Makefile | 2 +- share/doc/usd/19.memacros/Makefile | 2 +- share/doc/usd/20.meref/Makefile | 2 +- share/examples/Makefile | 4 ++-- share/examples/ipfilter/Makefile | 6 +++--- share/examples/smbfs/Makefile | 2 +- share/examples/smbfs/print/Makefile | 2 +- share/i18n/csmapper/Makefile.inc | 2 +- share/i18n/csmapper/Makefile.part | 4 ++-- share/i18n/esdb/Makefile.inc | 2 +- share/i18n/esdb/Makefile.part | 4 ++-- share/man/man1/Makefile | 2 +- share/man/man4/Makefile | 2 +- share/man/man7/Makefile | 2 +- share/sendmail/Makefile | 2 +- share/zoneinfo/Makefile | 2 +- 26 files changed, 32 insertions(+), 33 deletions(-) diff --git a/share/colldef/Makefile b/share/colldef/Makefile index 478a91b2e5f8..5de824be3a5f 100644 --- a/share/colldef/Makefile +++ b/share/colldef/Makefile @@ -5,7 +5,7 @@ LOCALEDIR= ${SHAREDIR}/locale FILESNAME= LC_COLLATE .SUFFIXES: .src .LC_COLLATE -MAPLOC= ${.CURDIR}/../../tools/tools/locale/etc/final-maps +MAPLOC= ${SRCTOP}/tools/tools/locale/etc/final-maps .src.LC_COLLATE: localedef -D -U -i ${.IMPSRC} \ diff --git a/share/ctypedef/Makefile b/share/ctypedef/Makefile index 7c52a80abc56..870ebfd76362 100644 --- a/share/ctypedef/Makefile +++ b/share/ctypedef/Makefile @@ -5,7 +5,7 @@ LOCALEDIR= ${SHAREDIR}/locale FILESNAME= LC_CTYPE .SUFFIXES: .src .LC_CTYPE -MAPLOC= ${.CURDIR}/../../tools/tools/locale/etc/final-maps +MAPLOC= ${SRCTOP}/tools/tools/locale/etc/final-maps .src.LC_CTYPE: localedef -D -U -c -w ${MAPLOC}/widths.txt \ diff --git a/share/doc/atf/Makefile b/share/doc/atf/Makefile index bfd7d060622d..78eb7bc7c607 100644 --- a/share/doc/atf/Makefile +++ b/share/doc/atf/Makefile @@ -25,9 +25,8 @@ # # $FreeBSD$ -ATF= ${.CURDIR}/../../../contrib/atf -.PATH: ${ATF} -.PATH: ${ATF}/doc +ATF= ${SRCTOP}/contrib/atf +.PATH: ${ATF} ${ATF}/doc FILESGROUPS= TOP diff --git a/share/doc/legal/intel_ipw/Makefile b/share/doc/legal/intel_ipw/Makefile index e52d8bbd0f3b..179e49189b6b 100644 --- a/share/doc/legal/intel_ipw/Makefile +++ b/share/doc/legal/intel_ipw/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= ${.CURDIR}/../../../../sys/contrib/dev/ipw/LICENSE +FILES= ${SRCTOP}/sys/contrib/dev/ipw/LICENSE FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= intel_ipw.LICENSE diff --git a/share/doc/legal/intel_iwi/Makefile b/share/doc/legal/intel_iwi/Makefile index 012ce7a4a22b..b51bc9070082 100644 --- a/share/doc/legal/intel_iwi/Makefile +++ b/share/doc/legal/intel_iwi/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= ${.CURDIR}/../../../../sys/contrib/dev/iwi/LICENSE +FILES= ${SRCTOP}/sys/contrib/dev/iwi/LICENSE FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= intel_iwi.LICENSE diff --git a/share/doc/legal/intel_iwn/Makefile b/share/doc/legal/intel_iwn/Makefile index dd5772bb288d..0d3f82d74c7b 100644 --- a/share/doc/legal/intel_iwn/Makefile +++ b/share/doc/legal/intel_iwn/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= ${.CURDIR}/../../../../sys/contrib/dev/iwn/LICENSE +FILES= ${SRCTOP}/sys/contrib/dev/iwn/LICENSE FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= intel_iwn.LICENSE diff --git a/share/doc/legal/intel_wpi/Makefile b/share/doc/legal/intel_wpi/Makefile index 61f6d5dea936..9fa2269cb8b2 100644 --- a/share/doc/legal/intel_wpi/Makefile +++ b/share/doc/legal/intel_wpi/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= ${.CURDIR}/../../../../sys/contrib/dev/wpi/LICENSE +FILES= ${SRCTOP}/sys/contrib/dev/wpi/LICENSE FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= intel_wpi.LICENSE diff --git a/share/doc/legal/realtek/Makefile b/share/doc/legal/realtek/Makefile index f98d46e5f858..ce56e54e1e90 100644 --- a/share/doc/legal/realtek/Makefile +++ b/share/doc/legal/realtek/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= ${.CURDIR}/../../../../sys/contrib/dev/rtwn/LICENSE +FILES= ${SRCTOP}/sys/contrib/dev/rtwn/LICENSE FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= realtek.LICENSE diff --git a/share/doc/llvm/Makefile b/share/doc/llvm/Makefile index 250feddb745d..047d3764a145 100644 --- a/share/doc/llvm/Makefile +++ b/share/doc/llvm/Makefile @@ -2,7 +2,7 @@ SUBDIR= clang -SRCDIR= ${.CURDIR}/../../../contrib/llvm +SRCDIR= ${SRCTOP}/contrib/llvm .PATH: ${SRCDIR} ${SRCDIR}/lib/Support diff --git a/share/doc/llvm/clang/Makefile b/share/doc/llvm/clang/Makefile index 727f7509cdc4..b7ca201a8a80 100644 --- a/share/doc/llvm/clang/Makefile +++ b/share/doc/llvm/clang/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCDIR= ${.CURDIR}/../../../../contrib/llvm/tools/clang +SRCDIR= ${SRCTOP}/contrib/llvm/tools/clang .PATH: ${SRCDIR} diff --git a/share/doc/smm/08.sendmailop/Makefile b/share/doc/smm/08.sendmailop/Makefile index 482ed798a95e..e92eeab264a2 100644 --- a/share/doc/smm/08.sendmailop/Makefile +++ b/share/doc/smm/08.sendmailop/Makefile @@ -6,6 +6,6 @@ SRCS= op.me MACROS= -me USE_PIC= USE_EQN= -SRCDIR= ${.CURDIR}/../../../../contrib/sendmail/doc/op +SRCDIR= ${SRCTOP}/contrib/sendmail/doc/op .include diff --git a/share/doc/usd/19.memacros/Makefile b/share/doc/usd/19.memacros/Makefile index 4966e36f611f..b29214787bb8 100644 --- a/share/doc/usd/19.memacros/Makefile +++ b/share/doc/usd/19.memacros/Makefile @@ -4,7 +4,7 @@ VOLUME= usd/19.memacros SRCS= meintro.me-sed MACROS= -me -GROFFDIR= ${.CURDIR}/../../../../contrib/groff +GROFFDIR= ${SRCTOP}/contrib/groff SRCDIR= ${GROFFDIR}/doc version=`cat ${GROFFDIR}/VERSION` diff --git a/share/doc/usd/20.meref/Makefile b/share/doc/usd/20.meref/Makefile index af30e9b64fa5..861bc855ac84 100644 --- a/share/doc/usd/20.meref/Makefile +++ b/share/doc/usd/20.meref/Makefile @@ -4,7 +4,7 @@ VOLUME= usd/20.meref SRCS= meref.me-sed MACROS= -me -GROFFDIR= ${.CURDIR}/../../../../contrib/groff +GROFFDIR= ${SRCTOP}/contrib/groff SRCDIR= ${GROFFDIR}/doc version=`cat ${GROFFDIR}/VERSION` diff --git a/share/examples/Makefile b/share/examples/Makefile index 7bf606c91818..43b0e63414e5 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -241,7 +241,7 @@ copies: fi .endfor mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \ - -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr + -f ${SRCTOP}/etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr .for file in ${XFILES} ${INSTALL} -T package=${PACKAGE_${file}:Uexamples} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ ${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file} @@ -255,7 +255,7 @@ symlinks: etc-examples: .if ${SHARED} != "symlinks" - ${_+_}(cd ${.CURDIR}/../../etc; ${MAKE} etc-examples) + ${_+_}(cd ${SRCTOP}/etc; ${MAKE} etc-examples) .endif .if ${SHARED} != "symlinks" diff --git a/share/examples/ipfilter/Makefile b/share/examples/ipfilter/Makefile index 5e459149c4e7..e2d2e02897a5 100644 --- a/share/examples/ipfilter/Makefile +++ b/share/examples/ipfilter/Makefile @@ -4,9 +4,9 @@ PACKAGE=examples FILES= README # dist sample files -.PATH: ${.CURDIR}/../../../contrib/ipfilter/rules \ - ${.CURDIR}/../../../contrib/ipfilter \ - ${.CURDIR}/../../../contrib/ipfilter/man +.PATH: ${SRCTOP}/contrib/ipfilter/rules \ + ${SRCTOP}/contrib/ipfilter \ + ${SRCTOP}/contrib/ipfilter/man FILES+= BASIC.NAT BASIC_1.FW BASIC_2.FW \ example.1 example.2 example.3 example.4 example.5 \ example.6 example.7 example.8 example.9 example.10 \ diff --git a/share/examples/smbfs/Makefile b/share/examples/smbfs/Makefile index 961172ad4a76..e8e5f1cc0d32 100644 --- a/share/examples/smbfs/Makefile +++ b/share/examples/smbfs/Makefile @@ -4,7 +4,7 @@ PACKAGE=examples FILESDIR= ${SHAREDIR}/examples/smbfs FILES= dot.nsmbrc -.PATH: ${.CURDIR}/../../../contrib/smbfs/examples +.PATH: ${SRCTOP}/contrib/smbfs/examples SUBDIR= print diff --git a/share/examples/smbfs/print/Makefile b/share/examples/smbfs/print/Makefile index e664fbc0a82d..410e9526593f 100644 --- a/share/examples/smbfs/print/Makefile +++ b/share/examples/smbfs/print/Makefile @@ -4,6 +4,6 @@ PACKAGE=examples FILESDIR= ${SHAREDIR}/examples/smbfs/print FILES= lj6l ljspool printcap.sample tolj -.PATH: ${.CURDIR}/../../../../contrib/smbfs/examples/print +.PATH: ${SRCTOP}/contrib/smbfs/examples/print .include diff --git a/share/i18n/csmapper/Makefile.inc b/share/i18n/csmapper/Makefile.inc index 8ebd03447c89..284900c1bc05 100644 --- a/share/i18n/csmapper/Makefile.inc +++ b/share/i18n/csmapper/Makefile.inc @@ -6,4 +6,4 @@ CSMAPPERDIR?= /usr/share/i18n/csmapper .if ${MK_STAGING} == "yes" MKCSMAPPER= ${STAGE_HOST_OBJTOP}/usr/bin/mkcsmapper_static .endif -MKCSMAPPER?= ${.OBJDIR}/../../../usr.bin/mkcsmapper_static/mkcsmapper_static +MKCSMAPPER?= ${.OBJDIR:H:H:H}/usr.bin/mkcsmapper_static/mkcsmapper_static diff --git a/share/i18n/csmapper/Makefile.part b/share/i18n/csmapper/Makefile.part index 2f48b709bf9e..4dbb4ff313dd 100644 --- a/share/i18n/csmapper/Makefile.part +++ b/share/i18n/csmapper/Makefile.part @@ -1,7 +1,7 @@ # $FreeBSD$ # $NetBSD: Makefile,v 1.13 2007/03/13 16:34:37 tnozaki Exp $ -MKCSMAPPER?= ${.OBJDIR}/../../../../usr.bin/mkcsmapper_static/mkcsmapper_static +MKCSMAPPER?= ${.OBJDIR:H:H:H:H}/usr.bin/mkcsmapper_static/mkcsmapper_static ESUBDIR?= ${CODE} PARTFILE?= ${.CURDIR}/${CODE}.part @@ -14,7 +14,7 @@ RTABLENAME?= UCS%${CODE}-%%PART%% ENCID?= ${CODE}%%PART%% ENCEXT?= .mps MAPPER?= mapper_std -REVSYMBOL?= +REVSYMBOL?= FILESDIR= ${CSMAPPERDIR}/${ESUBDIR} .SUFFIXES: .src .646 .mps diff --git a/share/i18n/esdb/Makefile.inc b/share/i18n/esdb/Makefile.inc index 09886c7d70f4..ab61d2cee22f 100644 --- a/share/i18n/esdb/Makefile.inc +++ b/share/i18n/esdb/Makefile.inc @@ -8,4 +8,4 @@ ESDBDIR?= /usr/share/i18n/esdb .if ${MK_STAGING} == "yes" MKESDB= ${STAGE_HOST_OBJTOP}/usr/bin/mkesdb_static .endif -MKESDB?= ${.OBJDIR}/../../../usr.bin/mkesdb_static/mkesdb_static +MKESDB?= ${.OBJDIR:H:H:H}/usr.bin/mkesdb_static/mkesdb_static diff --git a/share/i18n/esdb/Makefile.part b/share/i18n/esdb/Makefile.part index 68bd40d5dc44..703854e6e527 100644 --- a/share/i18n/esdb/Makefile.part +++ b/share/i18n/esdb/Makefile.part @@ -1,7 +1,7 @@ # $FreeBSD$ # $NetBSD: Makefile.part,v 1.6 2008/10/25 22:35:36 apb Exp $ -MKESDB?= ${.OBJDIR}/../../../../usr.bin/mkesdb_static/mkesdb_static +MKESDB?= ${.OBJDIR:H:H:H:H}/usr.bin/mkesdb_static/mkesdb_static PARTFILE?= ${.CURDIR}/${CODE}.part ALIASFILE?= ${.CURDIR}/${CODE}.alias @@ -16,7 +16,7 @@ CODESETS?= ${PART:C/^/${CODE}${SEP}/} EPREFIX?= ${CODE}${SEP} .else CODESETS?= ${PART} -EPREFIX?= +EPREFIX?= .endif ESUBDIR?= ${CODE} ESDB?= ${CODESETS:C/$/.esdb/:S/:/@/} diff --git a/share/man/man1/Makefile b/share/man/man1/Makefile index ed75177189a3..2863d1e2300d 100644 --- a/share/man/man1/Makefile +++ b/share/man/man1/Makefile @@ -8,7 +8,7 @@ MAN= builtin.1 intro.1 PACKAGE=runtime-manuals .if ${MK_TESTS} != "no" -ATF= ${.CURDIR}/../../../contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/doc MAN+= atf-test-program.1 .endif diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 9dd8a072a8cc..9f07359d0ad7 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -896,7 +896,7 @@ MAN+= mlx4ib.4 .endif .if ${MK_TESTS} != "no" -ATF= ${.CURDIR}/../../../contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/doc _atf_test_case.4= atf-test-case.4 .endif diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index 92742df4978a..83e97bc52ab6 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -43,7 +43,7 @@ MLINKS+= c99.7 c89.7 MLINKS+= c99.7 c90.7 .if ${MK_TESTS} != "no" -ATF= ${.CURDIR}/../../../contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/doc MAN+= atf.7 diff --git a/share/sendmail/Makefile b/share/sendmail/Makefile index e4dcb68b56d2..4971ab0f35ff 100644 --- a/share/sendmail/Makefile +++ b/share/sendmail/Makefile @@ -4,7 +4,7 @@ PACKAGE= sendmail FILESGROUPS+= SM -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR= ${SRCTOP}/contrib/sendmail CFDIR= cf CFPACKAGE= sendmail CFDIRS!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print) diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile index 32cee2130068..2f10854cc2e7 100644 --- a/share/zoneinfo/Makefile +++ b/share/zoneinfo/Makefile @@ -30,7 +30,7 @@ CLEANFILES+= yearistype CLEANDIRS+= builddir -CONTRIBDIR= ${.CURDIR}/../../contrib/tzdata/ +CONTRIBDIR= ${SRCTOP}/contrib/tzdata/ .PATH: ${CONTRIBDIR} .if defined(LEAPSECONDS)