changeset 2971:7145a94e4f4e

build autoconf, automake, libtool, and cmake instead of expecting them to exist
author John W. Eaton <jwe@octave.org>
date Tue, 05 Feb 2013 15:41:22 -0500
parents e111bf60ebc5
children 169114e27438
files Makefile index.html src/build-autoconf.mk src/build-automake.mk src/build-cmake.mk src/build-libtool.mk
diffstat 6 files changed, 124 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Jan 24 22:00:38 2013 -0500
+++ b/Makefile	Tue Feb 05 15:41:22 2013 -0500
@@ -29,19 +29,21 @@
 SHELL      := bash
 
 INSTALL    := $(shell ginstall --help >/dev/null 2>&1 && echo g)install
-LIBTOOL    := $(shell glibtool --help >/dev/null 2>&1 && echo g)libtool
-LIBTOOLIZE := $(shell glibtoolize --help >/dev/null 2>&1 && echo g)libtoolize
 PATCH      := $(shell gpatch --help >/dev/null 2>&1 && echo g)patch
 SED        := $(shell gsed --help >/dev/null 2>&1 && echo g)sed
 WGET       := wget --no-check-certificate \
                    --user-agent=$(shell wget --version | \
                    $(SED) -n 's,GNU \(Wget\) \([0-9.]*\).*,\1/\2,p')
 
-REQUIREMENTS := autoconf automake bash bison bzip2 cmake flex \
-                gcc intltoolize $(LIBTOOL) $(LIBTOOLIZE) \
+REQUIREMENTS :=  bash bison bzip2 flex \
+                gcc intltoolize \
                 $(MAKE) openssl $(PATCH) $(PERL) pkg-config \
                 scons $(SED) unzip wget xz yasm
 
+LIBTOOL     := libtool
+LIBTOOLIZE  := libtoolize
+BUILD_TOOLS := build-autoconf build-automake build-cmake build-libtool
+
 PREFIX     := $(PWD)/usr
 LOG_DIR    := $(PWD)/log
 TIMESTAMP  := $(shell date +%Y%m%d_%H%M%S)
@@ -49,7 +51,7 @@
 TMP_DIR     = $(PWD)/tmp-$(1)
 MAKEFILE   := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
 TOP_DIR    := $(patsubst %/,%,$(dir $(MAKEFILE)))
-PKGS       := $(shell $(SED) -n 's/^.* id="\([^"]*\)-package">.*$$/\1/p' '$(TOP_DIR)/index.html')
+PKGS       := $(filter-out $(BUILD_TOOLS), $(shell $(SED) -n 's/^.* id="\([^"]*\)-package">.*$$/\1/p' '$(TOP_DIR)/index.html'))
 PATH       := $(PREFIX)/bin:$(PATH)
 
 MSYS_BASE_URL := http://sourceforge.net/projects/mingw/files/MSYS/Base
@@ -123,6 +125,8 @@
 .PHONY: all
 all: $(PKGS)
 
+$(PKGS): $(BUILD_TOOLS)
+
 .PHONY: msys-base
 msys-base:  $(MSYS_BASE_PACKAGES)
 
@@ -158,8 +162,6 @@
 $(PREFIX)/installed/check-requirements: $(MAKEFILE)
 	@echo '[check requirements]'
 	$(foreach REQUIREMENT,$(REQUIREMENTS),$(call CHECK_REQUIREMENT,$(REQUIREMENT)))
-	$(call CHECK_REQUIREMENT_VERSION,autoconf,2\.6[4-9]\|2\.[7-9][0-9])
-	$(call CHECK_REQUIREMENT_VERSION,automake,1\.[1-9][0-9]\(\.[0-9]\+\)\?)
 	@[ -d '$(PREFIX)/installed' ] || mkdir -p '$(PREFIX)/installed'
 	@touch '$@'
 
@@ -173,10 +175,11 @@
         '$(TOP_DIR)/index.html' \
 )))
 
+include $(patsubst %,$(TOP_DIR)/src/%.mk,$(BUILD_TOOLS))
 include $(patsubst %,$(TOP_DIR)/src/%.mk,$(PKGS))
 
 .PHONY: download
-download: $(addprefix download-,$(PKGS))
+download: $(addprefix download-,$(PKGS)) $(addprefix download-,$(BUILD_TOOLS))
 
 define PKG_RULE
 .PHONY: download-$(1)
@@ -244,6 +247,7 @@
 	touch '$(PREFIX)/installed/$(1)'
 endef
 $(foreach PKG,$(PKGS),$(eval $(call PKG_RULE,$(PKG),$(call TMP_DIR,$(PKG)))))
+$(foreach TOOL,$(BUILD_TOOLS),$(eval $(call PKG_RULE,$(TOOL),$(call TMP_DIR,$(TOOL)))))
 
 .PHONY: clean
 clean:
--- a/index.html	Thu Jan 24 22:00:38 2013 -0500
+++ b/index.html	Tue Feb 05 15:41:22 2013 -0500
@@ -969,6 +969,26 @@
         <td id="boost-website"><a href="http://www.boost.org/">Boost C++ Library</a></td>
     </tr>
     <tr>
+        <td id="build-autoconf-package">autoconf</td>
+        <td id="build-autoconf-version">2.69</td>
+        <td id="build-autoconf-website"><a href="http://www.gnu.org/software/autoconf">autoconf</a></td>
+    </tr>
+    <tr>
+        <td id="build-automake-package">automake</td>
+        <td id="build-automake-version">1.11.6</td>
+        <td id="build-automake-website"><a href="http://www.gnu.org/software/automake">automake</a></td>
+    </tr>
+    <tr>
+        <td id="build-cmake-package">cmake</td>
+        <td id="build-cmake-version">2.8.9</td>
+        <td id="build-cmake-website"><a href="http://www.cmake.org">cmake</a></td>
+    </tr>
+    <tr>
+        <td id="build-libtool-package">libtool</td>
+        <td id="build-libtool-version">2.4.2</td>
+        <td id="build-libtool-website"><a href="http://www.gnu.org/software/libtool">libtool</a></td>
+    </tr>
+    <tr>
         <td id="bzip2-package">bzip2</td>
         <td id="bzip2-version">1.0.6</td>
         <td id="bzip2-website"><a href="http://www.bzip.org/">bzip2</a></td>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/build-autoconf.mk	Tue Feb 05 15:41:22 2013 -0500
@@ -0,0 +1,23 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := build-autoconf
+$(PKG)_IGNORE   :=
+$(PKG)_CHECKSUM := e891c3193029775e83e0534ac0ee0c4c711f6d23
+$(PKG)_SUBDIR   := autoconf-$($(PKG)_VERSION)
+$(PKG)_FILE     := autoconf-$($(PKG)_VERSION).tar.xz
+$(PKG)_URL      := ftp://ftp.gnu.org/pub/gnu/autoconf/$($(PKG)_FILE)
+$(PKG)_DEPS     := 
+
+define $(PKG)_UPDATE
+    echo 'Warning: Updates are temporarily disabled for package $(PKG).' >&2;
+    echo $($(PKG)_VERSION)
+endef
+
+define $(PKG)_BUILD
+    mkdir '$(1).build'
+    cd    '$(1).build' && '$(1)/configure' \
+        --prefix='$(PREFIX)'
+    $(MAKE) -C '$(1).build' -j '$(JOBS)'
+    $(MAKE) -C '$(1).build' -j 1 install
+endef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/build-automake.mk	Tue Feb 05 15:41:22 2013 -0500
@@ -0,0 +1,23 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := build-automake
+$(PKG)_IGNORE   :=
+$(PKG)_CHECKSUM := 29d7832b148e2157e03ad0d3620fbb7f5a13bc21
+$(PKG)_SUBDIR   := automake-$($(PKG)_VERSION)
+$(PKG)_FILE     := automake-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL      := ftp://ftp.gnu.org/pub/gnu/automake/$($(PKG)_FILE)
+$(PKG)_DEPS     := 
+
+define $(PKG)_UPDATE
+    echo 'Warning: Updates are temporarily disabled for package $(PKG).' >&2;
+    echo $($(PKG)_VERSION)
+endef
+
+define $(PKG)_BUILD
+    mkdir '$(1).build'
+    cd    '$(1).build' && '$(1)/configure' \
+        --prefix='$(PREFIX)'
+    $(MAKE) -C '$(1).build' -j '$(JOBS)'
+    $(MAKE) -C '$(1).build' -j 1 install
+endef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/build-cmake.mk	Tue Feb 05 15:41:22 2013 -0500
@@ -0,0 +1,23 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := build-cmake
+$(PKG)_IGNORE   :=
+$(PKG)_CHECKSUM := b96663c0757a5edfbddc410aabf7126a92131e2b
+$(PKG)_SUBDIR   := cmake-$($(PKG)_VERSION)
+$(PKG)_FILE     := cmake-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL      := http://www.cmake.org/files/v2.8/$($(PKG)_FILE)
+$(PKG)_DEPS     := 
+
+define $(PKG)_UPDATE
+    echo 'Warning: Updates are temporarily disabled for package $(PKG).' >&2;
+    echo $($(PKG)_VERSION)
+endef
+
+define $(PKG)_BUILD
+    mkdir '$(1).build'
+    cd    '$(1).build' && '$(1)/configure' \
+        --prefix='$(PREFIX)'
+    $(MAKE) -C '$(1).build' -j '$(JOBS)'
+    $(MAKE) -C '$(1).build' -j 1 install
+endef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/build-libtool.mk	Tue Feb 05 15:41:22 2013 -0500
@@ -0,0 +1,23 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := build-libtool
+$(PKG)_IGNORE   :=
+$(PKG)_CHECKSUM := 22b71a8b5ce3ad86e1094e7285981cae10e6ff88
+$(PKG)_SUBDIR   := libtool-$($(PKG)_VERSION)
+$(PKG)_FILE     := libtool-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL      := ftp://ftp.gnu.org/pub/gnu/libtool/$($(PKG)_FILE)
+$(PKG)_DEPS     := 
+
+define $(PKG)_UPDATE
+    echo 'Warning: Updates are temporarily disabled for package $(PKG).' >&2;
+    echo $($(PKG)_VERSION)
+endef
+
+define $(PKG)_BUILD
+    mkdir '$(1).build'
+    cd    '$(1).build' && '$(1)/configure' \
+        --prefix='$(PREFIX)'
+    $(MAKE) -C '$(1).build' -j '$(JOBS)'
+    $(MAKE) -C '$(1).build' -j 1 install
+endef