summaryrefslogtreecommitdiffstats
path: root/rules/e2fsprogs.make
diff options
context:
space:
mode:
Diffstat (limited to 'rules/e2fsprogs.make')
-rw-r--r--rules/e2fsprogs.make88
1 files changed, 53 insertions, 35 deletions
diff --git a/rules/e2fsprogs.make b/rules/e2fsprogs.make
index 23c221f81..e107b56ef 100644
--- a/rules/e2fsprogs.make
+++ b/rules/e2fsprogs.make
@@ -1,28 +1,31 @@
# -*-makefile-*-
# $id$
#
-# (C) 2002 by Pengutronix e.K., Hildesheim, Germany
+# Copyright (C) 2002, 2003 by Pengutronix e.K., Hildesheim, Germany
+#
# See CREDITS for details about who has contributed to this project.
#
-# For further information about the PTXDIST project and license conditions
+# For further information about the PTXdist project and license conditions
# see the README file.
#
#
# We provide this package
#
-ifeq (y, $(PTXCONF_E2FSPROGS))
+ifdef PTXCONF_E2FSPROGS
PACKAGES += e2fsprogs
endif
#
# Paths and names
#
-E2FSPROGS = e2fsprogs-1.29
-E2FSPROGS_URL = http://cesnet.dl.sourceforge.net/sourceforge/e2fsprogs/e2fsprogs-1.29.tar.gz
-E2FSPROGS_SOURCE = $(SRCDIR)/$(E2FSPROGS).tar.gz
+E2FSPROGS_VERSION = 1.34
+E2FSPROGS = e2fsprogs-$(E2FSPROGS_VERSION)
+E2FSPROGS_SUFFIX = tar.gz
+E2FSPROGS_URL = http://cesnet.dl.sourceforge.net/sourceforge/e2fsprogs/$(E2FSPROGS).$(E2FSPROGS_SUFFIX)
+E2FSPROGS_SOURCE = $(SRCDIR)/$(E2FSPROGS).$(E2FSPROGS_SUFFIX)
E2FSPROGS_DIR = $(BUILDDIR)/$(E2FSPROGS)
-E2FSPROGS_EXTRACT = gzip -dc
+E2FSPROGS_BUILD_DIR = $(BUILDDIR)/$(E2FSPROGS)-build
# ----------------------------------------------------------------------------
# Get
@@ -31,12 +34,12 @@ E2FSPROGS_EXTRACT = gzip -dc
e2fsprogs_get: $(STATEDIR)/e2fsprogs.get
$(STATEDIR)/e2fsprogs.get: $(E2FSPROGS_SOURCE)
- @$(call targetinfo, e2fsprogs.get)
+ @$(call targetinfo, $@)
touch $@
$(E2FSPROGS_SOURCE):
- @$(call targetinfo, $(E2FSPROGS_SOURCE))
- wget -P $(SRCDIR) $(PASSIVEFTP) $(E2FSPROGS_URL)
+ @$(call targetinfo, $@)
+ @$(call get, $(E2FSPROGS_URL))
# ----------------------------------------------------------------------------
# Extract
@@ -45,8 +48,10 @@ $(E2FSPROGS_SOURCE):
e2fsprogs_extract: $(STATEDIR)/e2fsprogs.extract
$(STATEDIR)/e2fsprogs.extract: $(STATEDIR)/e2fsprogs.get
- @$(call targetinfo, e2fsprogs.extract)
- $(E2FSPROGS_EXTRACT) $(E2FSPROGS_SOURCE) | $(TAR) -C $(BUILDDIR) -xf -
+ @$(call targetinfo, $@)
+ @$(call clean, $(E2FSPROGS_DIR))
+ @$(call extract, $(E2FSPROGS_SOURCE))
+ chmod +w $(E2FSPROGS_DIR)/po/*.po
touch $@
# ----------------------------------------------------------------------------
@@ -55,18 +60,24 @@ $(STATEDIR)/e2fsprogs.extract: $(STATEDIR)/e2fsprogs.get
e2fsprogs_prepare: $(STATEDIR)/e2fsprogs.prepare
-E2FSPROGS_AUTOCONF = --prefix=$(PTXCONF_PREFIX)
+E2FSPROGS_AUTOCONF = --prefix=/usr
E2FSPROGS_AUTOCONF += --enable-fsck
E2FSPROGS_AUTOCONF += --build=$(GNU_HOST)
E2FSPROGS_AUTOCONF += --host=$(PTXCONF_GNU_TARGET)
-E2FSPROGS_PATH = PATH=$(PTXCONF_PREFIX)/$(AUTOCONF213)/bin:$(CROSS_PATH)
-E2FSPROGS_ENV = $(CROSS_ENV)
-
-$(STATEDIR)/e2fsprogs.prepare: $(STATEDIR)/virtual-xchain.install $(STATEDIR)/e2fsprogs.extract
- @$(call targetinfo, e2fsprogs.prepare)
- cd $(E2FSPROGS_DIR) \
- $(E2FSPROGS_PATH) $(E2FSPROGS_ENV) && \
- ./configure $(E2FSPROGS_AUTOCONF)
+E2FSPROGS_PATH = PATH=$(CROSS_PATH)
+E2FSPROGS_ENV = $(CROSS_ENV)
+E2FSPROGS_ENV += BUILD_CC=$(HOSTCC)
+
+e2fsprogs_prepare_deps = \
+ $(STATEDIR)/virtual-xchain.install \
+ $(STATEDIR)/e2fsprogs.extract
+
+$(STATEDIR)/e2fsprogs.prepare: $(e2fsprogs_prepare_deps)
+ @$(call targetinfo, $@)
+ mkdir -p $(E2FSPROGS_BUILD_DIR) && \
+ cd $(E2FSPROGS_BUILD_DIR) && \
+ $(E2FSPROGS_PATH) $(E2FSPROGS_ENV) \
+ $(E2FSPROGS_DIR)/configure $(E2FSPROGS_AUTOCONF)
touch $@
# ----------------------------------------------------------------------------
@@ -76,12 +87,18 @@ $(STATEDIR)/e2fsprogs.prepare: $(STATEDIR)/virtual-xchain.install $(STATEDIR)/e2
e2fsprogs_compile: $(STATEDIR)/e2fsprogs.compile
e2fsprogs_compile_deps = $(STATEDIR)/e2fsprogs.prepare
-e2fsprogs_compile_deps += $(STATEDIR)/glibc.install
$(STATEDIR)/e2fsprogs.compile: $(e2fsprogs_compile_deps)
- @$(call targetinfo, e2fsprogs.compile)
- # FIXME: not tested on non-x86
- $(E2FSPROGS_PATH) make -C $(E2FSPROGS_DIR)
+ @$(call targetinfo, $@)
+#
+# in the util dir are tools that are compiled for the host system
+# these tools are needed later in the compile progress
+#
+# it's not good to pass target CFLAGS to the host compiler :)
+# so override these
+#
+ $(E2FSPROGS_PATH) make -C $(E2FSPROGS_BUILD_DIR)/util CFLAGS='' CXXFLAGS=''
+ $(E2FSPROGS_PATH) make -C $(E2FSPROGS_BUILD_DIR)
touch $@
# ----------------------------------------------------------------------------
@@ -90,8 +107,8 @@ $(STATEDIR)/e2fsprogs.compile: $(e2fsprogs_compile_deps)
e2fsprogs_install: $(STATEDIR)/e2fsprogs.install
-$(STATEDIR)/e2fsprogs.install: $(STATEDIR)/e2fsprogs.compile
- @$(call targetinfo, e2fsprogs.install)
+$(STATEDIR)/e2fsprogs.install:
+ @$(call targetinfo, $@)
touch $@
# ----------------------------------------------------------------------------
@@ -100,16 +117,17 @@ $(STATEDIR)/e2fsprogs.install: $(STATEDIR)/e2fsprogs.compile
e2fsprogs_targetinstall: $(STATEDIR)/e2fsprogs.targetinstall
-$(STATEDIR)/e2fsprogs.targetinstall: $(STATEDIR)/e2fsprogs.install
- @$(call targetinfo, e2fsprogs.targetinstall)
- ifeq (y, $(PTXCONF_E2FSPROGS_MKFS))
- install $(E2FSPROGS_DIR)/misc/mke2fs $(ROOTDIR)/sbin/
+$(STATEDIR)/e2fsprogs.targetinstall: $(STATEDIR)/e2fsprogs.compile
+ @$(call targetinfo, $@)
+ mkdir -p $(ROOTDIR)/sbin
+ifdef PTXCONF_E2FSPROGS_MKFS
+ install $(E2FSPROGS_BUILD_DIR)/misc/mke2fs $(ROOTDIR)/sbin/mke2fs
$(CROSSSTRIP) -R .note -R .comment $(ROOTDIR)/sbin/mke2fs
- endif
- ifeq (y, $(PTXCONF_E2FSPROGS_E2FSCK))
- install $(E2FSPROGS_DIR)/e2fsck/e2fsck.shared $(ROOTDIR)/sbin/e2fsck
+endif
+ifdef PTXCONF_E2FSPROGS_E2FSCK
+ install $(E2FSPROGS_BUILD_DIR)/e2fsck/e2fsck.shared $(ROOTDIR)/sbin/e2fsck
$(CROSSSTRIP) -R .note -R .comment $(ROOTDIR)/sbin/e2fsck
- endif
+endif
touch $@
# ----------------------------------------------------------------------------