1
0

host-bottom.mk 3.3 KB

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