host-bottom.mk 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. host-extract: ${_HOST_PATCH_COOKIE}
  4. hostpre-configure:
  5. host-configure:
  6. ${_HOST_CONFIGURE_COOKIE}: ${_HOST_PATCH_COOKIE}
  7. @mkdir -p ${WRKBUILD}
  8. @$(CMD_TRACE) "host configuring... "
  9. ifneq (,$(filter autoreconf,${AUTOTOOL_STYLE}))
  10. cd ${WRKSRC}; env ${AUTOTOOL_ENV} autoreconf -if $(MAKE_TRACE)
  11. @rm -rf ${WRKSRC}/autom4te.cache
  12. @touch ${WRKDIR}/.autoreconf_done
  13. endif
  14. @cd ${WRKBUILD}; \
  15. for i in $$(find . -name config.sub);do \
  16. if [ -f $$i ]; then \
  17. ${CP} ${SCRIPT_DIR}/config.sub $$i; \
  18. fi; \
  19. done; \
  20. for i in $$(find . -name config.guess);do \
  21. if [ -f $$i ]; then \
  22. ${CP} ${SCRIPT_DIR}/config.guess $$i; \
  23. fi; \
  24. done;
  25. @${MAKE} hostpre-configure $(MAKE_TRACE)
  26. ifeq (${HOST_STYLE},)
  27. cd ${WRKBUILD}; \
  28. env ${HOST_CONFIGURE_ENV} \
  29. ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
  30. --program-prefix= \
  31. --program-suffix= \
  32. --prefix=${STAGING_HOST_DIR}/usr \
  33. --bindir=${STAGING_HOST_DIR}/usr/bin \
  34. --datadir=${STAGING_HOST_DIR}/usr/share \
  35. --mandir=${STAGING_HOST_DIR}/usr/share/man \
  36. --libexecdir=${STAGING_HOST_DIR}/usr/libexec \
  37. --sysconfdir=${STAGING_HOST_DIR}/etc \
  38. --disable-dependency-tracking \
  39. --disable-libtool-lock \
  40. --disable-nls \
  41. ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
  42. endif
  43. ifeq (${HOST_STYLE},auto)
  44. cd ${WRKBUILD}; \
  45. env ${HOST_CONFIGURE_ENV} \
  46. ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
  47. --program-prefix= \
  48. --program-suffix= \
  49. --prefix=/usr \
  50. --bindir=/usr/bin \
  51. --datadir=/usr/share \
  52. --mandir=/usr/share/man \
  53. --libexecdir=/usr/libexec \
  54. --localstatedir=/var \
  55. --sysconfdir=/etc \
  56. --disable-dependency-tracking \
  57. --disable-libtool-lock \
  58. --disable-nls \
  59. ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
  60. endif
  61. ifeq (${HOST_STYLE},manual)
  62. ${MAKE} host-configure $(MAKE_TRACE)
  63. endif
  64. touch $@
  65. host-build:
  66. ${_HOST_BUILD_COOKIE}: ${_HOST_CONFIGURE_COOKIE}
  67. ifneq (${HOST_STYLE},manual)
  68. @$(CMD_TRACE) "host compiling... "
  69. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  70. ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
  71. endif
  72. ${MAKE} host-build $(MAKE_TRACE)
  73. touch $@
  74. hostpost-install:
  75. host-install: ${ALL_HOSTINST}
  76. ${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
  77. @$(CMD_TRACE) "host installing... "
  78. @mkdir -p ${HOST_WRKINST}
  79. ifeq (${HOST_STYLE},)
  80. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  81. DESTDIR='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
  82. endif
  83. ifeq (${HOST_STYLE},auto)
  84. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  85. DESTDIR='${STAGING_HOST_DIR}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
  86. endif
  87. ifeq (${HOST_STYLE},manual)
  88. env ${HOST_MAKE_ENV} ${MAKE} host-install $(MAKE_TRACE)
  89. endif
  90. env ${HOST_MAKE_ENV} ${MAKE} hostpost-install $(MAKE_TRACE)
  91. @touch $@
  92. ${_HOST_COOKIE}:
  93. exec ${MAKE} hostpackage
  94. ifeq ($(HOST_LINUX_ONLY),)
  95. hostpackage: ${ALL_HOSTDIRS}
  96. @touch ${_HOST_COOKIE}
  97. endif
  98. hostclean:
  99. @$(CMD_TRACE) "cleaning... "
  100. rm -rf ${WRKDIR} ${STAGING_PKG_DIR}/stamps/${PKG_NAME}*-host