BSDmakefile 854 B

123456789101112131415161718192021222324252627282930313233
  1. # $Id$
  2. #-
  3. # This file is part of the OpenADK project. OpenADK is copyrighted
  4. # material, please see the LICENCE file in the top-level directory.
  5. TOPDIR= ${.CURDIR}
  6. PWD= ${.CURDIR}
  7. .if defined(package) && !empty(package)
  8. subdir:= package/${package}
  9. . if !make(clean)
  10. _subdir_dep:= ${TOPDIR}/.cfg/ADK_HAVE_DOT_CONFIG
  11. . endif
  12. .endif
  13. .if defined(subdir) && !empty(subdir)
  14. _subdir:= ${.TARGETS}
  15. ${.TARGETS}: _subdir
  16. _subdir: ${_subdir_dep}
  17. @if test x"$$(umask 2>/dev/null | sed 's/00*22/OK/')" != x"OK"; then \
  18. echo >&2 Error: you must build with “umask 022”, sorry.; \
  19. exit 1; \
  20. fi
  21. cd ${.CURDIR}/${subdir} && TOPDIR=${.CURDIR} DEVELOPER=1 \
  22. gmake VERBOSE=1 ${.MFLAGS} ${_subdir}
  23. . include "${.CURDIR}/prereq.mk"
  24. . include "${.CURDIR}/mk/split-cfg.mk"
  25. .else
  26. . include "${.CURDIR}/prereq.mk"
  27. . include "${.CURDIR}/Makefile"
  28. .endif