From cbd30a72ca196976c1c700400ecd424baa1b9c16 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 8 Mar 2017 05:31:54 +0000 Subject: [PATCH] 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 --- usr.bin/fortune/Makefile.inc | 9 ++++++--- usr.bin/fortune/datfiles/Makefile | 2 +- usr.bin/fortune/fortune/Makefile | 2 +- usr.bin/fortune/unstr/Makefile | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/usr.bin/fortune/Makefile.inc b/usr.bin/fortune/Makefile.inc index 63751fb0bf14..3c8727ba2d45 100644 --- a/usr.bin/fortune/Makefile.inc +++ b/usr.bin/fortune/Makefile.inc @@ -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" diff --git a/usr.bin/fortune/datfiles/Makefile b/usr.bin/fortune/datfiles/Makefile index 1eabaa4cdc61..6f1fc9c26e19 100644 --- a/usr.bin/fortune/datfiles/Makefile +++ b/usr.bin/fortune/datfiles/Makefile @@ -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 diff --git a/usr.bin/fortune/fortune/Makefile b/usr.bin/fortune/fortune/Makefile index c18ead9ef77d..529075faedd8 100644 --- a/usr.bin/fortune/fortune/Makefile +++ b/usr.bin/fortune/fortune/Makefile @@ -3,7 +3,7 @@ PROG= fortune MAN= fortune.6 -CFLAGS+=-DDEBUG -I${.CURDIR}/../strfile +CFLAGS+=-DDEBUG -I${FORTUNE_SRC}/strfile .include diff --git a/usr.bin/fortune/unstr/Makefile b/usr.bin/fortune/unstr/Makefile index e943d976eac6..14a80de640b8 100644 --- a/usr.bin/fortune/unstr/Makefile +++ b/usr.bin/fortune/unstr/Makefile @@ -3,6 +3,6 @@ PROG= unstr MAN= -CFLAGS+= -I${.CURDIR}/../strfile +CFLAGS+= -I${FORTUNE_SRC}/strfile .include