autoconf.mk 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #############################################################
  2. #
  3. # autoconf
  4. #
  5. #############################################################
  6. AUTOCONF_SOURCE:=autoconf-2.57.tar.bz2
  7. AUTOCONF_SITE:=ftp://ftp.gnu.org/gnu/autoconf
  8. AUTOCONF_CAT:=bzcat
  9. AUTOCONF_DIR:=$(BUILD_DIR)/autoconf-2.57
  10. AUTOCONF_BINARY:=autoconf
  11. AUTOCONF_TARGET_BINARY:=usr/bin/autoconf
  12. $(DL_DIR)/$(AUTOCONF_SOURCE):
  13. $(WGET) -P $(DL_DIR) $(AUTOCONF_SITE)/$(AUTOCONF_SOURCE)
  14. autoconf-source: $(DL_DIR)/$(AUTOCONF_SOURCE)
  15. $(AUTOCONF_DIR)/.unpacked: $(DL_DIR)/$(AUTOCONF_SOURCE)
  16. $(AUTOCONF_CAT) $(DL_DIR)/$(AUTOCONF_SOURCE) | tar -C $(BUILD_DIR) -xvf -
  17. touch $(AUTOCONF_DIR)/.unpacked
  18. $(AUTOCONF_DIR)/.configured: $(AUTOCONF_DIR)/.unpacked
  19. (cd $(AUTOCONF_DIR); rm -rf config.cache; \
  20. $(TARGET_CONFIGURE_OPTS) EMACS="no" \
  21. ./configure \
  22. --target=$(GNU_TARGET_NAME) \
  23. --host=$(GNU_TARGET_NAME) \
  24. --build=$(GNU_HOST_NAME) \
  25. --prefix=/usr \
  26. --exec-prefix=/usr \
  27. --bindir=/usr/bin \
  28. --sbindir=/usr/sbin \
  29. --libexecdir=/usr/lib \
  30. --sysconfdir=/etc \
  31. --datadir=/usr/share \
  32. --localstatedir=/var \
  33. --mandir=/usr/man \
  34. --infodir=/usr/info \
  35. );
  36. touch $(AUTOCONF_DIR)/.configured
  37. $(AUTOCONF_DIR)/bin/$(AUTOCONF_BINARY): $(AUTOCONF_DIR)/.configured
  38. $(MAKE) CC=$(TARGET_CC) -C $(AUTOCONF_DIR)
  39. $(TARGET_DIR)/$(AUTOCONF_TARGET_BINARY): $(AUTOCONF_DIR)/bin/$(AUTOCONF_BINARY)
  40. $(MAKE) \
  41. prefix=$(TARGET_DIR)/usr \
  42. exec_prefix=$(TARGET_DIR)/usr \
  43. bindir=$(TARGET_DIR)/usr/bin \
  44. sbindir=$(TARGET_DIR)/usr/sbin \
  45. libexecdir=$(TARGET_DIR)/usr/lib \
  46. datadir=$(TARGET_DIR)/usr/share \
  47. sysconfdir=$(TARGET_DIR)/etc \
  48. localstatedir=$(TARGET_DIR)/var \
  49. libdir=$(TARGET_DIR)/usr/lib \
  50. infodir=$(TARGET_DIR)/usr/info \
  51. mandir=$(TARGET_DIR)/usr/man \
  52. includedir=$(TARGET_DIR)/usr/include \
  53. -C $(AUTOCONF_DIR) install;
  54. rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
  55. $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
  56. autoconf: uclibc $(TARGET_DIR)/$(AUTOCONF_TARGET_BINARY)
  57. autoconf-clean:
  58. $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(AUTOCONF_DIR) uninstall
  59. -$(MAKE) -C $(AUTOCONF_DIR) clean
  60. autoconf-dirclean:
  61. rm -rf $(AUTOCONF_DIR)