summaryrefslogtreecommitdiff
path: root/package/libsysfs
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-04-10 19:03:27 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-04-13 16:55:26 +0200
commit41d7e35fcf8aea3cd651467f451e618e835b839c (patch)
tree506e2c5104c3052fbb85fc008e25da5d2f16d685 /package/libsysfs
parent503062a3556c2d2f0d73d524fc0b4ec08be5f8fb (diff)
libsysfs: convert to the autotools infrastructure
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/libsysfs')
-rw-r--r--package/libsysfs/libsysfs.mk59
1 files changed, 2 insertions, 57 deletions
diff --git a/package/libsysfs/libsysfs.mk b/package/libsysfs/libsysfs.mk
index a5901516d..f8233fe31 100644
--- a/package/libsysfs/libsysfs.mk
+++ b/package/libsysfs/libsysfs.mk
@@ -22,63 +22,8 @@
# USA
LIBSYSFS_VERSION:=2.1.0
-LIBSYSFS_DIR:=$(BUILD_DIR)/sysfsutils-$(LIBSYSFS_VERSION)
LIBSYSFS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/linux-diag
LIBSYSFS_SOURCE:=sysfsutils-$(LIBSYSFS_VERSION).tar.gz
-LIBSYSFS_CAT:=$(ZCAT)
+LIBSYSFS_INSTALL_STAGING=YES
-$(DL_DIR)/$(LIBSYSFS_SOURCE):
- $(call DOWNLOAD,$(LIBSYSFS_SITE),$(LIBSYSFS_SOURCE))
-
-libsysfs-source: $(DL_DIR)/$(LIBSYSFS_SOURCE)
-
-$(LIBSYSFS_DIR)/.unpacked: $(DL_DIR)/$(LIBSYSFS_SOURCE)
- $(LIBSYSFS_CAT) $(DL_DIR)/$(LIBSYSFS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- $(CONFIG_UPDATE) $(@D)
- touch $@
-
-$(LIBSYSFS_DIR)/.configured: $(LIBSYSFS_DIR)/.unpacked
- (cd $(LIBSYSFS_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ./configure $(QUIET) \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- --sysconfdir=/etc \
- )
- touch $@
-
-$(LIBSYSFS_DIR)/.compiled: $(LIBSYSFS_DIR)/.configured
- $(MAKE) -C $(LIBSYSFS_DIR)
- touch $@
-
-$(STAGING_DIR)/usr/lib/libsysfs.so: $(LIBSYSFS_DIR)/.compiled
- $(MAKE) -C $(LIBSYSFS_DIR) DESTDIR=$(STAGING_DIR) install
- $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
- $(STAGING_DIR)/usr/lib/libsysfs.la
- touch -c $@
-
-$(TARGET_DIR)/usr/lib/libsysfs.so: $(STAGING_DIR)/usr/lib/libsysfs.so
- cp -dpf $(STAGING_DIR)/usr/lib/libsysfs.so* $(TARGET_DIR)/usr/lib/
- -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libsysfs.so
-
-libsysfs: $(TARGET_DIR)/usr/lib/libsysfs.so
-
-libsysfs-clean:
- -$(MAKE) -C $(LIBSYSFS_DIR) clean
- -$(MAKE) -C $(LIBSYSFS_DIR) DESTDIR=$(STAGING_DIR) uninstall
- rm -f $(TARGET_DIR)/usr/lib/libsysfs.so*
-
-libsysfs-dirclean:
- rm -rf $(LIBSYSFS_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_LIBSYSFS),y)
-TARGETS+=libsysfs
-endif
+$(eval $(call AUTOTARGETS,package,libsysfs))