integrate OpenWrt swconfig utility
[openadk.git] / BSDmakefile
blob1720ba4950a6d682e2557cedfac88cf1b6a78ca1
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 TOPDIR= ${.CURDIR}
5 PWD= ${.CURDIR}
7 .include "${.CURDIR}/Makefile.inc"
9 .if defined(package) && !empty(package)
10 subdir:= package/${package}
11 . if !make(clean)
12 _subdir_dep:= ${TOPDIR}/.config
13 . endif
14 .endif
16 .if defined(subdir) && !empty(subdir)
17 _subdir:= ${.TARGETS}
18 ${.TARGETS}: _subdir
20 _subdir: ${_subdir_dep}
21 @if test x"$$(umask 2>/dev/null | sed 's/00*22/OK/')" != x"OK"; then \
22 echo >&2 Error: you must build with “umask 022, sorry.; \
23 exit 1; \
25 cd ${.CURDIR}/${subdir} && TOPDIR=${.CURDIR} DEVELOPER=1 \
26 ${GMAKE} VERBOSE=1 ${.MFLAGS} ${_subdir}
28 . include "${.CURDIR}/prereq.mk"
29 .else
30 . include "${.CURDIR}/Makefile"
31 .endif