summaryrefslogtreecommitdiff
path: root/BSDmakefile
blob: 9afeaa3af7e8a6b078ce1001c268840dc064ef8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

ADKVERSION=	0.1.0
TOPDIR=		${.CURDIR}
PWD=		${.CURDIR}

.include "${.CURDIR}/Makefile.inc"

GMAKE_ENV+=	ADKVERSION=${ADKVERSION:Q}

.if defined(package) && !empty(package)
subdir:=	package/${package}
.  if !make(clean)
_subdir_dep:=	${TOPDIR}/.config
.  endif
.endif

.if defined(subdir) && !empty(subdir)
_subdir:=	${.TARGETS}
${.TARGETS}: _subdir

_subdir: ${_subdir_dep}
	@if test x"$$(umask 2>/dev/null | sed 's/00*22/OK/')" != x"OK"; then \
		echo >&2 Error: you must build with “umask 022”, sorry.; \
		exit 1; \
	fi
	cd ${.CURDIR}/${subdir} && TOPDIR=${.CURDIR} DEVELOPER=1 \
	    ${GMAKE} VERBOSE=1 ${.MFLAGS} ${_subdir}

.  include "${.CURDIR}/prereq.mk"
.else
.  include "${.CURDIR}/Makefile"
.endif