- provide means to install readline into the target. Closes #968

This commit is contained in:
Bernhard Reutner-Fischer 2007-03-20 17:50:23 +00:00
parent 300b8b7f93
commit 526b00455b
2 changed files with 16 additions and 5 deletions

View File

@ -5,3 +5,9 @@ config BR2_READLINE
help
Enable GNU readline support?
config BR2_PACKAGE_READLINE_TARGET
bool "readline for the target"
depends on BR2_READLINE
help
Say yes here to install the readline libraries and headers
on the target.

View File

@ -14,6 +14,8 @@ READLINE_TARGET_BINARY:=lib/$(READLINE_BINARY)
$(DL_DIR)/$(READLINE_SOURCE):
$(WGET) -P $(DL_DIR) $(READLINE_SITE)/$(READLINE_SOURCE)
readline-source: $(DL_DIR)/$(READLINE_SOURCE)
$(READLINE_DIR)/.unpacked: $(DL_DIR)/$(READLINE_SOURCE)
mkdir -p $(READLINE_DIR)
tar -C $(BUILD_DIR) -zxf $(DL_DIR)/$(READLINE_SOURCE)
@ -22,6 +24,7 @@ $(READLINE_DIR)/.unpacked: $(DL_DIR)/$(READLINE_SOURCE)
$(READLINE_DIR)/.configured: $(READLINE_DIR)/.unpacked
(cd $(READLINE_DIR); rm -rf config.cache; \
bash_cv_func_sigsetjmp=yes \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
@ -59,16 +62,15 @@ $(STAGING_DIR)/include/readline/readline.h: $(READLINE_DIR)/$(READLINE_BINARY)
touch -c $(STAGING_DIR)/include/readline/readline.h
# Install only run-time to Target directory
# Install to Target directory
$(TARGET_DIR)/include/readline/readline.h: $(READLINE_DIR)/$(READLINE_BINARY)
BUILD_CC=$(TARGET_CC) HOSTCC="$(HOSTCC)" CC=$(TARGET_CC) \
$(MAKE1) DESTDIR=$(TARGET_DIR) -C $(READLINE_DIR) install-shared
$(MAKE1) DESTDIR=$(TARGET_DIR) -C $(READLINE_DIR) install-shared \
uninstall-doc
touch -c $(TARGET_DIR)/include/readline/readline.h
readline: $(STAGING_DIR)/include/readline/readline.h
readline-target: $(TARGET_DIR)/include/readline/readline.h
readline-clean:
$(MAKE) -C $(READLINE_DIR) uninstall
-$(MAKE) -C $(READLINE_DIR) clean
@ -76,7 +78,10 @@ readline-clean:
readline-dirclean:
rm -rf $(READLINE_DIR)
readline-source: $(DL_DIR)/$(READLINE_SOURCE)
readline-target: $(TARGET_DIR)/include/readline/readline.h
readline-target-clean:
$(MAKE1) DESTDIR=$(TARGET_DIR) -C $(READLINE_DIR) uninstall
ifeq ($(strip $(BR2_READLINE)),y)
TARGETS+=readline