source: freewrt/BSDmakefile@ 08c8e8e

freewrt_1_0 freewrt_2_0
Last change on this file since 08c8e8e was ae1e313, checked in by Thorsten Glaser <tg@…>, 16 years ago

ensure people don't try to build this as superuser

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@3880 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 675 bytes
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
7TOPDIR= ${.CURDIR}
8PWD= ${.CURDIR}
9USER_ID!= id -u
10
11.if defined(package) && !empty(package)
12subdir:= package/${package}
13.endif
14
15.if ${USER_ID} == 0
16${.TARGETS}: _nixda
17
18_nixda:
19 @echo Do not build as root! It causes problems.
20 @exit 1
21.elif defined(subdir) && !empty(subdir)
22_subdir:= ${.TARGETS}
23${.TARGETS}: _subdir
24
25_subdir:
26 cd ${.CURDIR}/${subdir} && TOPDIR=${.CURDIR} \
27 ${.CURDIR}/lbin/gmake ${.MFLAGS} ${_subdir}
28.else
29. include "${.CURDIR}/Makefile"
30.endif
Note: See TracBrowser for help on using the repository browser.