root/trunk/freewrt/GNUmakefile

Revision 3880, 0.8 kB (checked in by tg, 2 years ago)

ensure people don't try to build this as superuser

Line 
1 # $FreeWRT$
2 #-
3 # This file is part of the FreeWRT project. FreeWRT is copyrighted
4 # material, please see the LICENCE file in the top-level directory
5 # or at http://www.freewrt.org/licence for details.
6
7 TOPDIR:=        $(shell pwd)
8 PWD:=           ${TOPDIR}
9
10 ifeq ($(shell id -u),0)
11 $(error Do not build as root! It causes problems)
12 endif
13
14 ifneq (${package},)
15 subdir:=        package/${package}
16 _subdir_dep:=   ${TOPDIR}/.cfg/FWRT_HAVE_DOT_CONFIG
17 endif
18
19 ifneq (${subdir},)
20 ${MAKECMDGOALS}: _subdir
21
22 _subdir: ${_subdir_dep}
23         @if test x"$$(umask 2>/dev/null | sed 's/00*22/OK/')" != x"OK"; then \
24                 echo >&2 Error: you must build with “umask 022”, sorry.; \
25                 exit 1; \
26         fi
27         cd ${subdir} && TOPDIR=${TOPDIR} DEVELOPER=1 \
28             ${TOPDIR}/lbin/gmake V=99 ${MAKEFLAGS} ${MAKECMDGOALS}
29
30 include lbin/prereq.mk
31 include mk/split-cfg.mk
32 else
33 include Makefile
34 endif
Note: See TracBrowser for help on using the browser.