1
0

host-bottom.mk 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. @$(CMD_TRACE) "host compiling... "
  62. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  63. ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
  64. touch $@
  65. hostpost-install:
  66. hpkg-install: ${ALL_HOSTINST}
  67. host-install:
  68. ${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
  69. @$(CMD_TRACE) "host installing... "
  70. ifneq (${HOST_STYLE},manual)
  71. ifeq ($(strip ${HOST_STYLE}),)
  72. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  73. DESTDIR='${HOST_WRKINST}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
  74. env ${HOST_MAKE_ENV} ${MAKE} hpkg-install $(MAKE_TRACE)
  75. else
  76. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  77. DESTDIR='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
  78. endif
  79. else
  80. env ${HOST_MAKE_ENV} ${MAKE} hpkg-install $(MAKE_TRACE)
  81. endif
  82. env ${HOST_MAKE_ENV} ${MAKE} hostpost-install $(MAKE_TRACE)
  83. rm -rf ${WRKBUILD} ${WRKDIST} ${WRKSRC}
  84. exec ${MAKE} host-extract $(MAKE_TRACE)
  85. mkdir -p ${HOST_WRKINST}
  86. # avoid rebuild
  87. touch ${_HOST_CONFIGURE_COOKIE}
  88. touch ${_HOST_BUILD_COOKIE}
  89. touch $@
  90. ${_HOST_COOKIE}:
  91. exec ${MAKE} hostpackage
  92. hostpackage: ${ALL_HOSTDIRS}
  93. touch ${_HOST_COOKIE}