1
0

host-bottom.mk 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. ifneq (,$(filter autogen,${AUTOTOOL_STYLE}))
  9. @$(CMD_TRACE) "autotooling.. "
  10. @cd ${WRKSRC}; env ${AUTOTOOL_ENV} $(BASH) autogen.sh $(MAKE_TRACE)
  11. endif
  12. ifneq (,$(filter autoreconf,${AUTOTOOL_STYLE}))
  13. cd ${WRKSRC}; env ${AUTOTOOL_ENV} autoreconf -if $(MAKE_TRACE)
  14. @rm -rf ${WRKSRC}/autom4te.cache
  15. @touch ${WRKDIR}/.autoreconf_done
  16. endif
  17. @${MAKE} hostpre-configure $(MAKE_TRACE)
  18. ifeq (${HOST_STYLE},)
  19. @$(CMD_TRACE) "configuring.. "
  20. cd ${WRKBUILD}; \
  21. env ${HOST_CONFIGURE_ENV} \
  22. ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
  23. --prefix=${STAGING_HOST_DIR}/usr \
  24. --bindir=${STAGING_HOST_DIR}/usr/bin \
  25. --datadir=${STAGING_HOST_DIR}/usr/share \
  26. --mandir=${STAGING_HOST_DIR}/usr/share/man \
  27. --libdir=${STAGING_HOST_DIR}/usr/lib \
  28. --libexecdir=${STAGING_HOST_DIR}/usr/libexec \
  29. --sysconfdir=${STAGING_HOST_DIR}/etc \
  30. ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
  31. endif
  32. ifeq (${HOST_STYLE},auto)
  33. @$(CMD_TRACE) "configuring.. "
  34. cd ${WRKBUILD}; \
  35. env ${HOST_CONFIGURE_ENV} \
  36. ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
  37. --program-prefix= \
  38. --program-suffix= \
  39. --prefix=/usr \
  40. --bindir=/usr/bin \
  41. --datadir=/usr/share \
  42. --mandir=/usr/share/man \
  43. --libdir=/usr/lib \
  44. --libexecdir=/usr/libexec \
  45. --localstatedir=/var \
  46. --sysconfdir=/etc \
  47. --disable-dependency-tracking \
  48. --disable-libtool-lock \
  49. --disable-nls \
  50. ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
  51. endif
  52. ifeq (${HOST_STYLE},manual)
  53. @$(CMD_TRACE) "configuring.. "
  54. ${MAKE} host-configure $(MAKE_TRACE)
  55. endif
  56. ifeq (${HOST_STYLE},perl)
  57. @$(CMD_TRACE) "configuring perl module.. "
  58. cd ${WRKBUILD}; \
  59. PATH='${HOST_PATH}' \
  60. PERL_MM_USE_DEFAULT=1 \
  61. PERL_AUTOINSTALL=--skipdeps \
  62. $(HOST_PERL_ENV) \
  63. perl-host Makefile.PL ${HOST_CONFIGURE_ARGS}
  64. endif
  65. touch $@
  66. host-build:
  67. ${_HOST_BUILD_COOKIE}: ${_HOST_CONFIGURE_COOKIE}
  68. @$(CMD_TRACE) "compiling.. "
  69. ifneq (${HOST_STYLE},manual)
  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) "installing.. "
  79. @mkdir -p ${HOST_WRKINST}
  80. ifeq (${HOST_STYLE},)
  81. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  82. DESTDIR='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
  83. endif
  84. ifeq (${HOST_STYLE},auto)
  85. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  86. DESTDIR='${STAGING_HOST_DIR}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
  87. endif
  88. ifeq (${HOST_STYLE},manual)
  89. env ${HOST_MAKE_ENV} ${MAKE} host-install $(MAKE_TRACE)
  90. endif
  91. env ${HOST_MAKE_ENV} ${MAKE} hostpost-install $(MAKE_TRACE)
  92. @find $(STAGING_HOST_DIR) -name \*.la -exec rm {} \;
  93. @for a in $(STAGING_HOST_DIR)/usr/bin/*-config; do \
  94. [[ -e $$a ]] || continue; \
  95. $(SED) "s,^prefix=.*,prefix=$(STAGING_HOST_DIR)/usr," $$a; \
  96. chmod u+x $(STAGING_HOST_DIR)/usr/bin/$$(basename $$a); \
  97. done
  98. touch $@
  99. ${_HOST_COOKIE}:
  100. exec ${MAKE} hostpackage
  101. ifeq ($(HOST_LINUX_ONLY),)
  102. hostpackage: ${ALL_HOSTDIRS}
  103. @touch ${_HOST_COOKIE}
  104. endif
  105. hostclean:
  106. @printf " ---> cleaning host package build directories and files.. "
  107. -rm -rf ${STAGING_PKG_DIR}/stamps/${PKG_NAME}*-host ${WRKDIR}
  108. @printf " done\n"