host-bottom.mk 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 ($(filter auto,${HOST_STYLE}),)
  22. cd ${WRKBUILD}; rm -f config.{cache,status}; \
  23. env ${HOST_CONFIGURE_ENV} \
  24. ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
  25. --program-prefix= \
  26. --program-suffix= \
  27. --prefix=${STAGING_HOST_DIR}/usr \
  28. --bindir=${STAGING_HOST_DIR}/usr/bin \
  29. --datadir=${STAGING_HOST_DIR}/usr/share \
  30. --mandir=${STAGING_HOST_DIR}/usr/share/man \
  31. --libexecdir=${STAGING_HOST_DIR}/usr/libexec \
  32. --sysconfdir=${STAGING_HOST_DIR}/etc \
  33. --disable-dependency-tracking \
  34. --disable-libtool-lock \
  35. --disable-nls \
  36. ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
  37. else
  38. cd ${WRKBUILD}; rm -f config.{cache,status}; \
  39. env ${HOST_CONFIGURE_ENV} \
  40. ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
  41. --program-prefix= \
  42. --program-suffix= \
  43. --prefix=/usr \
  44. --bindir=/usr/bin \
  45. --datadir=/usr/share \
  46. --mandir=/usr/share/man \
  47. --libexecdir=/usr/libexec \
  48. --localstatedir=/var \
  49. --sysconfdir=/etc \
  50. --disable-dependency-tracking \
  51. --disable-libtool-lock \
  52. --disable-nls \
  53. ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
  54. endif
  55. touch $@
  56. host-build:
  57. ${_HOST_BUILD_COOKIE}: ${_HOST_CONFIGURE_COOKIE}
  58. @$(CMD_TRACE) "host compiling... "
  59. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  60. ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
  61. touch $@
  62. hpkg-install: ${ALL_HOSTINST}
  63. host-install:
  64. ${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
  65. @$(CMD_TRACE) "host installing... "
  66. ifneq ($(filter auto,${HOST_STYLE}),)
  67. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  68. DESTDIR='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
  69. else
  70. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  71. DESTDIR='${HOST_WRKINST}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
  72. env ${HOST_MAKE_ENV} ${MAKE} hpkg-install $(MAKE_TRACE)
  73. endif
  74. rm -rf ${WRKBUILD} ${WRKDIST} ${WRKSRC}
  75. exec ${MAKE} host-extract $(MAKE_TRACE)
  76. mkdir -p ${HOST_WRKINST}
  77. touch $@
  78. # avoid rebuild
  79. touch ${_HOST_BUILD_COOKIE} ${_HOST_CONFIGURE_COOKIE}
  80. ${_HOST_COOKIE}:
  81. exec ${MAKE} hostpackage
  82. hostpackage: ${ALL_HOSTDIRS}
  83. touch ${_HOST_COOKIE}