Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
This commit is contained in:
ngie 2017-01-20 04:27:40 +00:00
parent 2836ee611f
commit 3af0508ec5
9 changed files with 15 additions and 15 deletions

View File

@ -2,25 +2,25 @@
# This Makefile is shared by libncurses, libform, libmenu, libpanel.
NCURSES_DIR= ${.CURDIR}/../../../contrib/ncurses
NCURSES_DIR= ${SRCTOP}/contrib/ncurses
.if defined(ENABLE_WIDEC)
LIB_SUFFIX= w
CFLAGS+= -D_XOPEN_SOURCE_EXTENDED -DENABLE_WIDEC
NCURSES_CFG_H= ${.CURDIR}/../ncurses/ncurses_cfg.h
NCURSES_CFG_H= ${.CURDIR:H}/ncurses/ncurses_cfg.h
.else
LIB_SUFFIX=
NCURSES_CFG_H= ${.CURDIR}/ncurses_cfg.h
.endif
CFLAGS+= -I.
.if exists(${.OBJDIR}/../ncurses${LIB_SUFFIX})
CFLAGS+= -I${.OBJDIR}/../ncurses${LIB_SUFFIX}
.if exists(${.OBJDIR:H}/ncurses${LIB_SUFFIX})
CFLAGS+= -I${.OBJDIR:H}/ncurses${LIB_SUFFIX}
.endif
CFLAGS+= -I${.CURDIR}/../ncurses${LIB_SUFFIX}
CFLAGS+= -I${.CURDIR:H}/ncurses${LIB_SUFFIX}
# for ${NCURSES_CFG_H}
CFLAGS+= -I${.CURDIR}/../ncurses
CFLAGS+= -I${.CURDIR:H}/ncurses
CFLAGS+= -I${NCURSES_DIR}/include
CFLAGS+= -I${NCURSES_DIR}/ncurses

View File

@ -1,6 +1,6 @@
# $FreeBSD$
.include "${.CURDIR}/../config.mk"
.include "${.CURDIR:H}/config.mk"
SRCDIR= ${NCURSES_DIR}/form

View File

@ -2,4 +2,4 @@
ENABLE_WIDEC=
.include "${.CURDIR}/../form/Makefile"
.include "${.CURDIR:H}/form/Makefile"

View File

@ -1,6 +1,6 @@
# $FreeBSD$
.include "${.CURDIR}/../config.mk"
.include "${.CURDIR:H}/config.mk"
SRCDIR= ${NCURSES_DIR}/menu

View File

@ -2,4 +2,4 @@
ENABLE_WIDEC=
.include "${.CURDIR}/../menu/Makefile"
.include "${.CURDIR:H}/menu/Makefile"

View File

@ -10,7 +10,7 @@ MK_MAN=no
.include <src.opts.mk>
.include "${.CURDIR}/../config.mk"
.include "${.CURDIR:H}/config.mk"
LIB= ncurses${LIB_SUFFIX}
SHLIB_MAJOR= 8

View File

@ -2,6 +2,6 @@
ENABLE_WIDEC=
.PATH: ${.CURDIR}/../ncurses
.PATH: ${.CURDIR:H}/ncurses
.include "${.CURDIR}/../ncurses/Makefile"
.include "${.CURDIR:H}/ncurses/Makefile"

View File

@ -1,6 +1,6 @@
# $FreeBSD$
.include "${.CURDIR}/../config.mk"
.include "${.CURDIR:H}/config.mk"
SRCDIR= ${NCURSES_DIR}/panel

View File

@ -2,4 +2,4 @@
ENABLE_WIDEC=
.include "${.CURDIR}/../panel/Makefile"
.include "${.CURDIR:H}/panel/Makefile"