1
0

host-bottom.mk 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. --program-prefix= \
  24. --program-suffix= \
  25. --prefix=${STAGING_HOST_DIR}/usr \
  26. --bindir=${STAGING_HOST_DIR}/usr/bin \
  27. --datadir=${STAGING_HOST_DIR}/usr/share \
  28. --mandir=${STAGING_HOST_DIR}/usr/share/man \
  29. --libdir=${STAGING_HOST_DIR}/usr/lib \
  30. --libexecdir=${STAGING_HOST_DIR}/usr/libexec \
  31. --sysconfdir=${STAGING_HOST_DIR}/etc \
  32. --disable-dependency-tracking \
  33. --disable-libtool-lock \
  34. --disable-nls \
  35. ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
  36. endif
  37. ifeq (${HOST_STYLE},auto)
  38. cd ${WRKBUILD}; \
  39. env ${HOST_CONFIGURE_ENV} \
  40. ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
  41. --program-prefix= \
  42. --program-suffix= \
  43. --prefix=/usr \
  44. --bindir=/usr/bin \
  45. --datadir=/usr/share \
  46. --mandir=/usr/share/man \
  47. --libdir=/usr/lib \
  48. --libexecdir=/usr/libexec \
  49. --localstatedir=/var \
  50. --sysconfdir=/etc \
  51. --disable-dependency-tracking \
  52. --disable-libtool-lock \
  53. --disable-nls \
  54. ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
  55. endif
  56. ifeq (${HOST_STYLE},manual)
  57. ${MAKE} host-configure $(MAKE_TRACE)
  58. endif
  59. ifeq (${HOST_STYLE},perl)
  60. @$(CMD_TRACE) "configuring perl module.. "
  61. cd ${WRKBUILD}; \
  62. PATH='${HOST_PATH}' \
  63. PERL_MM_USE_DEFAULT=1 \
  64. PERL_AUTOINSTALL=--skipdeps \
  65. $(HOST_PERL_ENV) \
  66. perl-host Makefile.PL ${HOST_CONFIGURE_ARGS}
  67. endif
  68. touch $@
  69. host-build:
  70. ${_HOST_BUILD_COOKIE}: ${_HOST_CONFIGURE_COOKIE}
  71. ifneq (${HOST_STYLE},manual)
  72. @$(CMD_TRACE) "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) "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. @for a in $(STAGING_HOST_DIR)/usr/bin/*-config; do \
  97. [[ -e $$a ]] || continue; \
  98. $(SED) "s,^prefix=.*,prefix=$(STAGING_HOST_DIR)/usr," $$a; \
  99. chmod u+x $(STAGING_HOST_DIR)/usr/bin/$$(basename $$a); \
  100. done
  101. touch $@
  102. ${_HOST_COOKIE}:
  103. printf wbxdebug
  104. exec ${MAKE} hostpackage
  105. ifeq ($(HOST_LINUX_ONLY),)
  106. hostpackage: ${ALL_HOSTDIRS}
  107. touch ${_HOST_COOKIE}
  108. endif
  109. hostclean:
  110. @$(CMD_TRACE) "cleaning.. "
  111. rm -r ${STAGING_PKG_DIR}/stamps/${PKG_NAME}*-host
  112. rm -rf ${WRKDIR}