summaryrefslogtreecommitdiffstats
path: root/package/automake/automake.mk
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-06-28 13:51:07 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-06-28 13:51:07 +0000
commit649e4fd808348324f43bcefd96e76664023bccfd (patch)
tree9b799eb577b5c8f4305180ec730e31c9fd3d173f /package/automake/automake.mk
parentefd4bd9a6e71e998825c33bc0d58011301bfa943 (diff)
downloadbuildroot-novena-649e4fd808348324f43bcefd96e76664023bccfd.tar.gz
buildroot-novena-649e4fd808348324f43bcefd96e76664023bccfd.zip
- provide autotools for the host (Julien Letessier)
Diffstat (limited to 'package/automake/automake.mk')
-rw-r--r--package/automake/automake.mk64
1 files changed, 56 insertions, 8 deletions
diff --git a/package/automake/automake.mk b/package/automake/automake.mk
index 1e1c89816..4cd85896a 100644
--- a/package/automake/automake.mk
+++ b/package/automake/automake.mk
@@ -7,26 +7,40 @@ AUTOMAKE_VER:=1.10
AUTOMAKE_SOURCE:=automake-$(AUTOMAKE_VER).tar.bz2
AUTOMAKE_SITE:=http://ftp.gnu.org/pub/gnu/automake
AUTOMAKE_CAT:=$(BZCAT)
+AUTOMAKE_SRC_DIR:=$(TOOL_BUILD_DIR)/automake-$(AUTOMAKE_VER)
AUTOMAKE_DIR:=$(BUILD_DIR)/automake-$(AUTOMAKE_VER)
+AUTOMAKE_HOST_DIR:=$(TOOL_BUILD_DIR)/automake-$(AUTOMAKE_VER)-host
AUTOMAKE_BINARY:=automake
AUTOMAKE_TARGET_BINARY:=usr/bin/automake
+AUTOMAKE:=$(STAGING_DIR)/usr/bin/automake
+
+# variables used by other packages
+ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
+ACLOCAL = aclocal -I $(ACLOCAL_DIR)
$(DL_DIR)/$(AUTOMAKE_SOURCE):
$(WGET) -P $(DL_DIR) $(AUTOMAKE_SITE)/$(AUTOMAKE_SOURCE)
automake-source: $(DL_DIR)/$(AUTOMAKE_SOURCE)
-$(AUTOMAKE_DIR)/.unpacked: $(DL_DIR)/$(AUTOMAKE_SOURCE)
- $(AUTOMAKE_CAT) $(DL_DIR)/$(AUTOMAKE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- $(CONFIG_UPDATE) $(AUTOMAKE_DIR)
+$(AUTOMAKE_SRC_DIR)/.unpacked: $(DL_DIR)/$(AUTOMAKE_SOURCE)
+ $(AUTOMAKE_CAT) $(DL_DIR)/$(AUTOMAKE_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
+ $(CONFIG_UPDATE) $(AUTOMAKE_SRC_DIR)
touch $@
-$(AUTOMAKE_DIR)/.configured: $(AUTOMAKE_DIR)/.unpacked
+#############################################################
+#
+# automake for the target
+#
+#############################################################
+
+$(AUTOMAKE_DIR)/.configured: $(AUTOMAKE_SRC_DIR)/.unpacked
+ mkdir -p $(AUTOMAKE_DIR)
(cd $(AUTOMAKE_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
WANT_AUTOCONF=2.5 \
- ./configure \
+ $(AUTOMAKE_SRC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
@@ -46,7 +60,7 @@ $(AUTOMAKE_DIR)/.configured: $(AUTOMAKE_DIR)/.unpacked
$(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY): $(AUTOMAKE_DIR)/.configured
$(MAKE) -C $(AUTOMAKE_DIR)
- touch -c $(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY)
+ touch -c $@
$(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY): $(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY)
$(MAKE) \
@@ -65,9 +79,9 @@ $(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY): $(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY)
-C $(AUTOMAKE_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
- touch -c $(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY)
+ touch -c $@
-automake: uclibc $(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY)
+automake: uclibc autoconf $(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY)
automake-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(AUTOMAKE_DIR) uninstall
@@ -78,6 +92,40 @@ automake-dirclean:
#############################################################
#
+# automake for the host
+#
+#############################################################
+
+$(AUTOMAKE_HOST_DIR)/.configured: $(AUTOMAKE_SRC_DIR)/.unpacked
+ mkdir -p $(AUTOMAKE_HOST_DIR)
+ (cd $(AUTOMAKE_HOST_DIR); rm -rf config.cache; \
+ $(HOST_CONFIGURE_OPTS) \
+ CFLAGS="$(HOST_CFLAGS)" \
+ LDFLAGS="$(HOST_LDFLAGS)" \
+ WANT_AUTOCONF=2.5 \
+ $(AUTOMAKE_SRC_DIR)/configure \
+ --prefix=$(STAGING_DIR)/usr \
+ );
+ touch $@
+
+$(AUTOMAKE_HOST_DIR)/$(AUTOMAKE_BINARY): $(AUTOMAKE_HOST_DIR)/.configured
+ $(MAKE) -C $(AUTOMAKE_HOST_DIR)
+ touch -c $@
+
+$(AUTOMAKE): $(AUTOMAKE_HOST_DIR)/$(AUTOMAKE_BINARY)
+ $(MAKE) -C $(AUTOMAKE_HOST_DIR) install
+
+host-automake: host-autoconf host-libtool $(AUTOMAKE)
+
+host-automake-clean:
+ $(MAKE) -C $(AUTOMAKE_HOST_DIR) uninstall
+ -$(MAKE) -C $(AUTOMAKE_HOST_DIR) clean
+
+host-automake-dirclean:
+ rm -rf $(AUTOMAKE_HOST_DIR)
+
+#############################################################
+#
# Toplevel Makefile options
#
#############################################################