You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.0KB

  1. # $FreeBSD$
  2. .if !target(__${_this}__)
  3. __${_this}__:
  4. _CURDIR ?= ${.CURDIR}
  5. _OBJDIR ?= ${.OBJDIR}
  6. .if ${RELDIR:Mtargets/*} != "" || ${RELDIR} == "."
  7. .if ${.MAKE.LEVEL} == 0 && ${RELDIR:Mtargets/*} != ""
  8. .if make(bootstrap*) || !exists(${_CURDIR}/${.MAKE.DEPENDFILE:T})
  9. _bootstrap_dirdeps = yes
  10. .else
  11. # BUILD_AT_LEVEL0=no tells dirdeps.mk to use a sub-make for .CURDIR
  12. # This is useful if we need to leverage DIRDEPS
  13. BUILD_AT_LEVEL0 = no
  14. # this renders the rest harmless
  15. PKG_METHOD = no
  16. .endif
  17. .endif
  18. # The makefile in subdirs should set this to something useful
  19. # the default should do nothing.
  20. PKG_METHOD ?= none
  21. .MAIN: all
  22. .if ${build-*:${M_L_TARGETS}} != ""
  23. # just build the bits, skip packaging
  24. all:
  25. SHIPDIR = no
  26. .if ${RELDIR} != "."
  27. PKG_METHOD = no
  28. .endif
  29. .endif
  30. .if ${PKG_METHOD:Mno*} != ""
  31. all: ${PKG_METHOD}
  32. # set this to "no" for manual control
  33. UPDATE_DEPENDFILE ?= yes
  34. .endif
  35. .if ${UPDATE_DEPENDFILE:Uno} == "yes"
  36. .include <meta.autodep.mk>
  37. .endif
  38. # all the clever packaging methods go here....
  39. .endif # level 0
  40. .endif # _this