Skip to content

Commit 8787b78

Browse files
ngie-eigncorecode
authored andcommitted
Fix building bsd/.. after using make obj
Refer to source files using .CURDIR instead of relying on the build to be done with NO_OBJ, etc. Adjust .gitignore to ignore files left behind as part of FreeBSD's bsd.prog.mk and to also prevent git from overzealously ignoring `bsd/dma{,-mbox-create}/...`.
1 parent 79edf94 commit 8787b78

4 files changed

Lines changed: 25 additions & 9 deletions

File tree

.gitignore

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
*.o
2-
dma
3-
dma-mbox-create
4-
aliases_parse.c
5-
aliases_parse.h
6-
aliases_scan.c
2+
# Omit binaries.
3+
./dma
4+
./dma-mbox-create
5+
./aliases_parse.c
6+
./aliases_parse.h
7+
./aliases_scan.c
8+
# BSD-related...
9+
# - Omit files created on FreeBSD as part of bsd.prog.mk.
10+
*.depend
11+
*.debug
12+
*.full
13+
# - Omit files created in bsd if `make obj` isn't called first.
14+
bsd/dma/dma*
15+
bsd/dma-mbox-create/dma-mbox-create*

bsd/dma-mbox-create/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
#
22

3-
version!= sh ../../get-version.sh ../../VERSION
3+
DMA_SRCTOP= ${.CURDIR:H:H}
4+
5+
.include "../version.mk"
46

57
CFLAGS+= -I${.CURDIR}/../..
68
CFLAGS+= -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME
79
CFLAGS+= -DLIBEXEC_PATH='"${LIBEXEC}"' -DDMA_VERSION='"${version}"'
810
CFLAGS+= -DCONF_PATH='"${CONFDIR}"'
911

1012
PROG= dma-mbox-create
11-
.PATH: ${.CURDIR}/../..
13+
.PATH: ${DMA_SRCTOP}
1214
SRCS+= dma-mbox-create.c
1315
NOMAN=
1416
MK_MAN= no

bsd/dma/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# $DragonFly: src/libexec/dma/Makefile,v 1.5 2008/09/19 00:36:57 corecode Exp $
22
#
33

4-
version!= sh ../../get-version.sh ../../VERSION
4+
DMA_SRCTOP= ${.CURDIR:H:H}
5+
6+
.include "../version.mk"
57

68
CFLAGS+= -I${.CURDIR}/../..
79
CFLAGS+= -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME
@@ -12,7 +14,7 @@ DPADD= ${LIBSSL} ${LIBCRYPTO}
1214
LDADD= -lssl -lcrypto
1315

1416
PROG= dma
15-
.PATH: ${.CURDIR}/../..
17+
.PATH: ${DMA_SRCTOP}
1618
SRCS= aliases_parse.y aliases_scan.l base64.c conf.c crypto.c
1719
SRCS+= dma.c dns.c local.c mail.c net.c spool.c util.c
1820
MAN= dma.8

bsd/version.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SHELL?= /bin/sh
2+
3+
version!= ${SHELL} ${DMA_SRCTOP}/get-version.sh ${DMA_SRCTOP}/VERSION

0 commit comments

Comments
 (0)