automake: don't rely on STAGING_DIR_HOST

We're currently preparing a change in LEDE that will change the host
staging dirs in a way that might break the sed commands used by the
automake Makefile. Change the command in a way that doesn't depend on the
path of the staging dir.

While it would be nicer to modify the configure script to use the correct
path in the first place, this doesn't work for the perl path, as perl is
used in shebang lines and must thus be an absolute path. Some scripts are
used both during build and on the target system, so fixing up the scripts
in the install step seems like the best option.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
Matthias Schiffer 2016-10-03 14:52:59 +02:00
parent 9e170ba2c0
commit 06692e3c24
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
1 changed files with 4 additions and 4 deletions

View File

@ -34,6 +34,8 @@ define Package/automake/description
with the GNU Coding Standards.
endef
FIX_PATHS = $(SED) '1c \#!/usr/bin/perl' -e 's| /[^ ]*/bin/perl| /usr/bin/perl|g'
define Package/automake/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/automake-$(PKG_VERSION) \
@ -42,10 +44,8 @@ define Package/automake/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aclocal-$(PKG_VERSION) \
$(1)/usr/bin/aclocal-$(PKG_VERSION)
$(LN) aclocal-$(PKG_VERSION) $(1)/usr/bin/aclocal
$(SED) 's|$(STAGING_DIR_HOST)|/usr|g' \
$(1)/usr/bin/automake-$(PKG_VERSION)
$(SED) 's|$(STAGING_DIR_HOST)|/usr|g' \
$(1)/usr/bin/aclocal-$(PKG_VERSION)
$(FIX_PATHS) $(1)/usr/bin/automake-$(PKG_VERSION)
$(FIX_PATHS) $(1)/usr/bin/aclocal-$(PKG_VERSION)
$(INSTALL_DIR) $(1)/usr/share/automake-$(PKG_VERSION)
for dir in \