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
This commit is contained in:
ngie 2017-03-04 11:26:40 +00:00
parent 9900a2bb5e
commit f3b9b77d64
26 changed files with 32 additions and 33 deletions

View File

@ -5,7 +5,7 @@
LOCALEDIR= ${SHAREDIR}/locale LOCALEDIR= ${SHAREDIR}/locale
FILESNAME= LC_COLLATE FILESNAME= LC_COLLATE
.SUFFIXES: .src .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: .src.LC_COLLATE:
localedef -D -U -i ${.IMPSRC} \ localedef -D -U -i ${.IMPSRC} \

View File

@ -5,7 +5,7 @@
LOCALEDIR= ${SHAREDIR}/locale LOCALEDIR= ${SHAREDIR}/locale
FILESNAME= LC_CTYPE FILESNAME= LC_CTYPE
.SUFFIXES: .src .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: .src.LC_CTYPE:
localedef -D -U -c -w ${MAPLOC}/widths.txt \ localedef -D -U -c -w ${MAPLOC}/widths.txt \

View File

@ -25,9 +25,8 @@
# #
# $FreeBSD$ # $FreeBSD$
ATF= ${.CURDIR}/../../../contrib/atf ATF= ${SRCTOP}/contrib/atf
.PATH: ${ATF} .PATH: ${ATF} ${ATF}/doc
.PATH: ${ATF}/doc
FILESGROUPS= TOP FILESGROUPS= TOP

View File

@ -1,6 +1,6 @@
# $FreeBSD$ # $FreeBSD$
FILES= ${.CURDIR}/../../../../sys/contrib/dev/ipw/LICENSE FILES= ${SRCTOP}/sys/contrib/dev/ipw/LICENSE
FILESDIR= ${SHAREDIR}/doc/legal FILESDIR= ${SHAREDIR}/doc/legal
FILESNAME= intel_ipw.LICENSE FILESNAME= intel_ipw.LICENSE

View File

@ -1,6 +1,6 @@
# $FreeBSD$ # $FreeBSD$
FILES= ${.CURDIR}/../../../../sys/contrib/dev/iwi/LICENSE FILES= ${SRCTOP}/sys/contrib/dev/iwi/LICENSE
FILESDIR= ${SHAREDIR}/doc/legal FILESDIR= ${SHAREDIR}/doc/legal
FILESNAME= intel_iwi.LICENSE FILESNAME= intel_iwi.LICENSE

View File

@ -1,6 +1,6 @@
# $FreeBSD$ # $FreeBSD$
FILES= ${.CURDIR}/../../../../sys/contrib/dev/iwn/LICENSE FILES= ${SRCTOP}/sys/contrib/dev/iwn/LICENSE
FILESDIR= ${SHAREDIR}/doc/legal FILESDIR= ${SHAREDIR}/doc/legal
FILESNAME= intel_iwn.LICENSE FILESNAME= intel_iwn.LICENSE

View File

@ -1,6 +1,6 @@
# $FreeBSD$ # $FreeBSD$
FILES= ${.CURDIR}/../../../../sys/contrib/dev/wpi/LICENSE FILES= ${SRCTOP}/sys/contrib/dev/wpi/LICENSE
FILESDIR= ${SHAREDIR}/doc/legal FILESDIR= ${SHAREDIR}/doc/legal
FILESNAME= intel_wpi.LICENSE FILESNAME= intel_wpi.LICENSE

View File

@ -1,6 +1,6 @@
# $FreeBSD$ # $FreeBSD$
FILES= ${.CURDIR}/../../../../sys/contrib/dev/rtwn/LICENSE FILES= ${SRCTOP}/sys/contrib/dev/rtwn/LICENSE
FILESDIR= ${SHAREDIR}/doc/legal FILESDIR= ${SHAREDIR}/doc/legal
FILESNAME= realtek.LICENSE FILESNAME= realtek.LICENSE

View File

@ -2,7 +2,7 @@
SUBDIR= clang SUBDIR= clang
SRCDIR= ${.CURDIR}/../../../contrib/llvm SRCDIR= ${SRCTOP}/contrib/llvm
.PATH: ${SRCDIR} ${SRCDIR}/lib/Support .PATH: ${SRCDIR} ${SRCDIR}/lib/Support

View File

@ -1,6 +1,6 @@
# $FreeBSD$ # $FreeBSD$
SRCDIR= ${.CURDIR}/../../../../contrib/llvm/tools/clang SRCDIR= ${SRCTOP}/contrib/llvm/tools/clang
.PATH: ${SRCDIR} .PATH: ${SRCDIR}

View File

@ -6,6 +6,6 @@ SRCS= op.me
MACROS= -me MACROS= -me
USE_PIC= USE_PIC=
USE_EQN= USE_EQN=
SRCDIR= ${.CURDIR}/../../../../contrib/sendmail/doc/op SRCDIR= ${SRCTOP}/contrib/sendmail/doc/op
.include <bsd.doc.mk> .include <bsd.doc.mk>

View File

@ -4,7 +4,7 @@
VOLUME= usd/19.memacros VOLUME= usd/19.memacros
SRCS= meintro.me-sed SRCS= meintro.me-sed
MACROS= -me MACROS= -me
GROFFDIR= ${.CURDIR}/../../../../contrib/groff GROFFDIR= ${SRCTOP}/contrib/groff
SRCDIR= ${GROFFDIR}/doc SRCDIR= ${GROFFDIR}/doc
version=`cat ${GROFFDIR}/VERSION` version=`cat ${GROFFDIR}/VERSION`

View File

@ -4,7 +4,7 @@
VOLUME= usd/20.meref VOLUME= usd/20.meref
SRCS= meref.me-sed SRCS= meref.me-sed
MACROS= -me MACROS= -me
GROFFDIR= ${.CURDIR}/../../../../contrib/groff GROFFDIR= ${SRCTOP}/contrib/groff
SRCDIR= ${GROFFDIR}/doc SRCDIR= ${GROFFDIR}/doc
version=`cat ${GROFFDIR}/VERSION` version=`cat ${GROFFDIR}/VERSION`

View File

@ -241,7 +241,7 @@ copies:
fi fi
.endfor .endfor
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \ 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} .for file in ${XFILES}
${INSTALL} -T package=${PACKAGE_${file}:Uexamples} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ ${INSTALL} -T package=${PACKAGE_${file}:Uexamples} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file} ${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
@ -255,7 +255,7 @@ symlinks:
etc-examples: etc-examples:
.if ${SHARED} != "symlinks" .if ${SHARED} != "symlinks"
${_+_}(cd ${.CURDIR}/../../etc; ${MAKE} etc-examples) ${_+_}(cd ${SRCTOP}/etc; ${MAKE} etc-examples)
.endif .endif
.if ${SHARED} != "symlinks" .if ${SHARED} != "symlinks"

View File

@ -4,9 +4,9 @@ PACKAGE=examples
FILES= README FILES= README
# dist sample files # dist sample files
.PATH: ${.CURDIR}/../../../contrib/ipfilter/rules \ .PATH: ${SRCTOP}/contrib/ipfilter/rules \
${.CURDIR}/../../../contrib/ipfilter \ ${SRCTOP}/contrib/ipfilter \
${.CURDIR}/../../../contrib/ipfilter/man ${SRCTOP}/contrib/ipfilter/man
FILES+= BASIC.NAT BASIC_1.FW BASIC_2.FW \ FILES+= BASIC.NAT BASIC_1.FW BASIC_2.FW \
example.1 example.2 example.3 example.4 example.5 \ example.1 example.2 example.3 example.4 example.5 \
example.6 example.7 example.8 example.9 example.10 \ example.6 example.7 example.8 example.9 example.10 \

View File

@ -4,7 +4,7 @@ PACKAGE=examples
FILESDIR= ${SHAREDIR}/examples/smbfs FILESDIR= ${SHAREDIR}/examples/smbfs
FILES= dot.nsmbrc FILES= dot.nsmbrc
.PATH: ${.CURDIR}/../../../contrib/smbfs/examples .PATH: ${SRCTOP}/contrib/smbfs/examples
SUBDIR= print SUBDIR= print

View File

@ -4,6 +4,6 @@ PACKAGE=examples
FILESDIR= ${SHAREDIR}/examples/smbfs/print FILESDIR= ${SHAREDIR}/examples/smbfs/print
FILES= lj6l ljspool printcap.sample tolj FILES= lj6l ljspool printcap.sample tolj
.PATH: ${.CURDIR}/../../../../contrib/smbfs/examples/print .PATH: ${SRCTOP}/contrib/smbfs/examples/print
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -6,4 +6,4 @@ CSMAPPERDIR?= /usr/share/i18n/csmapper
.if ${MK_STAGING} == "yes" .if ${MK_STAGING} == "yes"
MKCSMAPPER= ${STAGE_HOST_OBJTOP}/usr/bin/mkcsmapper_static MKCSMAPPER= ${STAGE_HOST_OBJTOP}/usr/bin/mkcsmapper_static
.endif .endif
MKCSMAPPER?= ${.OBJDIR}/../../../usr.bin/mkcsmapper_static/mkcsmapper_static MKCSMAPPER?= ${.OBJDIR:H:H:H}/usr.bin/mkcsmapper_static/mkcsmapper_static

View File

@ -1,7 +1,7 @@
# $FreeBSD$ # $FreeBSD$
# $NetBSD: Makefile,v 1.13 2007/03/13 16:34:37 tnozaki Exp $ # $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} ESUBDIR?= ${CODE}
PARTFILE?= ${.CURDIR}/${CODE}.part PARTFILE?= ${.CURDIR}/${CODE}.part
@ -14,7 +14,7 @@ RTABLENAME?= UCS%${CODE}-%%PART%%
ENCID?= ${CODE}%%PART%% ENCID?= ${CODE}%%PART%%
ENCEXT?= .mps ENCEXT?= .mps
MAPPER?= mapper_std MAPPER?= mapper_std
REVSYMBOL?= REVSYMBOL?=
FILESDIR= ${CSMAPPERDIR}/${ESUBDIR} FILESDIR= ${CSMAPPERDIR}/${ESUBDIR}
.SUFFIXES: .src .646 .mps .SUFFIXES: .src .646 .mps

View File

@ -8,4 +8,4 @@ ESDBDIR?= /usr/share/i18n/esdb
.if ${MK_STAGING} == "yes" .if ${MK_STAGING} == "yes"
MKESDB= ${STAGE_HOST_OBJTOP}/usr/bin/mkesdb_static MKESDB= ${STAGE_HOST_OBJTOP}/usr/bin/mkesdb_static
.endif .endif
MKESDB?= ${.OBJDIR}/../../../usr.bin/mkesdb_static/mkesdb_static MKESDB?= ${.OBJDIR:H:H:H}/usr.bin/mkesdb_static/mkesdb_static

View File

@ -1,7 +1,7 @@
# $FreeBSD$ # $FreeBSD$
# $NetBSD: Makefile.part,v 1.6 2008/10/25 22:35:36 apb Exp $ # $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 PARTFILE?= ${.CURDIR}/${CODE}.part
ALIASFILE?= ${.CURDIR}/${CODE}.alias ALIASFILE?= ${.CURDIR}/${CODE}.alias
@ -16,7 +16,7 @@ CODESETS?= ${PART:C/^/${CODE}${SEP}/}
EPREFIX?= ${CODE}${SEP} EPREFIX?= ${CODE}${SEP}
.else .else
CODESETS?= ${PART} CODESETS?= ${PART}
EPREFIX?= EPREFIX?=
.endif .endif
ESUBDIR?= ${CODE} ESUBDIR?= ${CODE}
ESDB?= ${CODESETS:C/$/.esdb/:S/:/@/} ESDB?= ${CODESETS:C/$/.esdb/:S/:/@/}

View File

@ -8,7 +8,7 @@ MAN= builtin.1 intro.1
PACKAGE=runtime-manuals PACKAGE=runtime-manuals
.if ${MK_TESTS} != "no" .if ${MK_TESTS} != "no"
ATF= ${.CURDIR}/../../../contrib/atf ATF= ${SRCTOP}/contrib/atf
.PATH: ${ATF}/doc .PATH: ${ATF}/doc
MAN+= atf-test-program.1 MAN+= atf-test-program.1
.endif .endif

View File

@ -896,7 +896,7 @@ MAN+= mlx4ib.4
.endif .endif
.if ${MK_TESTS} != "no" .if ${MK_TESTS} != "no"
ATF= ${.CURDIR}/../../../contrib/atf ATF= ${SRCTOP}/contrib/atf
.PATH: ${ATF}/doc .PATH: ${ATF}/doc
_atf_test_case.4= atf-test-case.4 _atf_test_case.4= atf-test-case.4
.endif .endif

View File

@ -43,7 +43,7 @@ MLINKS+= c99.7 c89.7
MLINKS+= c99.7 c90.7 MLINKS+= c99.7 c90.7
.if ${MK_TESTS} != "no" .if ${MK_TESTS} != "no"
ATF= ${.CURDIR}/../../../contrib/atf ATF= ${SRCTOP}/contrib/atf
.PATH: ${ATF}/doc .PATH: ${ATF}/doc
MAN+= atf.7 MAN+= atf.7

View File

@ -4,7 +4,7 @@
PACKAGE= sendmail PACKAGE= sendmail
FILESGROUPS+= SM FILESGROUPS+= SM
SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail SENDMAIL_DIR= ${SRCTOP}/contrib/sendmail
CFDIR= cf CFDIR= cf
CFPACKAGE= sendmail CFPACKAGE= sendmail
CFDIRS!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print) CFDIRS!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print)

View File

@ -30,7 +30,7 @@
CLEANFILES+= yearistype CLEANFILES+= yearistype
CLEANDIRS+= builddir CLEANDIRS+= builddir
CONTRIBDIR= ${.CURDIR}/../../contrib/tzdata/ CONTRIBDIR= ${SRCTOP}/contrib/tzdata/
.PATH: ${CONTRIBDIR} .PATH: ${CONTRIBDIR}
.if defined(LEAPSECONDS) .if defined(LEAPSECONDS)