Bug 1264129 - Use sed to update configure from configure.in, instead of autoconf. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 08 Apr 2016 09:03:25 +0900
changeset 330813 862f44c0c10c2828616af4856871c1772dfc4975
parent 330812 4d1ff5526e6f4f1760bbc8b94441c07ad4cc84ad
child 330814 8246956e2368cc19f4b731ca3a2daca57bcb27f1
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1264129
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1264129 - Use sed to update configure from configure.in, instead of autoconf. r=gps The configure.in is a small wrapper around python configure, that is still a m4 script so that people running autoconf manually can still do so without breaking their stuff (and we have jobs that do that on automation as well). But considering how simple the m4 is, to avoid having the autoconf checking code twice (once in client.mk and once in build/moz.configure/old.configure), we can just process it with sed instead of autoconf.
client.mk
--- a/client.mk
+++ b/client.mk
@@ -60,29 +60,16 @@ endif
 ifndef TOPSRCDIR
 ifeq (,$(wildcard client.mk))
 TOPSRCDIR := $(patsubst %/,%,$(dir $(MAKEFILE_LIST)))
 else
 TOPSRCDIR := $(CWD)
 endif
 endif
 
-# try to find autoconf 2.13 - discard errors from 'which'
-# MacOS X 10.4 sends "no autoconf*" errors to stdout, discard those via grep
-AUTOCONF ?= $(shell which autoconf-2.13 autoconf2.13 autoconf213 2>/dev/null | grep -v '^no autoconf' | head -1)
-
-# See if the autoconf package was installed through fink
-ifeq (,$(strip $(AUTOCONF)))
-AUTOCONF = $(shell which fink >/dev/null 2>&1 && echo `which fink`/../../lib/autoconf2.13/bin/autoconf)
-endif
-
-ifeq (,$(strip $(AUTOCONF)))
-AUTOCONF=$(error Could not find autoconf 2.13)
-endif
-
 SH := /bin/sh
 PERL ?= perl
 PYTHON ?= $(shell which python2.7 > /dev/null 2>&1 && echo python2.7 || echo python)
 
 CONFIG_GUESS_SCRIPT := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess)
 ifdef CONFIG_GUESS_SCRIPT
   CONFIG_GUESS := $(shell $(CONFIG_GUESS_SCRIPT))
 endif
@@ -314,18 +301,18 @@ EXTRA_CONFIG_DEPS := \
   $(TOPSRCDIR)/aclocal.m4 \
   $(TOPSRCDIR)/old-configure.in \
   $(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \
   $(TOPSRCDIR)/js/src/aclocal.m4 \
   $(TOPSRCDIR)/js/src/old-configure.in \
   $(NULL)
 
 $(CONFIGURES): %: %.in $(EXTRA_CONFIG_DEPS)
-	@echo Generating $@ using autoconf
-	cd $(@D); $(AUTOCONF)
+	@echo Generating $@
+	sed '1,/^divert/d' $< > $@
 
 CONFIG_STATUS_DEPS := \
   $(wildcard $(TOPSRCDIR)/*/confvars.sh) \
   $(CONFIGURES) \
   $(TOPSRCDIR)/CLOBBER \
   $(TOPSRCDIR)/nsprpub/configure \
   $(TOPSRCDIR)/config/milestone.txt \
   $(TOPSRCDIR)/browser/config/version.txt \