1
0

host-bottom.mk 3.3 KB

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