Add dependency handling for Config.in creation
[openadk.git] / GNUmakefile
blob5d2279a17c7afe49179f1c24292b7d42f7a79828
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:= $(shell pwd)
5 PWD:= ${TOPDIR}
7 ADKVERSION= 0.1.0
8 export ADKVERSION
10 ifneq (${package},)
11 subdir:= package/${package}
12 _subdir_dep:= ${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG
13 endif
15 ifneq (${subdir},)
16 ${MAKECMDGOALS}: _subdir
18 _subdir: ${_subdir_dep}
19 @if test x"$$(umask 2>/dev/null | sed 's/00*22/OK/')" != x"OK"; then \
20 echo >&2 Error: you must build with “umask 022, sorry.; \
21 exit 1; \
23 cd ${subdir} && TOPDIR=${TOPDIR} DEVELOPER=1 \
24 make VERBOSE=1 ${MAKEFLAGS} ${MAKECMDGOALS}
26 include prereq.mk
27 include mk/split-cfg.mk
28 else
29 include Makefile
30 endif