host-bottom.mk 3.1 KB

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