1
0

host-bottom.mk 3.2 KB

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