BSDmakefile 838 B

12345678910111213141516171819202122232425262728293031323334
  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. ADKVERSION= 0.1.0
  4. TOPDIR= ${.CURDIR}
  5. PWD= ${.CURDIR}
  6. .include "${.CURDIR}/Makefile.inc"
  7. GMAKE_ENV+= ADKVERSION=${ADKVERSION:Q}
  8. .if defined(package) && !empty(package)
  9. subdir:= package/${package}
  10. . if !make(clean)
  11. _subdir_dep:= ${TOPDIR}/.config
  12. . endif
  13. .endif
  14. .if defined(subdir) && !empty(subdir)
  15. _subdir:= ${.TARGETS}
  16. ${.TARGETS}: _subdir
  17. _subdir: ${_subdir_dep}
  18. @if test x"$$(umask 2>/dev/null | sed 's/00*22/OK/')" != x"OK"; then \
  19. echo >&2 Error: you must build with “umask 022”, sorry.; \
  20. exit 1; \
  21. fi
  22. cd ${.CURDIR}/${subdir} && TOPDIR=${.CURDIR} \
  23. ${GMAKE} VERBOSE=1 ${.MFLAGS} ${_subdir}
  24. . include "${.CURDIR}/prereq.mk"
  25. .else
  26. . include "${.CURDIR}/Makefile"
  27. .endif