summaryrefslogtreecommitdiff
path: root/package/findutils
diff options
context:
space:
mode:
Diffstat (limited to 'package/findutils')
-rw-r--r--package/findutils/findutils.mk33
1 files changed, 21 insertions, 12 deletions
diff --git a/package/findutils/findutils.mk b/package/findutils/findutils.mk
index 1c664d52c..9b1b173a9 100644
--- a/package/findutils/findutils.mk
+++ b/package/findutils/findutils.mk
@@ -20,7 +20,7 @@ findutils-source: $(DL_DIR)/$(FINDUTILS_SOURCE)
$(FINDUTILS_DIR)/.unpacked: $(DL_DIR)/$(FINDUTILS_SOURCE)
$(FINDUTILS_CAT) $(DL_DIR)/$(FINDUTILS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
$(CONFIG_UPDATE) $(FINDUTILS_DIR)
- touch $(FINDUTILS_DIR)/.unpacked
+ touch $@
$(FINDUTILS_DIR)/.configured: $(FINDUTILS_DIR)/.unpacked
(cd $(FINDUTILS_DIR); rm -rf config.cache; \
@@ -40,12 +40,12 @@ $(FINDUTILS_DIR)/.configured: $(FINDUTILS_DIR)/.unpacked
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var/lib \
- --mandir=/usr/man \
- --infodir=/usr/info \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
)
- touch $(FINDUTILS_DIR)/.configured
+ touch $@
$(FINDUTILS_DIR)/$(FINDUTILS_BINARY): $(FINDUTILS_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(FINDUTILS_DIR)
@@ -53,14 +53,23 @@ $(FINDUTILS_DIR)/$(FINDUTILS_BINARY): $(FINDUTILS_DIR)/.configured
# This stuff is needed to work around GNU make deficiencies
findutils-target_binary: $(FINDUTILS_DIR)/$(FINDUTILS_BINARY)
@if [ -L $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY) ]; then \
- rm -f $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY); fi
- @if [ ! -f $(FINDUTILS_DIR)/$(FINDUTILS_BINARY) -o $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY) \
- -ot $(FINDUTILS_DIR)/$(FINDUTILS_BINARY) ]; then \
- set -x; \
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FINDUTILS_DIR) install; \
- $(STRIP) $(TARGET_DIR)/usr/lib/locate/* > /dev/null 2>&1; \
- rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
- $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc; fi
+ rm -f $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY); \
+ fi
+ @if [ ! -f $(FINDUTILS_DIR)/$(FINDUTILS_BINARY) \
+ -o $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY) \
+ -ot $(FINDUTILS_DIR)/$(FINDUTILS_BINARY) ]; then \
+ set -x; \
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FINDUTILS_DIR) install; \
+ $(STRIP) $(TARGET_DIR)/usr/lib/locate/* > /dev/null 2>&1; \
+ fi
+ifneq ($(BR2_HAVE_INFOPAGES),y)
+ rm -rf $(TARGET_DIR)/usr/share/info
+endif
+ifneq ($(BR2_HAVE_MANPAGES),y)
+ rm -rf $(TARGET_DIR)/usr/share/man
+endif
+ rm -rf $(TARGET_DIR)/share/locale
+ rm -rf $(TARGET_DIR)/usr/share/doc
findutils: uclibc findutils-target_binary