Bug 1264129 - Use sed to update configure from configure.in, instead of autoconf. r?gps draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 08 Apr 2016 09:03:25 +0900
changeset 350198 eb4c521053e4bf49cb09ce216d4a2493199bcbc9
parent 350197 be08e261b37814969b7279241ce5dc6b8a5c217b
child 350223 eb8368c2b6663f5ef206b433b43f0071af982637
push id15266
push userbmo:mh+mozilla@glandium.org
push dateTue, 12 Apr 2016 23:21:51 +0000
reviewersgps
bugs1264129
milestone48.0a1
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 \