b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2006-2015 OpenWrt.org |
| 3 | # |
| 4 | # This is free software, licensed under the GNU General Public License v2. |
| 5 | # See /LICENSE for more information. |
| 6 | # |
| 7 | include $(TOPDIR)/rules.mk |
| 8 | |
| 9 | PKG_NAME:=automake |
| 10 | PKG_CPE_ID:=cpe:/a:gnu:automake |
| 11 | PKG_VERSION:=1.16.5 |
| 12 | PKG_API_VERSION:=$(word 2,$(subst ., ,$(PKG_VERSION))) |
| 13 | |
| 14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 15 | PKG_SOURCE_URL:=@GNU/automake |
| 16 | PKG_HASH:=07bd24ad08a64bc17250ce09ec56e921d6343903943e99ccf63bbf0705e34605 |
| 17 | |
| 18 | include $(INCLUDE_DIR)/host-build.mk |
| 19 | |
| 20 | HOST_CONFIGURE_ARGS += \ |
| 21 | --disable-silent-rules |
| 22 | |
| 23 | HOST_CONFIGURE_VARS += \ |
| 24 | PERL="/usr/bin/env perl" \ |
| 25 | am_cv_prog_PERL_ithreads=no |
| 26 | |
| 27 | define Host/Configure |
| 28 | (cd $(HOST_BUILD_DIR); $(AM_TOOL_PATHS) STAGING_DIR_HOST="" ./bootstrap) |
| 29 | $(call Host/Configure/Default) |
| 30 | endef |
| 31 | |
| 32 | define Host/Install |
| 33 | # remove old automake resources to avoid version conflicts |
| 34 | $(call Host/Uninstall) |
| 35 | $(call Host/Compile/Default,install) |
| 36 | mv $(STAGING_DIR_HOST)/bin/aclocal $(STAGING_DIR_HOST)/bin/aclocal.real |
| 37 | $(INSTALL_BIN) ./files/aclocal $(STAGING_DIR_HOST)/bin |
| 38 | ( \ |
| 39 | api=$(PKG_API_VERSION); \ |
| 40 | while [ "$$$$api" -ge 11 ]; do \ |
| 41 | ln -sf aclocal "$(STAGING_DIR_HOST)/bin/aclocal-1.$$$$api"; \ |
| 42 | api=$$$$(($$$$api - 1)); \ |
| 43 | done; \ |
| 44 | ) |
| 45 | endef |
| 46 | |
| 47 | define Host/Uninstall |
| 48 | -$(call Host/Compile/Default,uninstall) |
| 49 | rm -rf $(STAGING_DIR_HOST)/share/aclocal-[0-9]* |
| 50 | rm -rf $(STAGING_DIR_HOST)/share/automake-[0-9]* |
| 51 | endef |
| 52 | |
| 53 | $(eval $(call HostBuild)) |