usr.bin/fortune: convert to OBJTOP/SRCTOP idioms

- Use OBJTOP/SRCTOP-relative paths when looking for include files and
  strfile.
- Add FORTUNES_OBJ and FORTUNES_SRC to abbreviate usr.bin/fortune
  pathing.

This is being done to simplify make output/idioms.

MFC after:	1 week
Reviewed by:	bdrewery
Sponsored by:	Dell EMC Isilon
Differential Revision:	D9916
This commit is contained in:
Enji Cooper 2017-03-08 05:31:54 +00:00
parent 05de3f339a
commit cbd30a72ca
4 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,6 @@
.if exists(${.CURDIR}/../../Makefile.inc)
.include "${.CURDIR}/../../Makefile.inc"
.endif
# $FreeBSD$
FORTUNE_SRC= ${SRCTOP}/usr.bin/fortune
FORTUNE_OBJ= ${OBJTOP}/usr.bin/fortune
.include "${SRCTOP}/usr.bin/Makefile.inc"

View File

@ -15,7 +15,7 @@ FILESDIR= ${SHAREDIR}/games/fortune
.for f in ${DB}
$f.dat: $f
PATH=$$PATH:/usr/bin:${.OBJDIR}/../strfile \
PATH=$$PATH:/usr/bin:${FORTUNE_OBJ}/strfile \
strfile -Cs ${.ALLSRC} ${.TARGET}
.endfor

View File

@ -3,7 +3,7 @@
PROG= fortune
MAN= fortune.6
CFLAGS+=-DDEBUG -I${.CURDIR}/../strfile
CFLAGS+=-DDEBUG -I${FORTUNE_SRC}/strfile
.include <bsd.prog.mk>

View File

@ -3,6 +3,6 @@
PROG= unstr
MAN=
CFLAGS+= -I${.CURDIR}/../strfile
CFLAGS+= -I${FORTUNE_SRC}/strfile
.include <bsd.prog.mk>