BSDmakefile 844 B

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