1
0

host-bottom.mk 3.5 KB

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