From 148931b4aed129a02b3a333bf7d9bedbae6c131d Mon Sep 17 00:00:00 2001 From: Volker Grabsch Date: Mon, 28 Nov 2011 09:51:56 +0100 Subject: replaced $(BUILD) with a more direct and less brittle construct For discussion, see the following email and its follow-ups: http://lists.nongnu.org/archive/html/mingw-cross-env-list/2011-11/msg00112.html --- Makefile | 1 - src/agg.mk | 2 +- src/binutils.mk | 1 - src/curl.mk | 2 +- src/devil.mk | 2 +- src/exiv2.mk | 2 +- src/fltk.mk | 2 +- src/fontconfig.mk | 2 +- src/freetds.mk | 2 +- src/gcc.mk | 2 +- src/gdk-pixbuf.mk | 2 +- src/glib.mk | 2 +- src/glibmm.mk | 2 +- src/gsl.mk | 2 +- src/gsoap.mk | 2 +- src/gtkglext.mk | 2 +- src/gtkmm2.mk | 2 +- src/gtksourceviewmm2.mk | 2 +- src/guile.mk | 2 +- src/ilmbase.mk | 2 +- src/imagemagick.mk | 2 +- src/lame.mk | 2 +- src/lcms.mk | 2 +- src/lcms1.mk | 2 +- src/libgcrypt.mk | 2 +- src/libgomp.mk | 2 +- src/libgpg_error.mk | 2 +- src/libgsasl.mk | 2 +- src/libidn.mk | 2 +- src/libntlm.mk | 2 +- src/libsamplerate.mk | 2 +- src/libsigc++.mk | 2 +- src/ogg.mk | 2 +- src/openexr.mk | 2 +- src/pangomm.mk | 2 +- src/pcre.mk | 2 +- src/theora.mk | 2 +- src/wxwidgets.mk | 4 ++-- src/xvidcore.mk | 2 +- 39 files changed, 38 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index 7cabda1..2d9b5f1 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,6 @@ MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) TOP_DIR := $(patsubst %/,%,$(dir $(MAKEFILE))) PATH := $(PREFIX)/bin:$(PATH) SHELL := bash -BUILD := $(shell config.guess 2>/dev/null) 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 diff --git a/src/agg.mk b/src/agg.mk index b5ed094..dceb67a 100644 --- a/src/agg.mk +++ b/src/agg.mk @@ -22,7 +22,7 @@ define $(PKG)_BUILD $(SED) -i 's,libtoolize,$(LIBTOOLIZE),' '$(1)/autogen.sh' cd '$(1)' && $(SHELL) ./autogen.sh \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --without-x diff --git a/src/binutils.mk b/src/binutils.mk index d675cb2..3c5d737 100644 --- a/src/binutils.mk +++ b/src/binutils.mk @@ -26,7 +26,6 @@ define $(PKG)_BUILD $(INSTALL) -m755 '$(1)/config.guess' '$(PREFIX)/bin/' $(INSTALL) -m755 '$(1)/config.sub' '$(PREFIX)/bin/' - # Cannot use BUILD which was defined before config.guess existed. cd '$(1)' && ./configure \ --target='$(TARGET)' \ --build="`config.guess`" \ diff --git a/src/curl.mk b/src/curl.mk index 2089606..8a8a26b 100644 --- a/src/curl.mk +++ b/src/curl.mk @@ -22,7 +22,7 @@ define $(PKG)_BUILD cd '$(1)' && ./buildconf cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --with-gnutls \ diff --git a/src/devil.mk b/src/devil.mk index 4f9d83e..4d5761c 100644 --- a/src/devil.mk +++ b/src/devil.mk @@ -23,7 +23,7 @@ define $(PKG)_BUILD $(SED) -i 's,__declspec(dllimport),,' '$(1)/include/IL/il.h' cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --enable-ILU \ diff --git a/src/exiv2.mk b/src/exiv2.mk index 654a4da..f0bdd3f 100644 --- a/src/exiv2.mk +++ b/src/exiv2.mk @@ -22,7 +22,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-visibility \ diff --git a/src/fltk.mk b/src/fltk.mk index 28741bb..e44bf06 100644 --- a/src/fltk.mk +++ b/src/fltk.mk @@ -24,7 +24,7 @@ define $(PKG)_BUILD $(SED) -i 's,\$$uname,MINGW,g' '$(1)/configure' cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --enable-threads \ diff --git a/src/fontconfig.mk b/src/fontconfig.mk index ba7a71f..911e1dd 100644 --- a/src/fontconfig.mk +++ b/src/fontconfig.mk @@ -25,7 +25,7 @@ define $(PKG)_BUILD $(SED) -i 's,^\(Libs:.*\),\1 @EXPAT_LIBS@ @FREETYPE_LIBS@,' '$(1)/fontconfig.pc.in' cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --with-arch='$(TARGET)' \ diff --git a/src/freetds.mk b/src/freetds.mk index 27216d1..80500bf 100644 --- a/src/freetds.mk +++ b/src/freetds.mk @@ -28,7 +28,7 @@ define $(PKG)_BUILD cd '$(1)' && ./configure \ --prefix='$(PREFIX)/$(TARGET)' \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-rpath \ --disable-dependency-tracking \ --disable-shared \ diff --git a/src/gcc.mk b/src/gcc.mk index 449243a..920fc49 100644 --- a/src/gcc.mk +++ b/src/gcc.mk @@ -33,7 +33,7 @@ define $(PKG)_BUILD mkdir '$(1).build' cd '$(1).build' && '$(1)/configure' \ --target='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --prefix='$(PREFIX)' \ --libdir='$(PREFIX)/lib' \ --enable-languages='c,c++,objc,fortran' \ diff --git a/src/gdk-pixbuf.mk b/src/gdk-pixbuf.mk index 8e5d5a6..880fdc3 100644 --- a/src/gdk-pixbuf.mk +++ b/src/gdk-pixbuf.mk @@ -23,7 +23,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-modules \ diff --git a/src/glib.mk b/src/glib.mk index f598af8..d3aa6aa 100644 --- a/src/glib.mk +++ b/src/glib.mk @@ -55,7 +55,7 @@ define $(PKG)_BUILD # cross build cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --with-threads=win32 \ diff --git a/src/glibmm.mk b/src/glibmm.mk index 6362c5d..32d35b7 100644 --- a/src/glibmm.mk +++ b/src/glibmm.mk @@ -22,7 +22,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ CXX='$(TARGET)-c++' \ diff --git a/src/gsl.mk b/src/gsl.mk index 2dac966..41d3a01 100644 --- a/src/gsl.mk +++ b/src/gsl.mk @@ -22,7 +22,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-shared \ --enable-static diff --git a/src/gsoap.mk b/src/gsoap.mk index e3f550c..1f234fe 100644 --- a/src/gsoap.mk +++ b/src/gsoap.mk @@ -40,7 +40,7 @@ define $(PKG)_BUILD cd '$(1)' && ac_cv_func_malloc_0_nonnull=yes ./configure \ --prefix='$(PREFIX)/$(TARGET)' \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --enable-gnutls \ CPPFLAGS='-DWITH_NTLM' diff --git a/src/gtkglext.mk b/src/gtkglext.mk index 8540c15..d598612 100644 --- a/src/gtkglext.mk +++ b/src/gtkglext.mk @@ -24,7 +24,7 @@ define $(PKG)_BUILD cd '$(1)' && autoconf cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-shared \ --without-x \ diff --git a/src/gtkmm2.mk b/src/gtkmm2.mk index 205c3a4..5dee5b3 100644 --- a/src/gtkmm2.mk +++ b/src/gtkmm2.mk @@ -24,7 +24,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ MAKE=$(MAKE) diff --git a/src/gtksourceviewmm2.mk b/src/gtksourceviewmm2.mk index 8d14c5a..00b3b23 100644 --- a/src/gtksourceviewmm2.mk +++ b/src/gtksourceviewmm2.mk @@ -24,7 +24,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-shared \ MAKE=$(MAKE) diff --git a/src/guile.mk b/src/guile.mk index f5d9950..cbf621f 100644 --- a/src/guile.mk +++ b/src/guile.mk @@ -25,7 +25,7 @@ define $(PKG)_BUILD # which would fail because we tell Guile not to use Pthreads. cd '$(1)' && CC_FOR_BUILD=gcc ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-shared \ --without-threads \ diff --git a/src/ilmbase.mk b/src/ilmbase.mk index 9d698e5..6da520f 100644 --- a/src/ilmbase.mk +++ b/src/ilmbase.mk @@ -29,7 +29,7 @@ define $(PKG)_BUILD # threading. It will just disable the unwanted check for pthread. cd '$(1)' && $(SHELL) ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-threading \ diff --git a/src/imagemagick.mk b/src/imagemagick.mk index b224bc1..f5f126d 100644 --- a/src/imagemagick.mk +++ b/src/imagemagick.mk @@ -21,7 +21,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-shared \ --with-x=no \ diff --git a/src/lame.mk b/src/lame.mk index 2a70e14..6d488e5 100644 --- a/src/lame.mk +++ b/src/lame.mk @@ -21,7 +21,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-shared $(MAKE) -C '$(1)' -j '$(JOBS)' diff --git a/src/lcms.mk b/src/lcms.mk index 7503c11..0077106 100644 --- a/src/lcms.mk +++ b/src/lcms.mk @@ -22,7 +22,7 @@ define $(PKG)_BUILD cd '$(1)' && ./configure \ --prefix='$(PREFIX)/$(TARGET)' \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --with-jpeg \ --with-tiff \ diff --git a/src/lcms1.mk b/src/lcms1.mk index 5edd5e8..b3cbeeb 100644 --- a/src/lcms1.mk +++ b/src/lcms1.mk @@ -23,7 +23,7 @@ define $(PKG)_BUILD cd '$(1)' && ./configure \ --prefix='$(PREFIX)/$(TARGET)' \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --with-jpeg \ --with-tiff \ diff --git a/src/libgcrypt.mk b/src/libgcrypt.mk index 95644ff..72f358f 100644 --- a/src/libgcrypt.mk +++ b/src/libgcrypt.mk @@ -22,7 +22,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --with-gpg-error-prefix='$(PREFIX)/$(TARGET)' diff --git a/src/libgomp.mk b/src/libgomp.mk index 19aa137..fc566a6 100644 --- a/src/libgomp.mk +++ b/src/libgomp.mk @@ -21,7 +21,7 @@ define $(PKG)_BUILD mkdir -p '$(1)/build/$(TARGET)/libgomp' cd '$(1)/build/$(TARGET)/libgomp' && '$(1)/libgomp/configure' \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --target='$(TARGET)' \ --prefix='$(PREFIX)' \ --enable-version-specific-runtime-libs \ diff --git a/src/libgpg_error.mk b/src/libgpg_error.mk index 76f1775..c8b745e 100644 --- a/src/libgpg_error.mk +++ b/src/libgpg_error.mk @@ -21,7 +21,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-nls \ diff --git a/src/libgsasl.mk b/src/libgsasl.mk index d24b004..c14f021 100644 --- a/src/libgsasl.mk +++ b/src/libgsasl.mk @@ -22,7 +22,7 @@ endef define $(PKG)_BUILD cd '$(1)' && touch src/libgsasl-7.def && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-nls \ diff --git a/src/libidn.mk b/src/libidn.mk index ca9ed56..62e836c 100644 --- a/src/libidn.mk +++ b/src/libidn.mk @@ -22,7 +22,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --disable-csharp \ --prefix='$(PREFIX)/$(TARGET)' \ diff --git a/src/libntlm.mk b/src/libntlm.mk index ff0ff77..7bebf64 100644 --- a/src/libntlm.mk +++ b/src/libntlm.mk @@ -22,7 +22,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= diff --git a/src/libsamplerate.mk b/src/libsamplerate.mk index 9aa67ea..52e8370 100644 --- a/src/libsamplerate.mk +++ b/src/libsamplerate.mk @@ -23,7 +23,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= diff --git a/src/libsigc++.mk b/src/libsigc++.mk index 88d2263..4046fe5 100644 --- a/src/libsigc++.mk +++ b/src/libsigc++.mk @@ -22,7 +22,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ CXX='$(TARGET)-c++' \ diff --git a/src/ogg.mk b/src/ogg.mk index a2de998..3693624 100644 --- a/src/ogg.mk +++ b/src/ogg.mk @@ -21,7 +21,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= diff --git a/src/openexr.mk b/src/openexr.mk index 91e3cc7..f0d81f0 100644 --- a/src/openexr.mk +++ b/src/openexr.mk @@ -34,7 +34,7 @@ define $(PKG)_BUILD bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-threading \ diff --git a/src/pangomm.mk b/src/pangomm.mk index ba762b8..919c707 100644 --- a/src/pangomm.mk +++ b/src/pangomm.mk @@ -22,7 +22,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ MAKE=$(MAKE) diff --git a/src/pcre.mk b/src/pcre.mk index 8ae72d2..9218ec6 100644 --- a/src/pcre.mk +++ b/src/pcre.mk @@ -23,7 +23,7 @@ define $(PKG)_BUILD $(SED) -i 's,__declspec(dllimport),,' '$(1)/pcreposix.h' cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --enable-utf8 \ diff --git a/src/theora.mk b/src/theora.mk index f40eeca..5e80794 100644 --- a/src/theora.mk +++ b/src/theora.mk @@ -21,7 +21,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= doc_DATA= diff --git a/src/wxwidgets.mk b/src/wxwidgets.mk index bdb1103..40fae65 100644 --- a/src/wxwidgets.mk +++ b/src/wxwidgets.mk @@ -23,7 +23,7 @@ define $(PKG)_BUILD $(SED) -i 's,wx_cv_cflags_mthread=yes,wx_cv_cflags_mthread=no,' '$(1)/configure' cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --enable-compat24 \ @@ -71,7 +71,7 @@ define $(PKG)_BUILD $(SED) -i 's,wx_cv_cflags_mthread=yes,wx_cv_cflags_mthread=no,' '$(1)/$(wxwidgets_SUBDIR)/configure' cd '$(1)/$(wxwidgets_SUBDIR)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --enable-compat24 \ diff --git a/src/xvidcore.mk b/src/xvidcore.mk index f338d8b..b5d181b 100644 --- a/src/xvidcore.mk +++ b/src/xvidcore.mk @@ -22,7 +22,7 @@ define $(PKG)_BUILD cd '$(1)' && autoconf cd '$(1)' && ./configure \ --host='$(TARGET)' \ - --build='$(BUILD)' \ + --build="`config.guess`" \ --prefix='$(PREFIX)/$(TARGET)' $(MAKE) -C '$(1)' -j '$(JOBS)' BUILD_DIR='build' SHARED_LIB= $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' -- cgit v0.12