X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/ba3189039adc8ec5eba5ed3e21d42019a4616b7c..93c3363523be0df353ddd9653494bec8dc57fd8c:/GNUmakefile diff --git a/GNUmakefile b/GNUmakefile index 22c57f5cb5..e6941b03b3 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,6 @@ # Build Emacs from a fresh tarball or version-control checkout. -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2016 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -55,15 +55,20 @@ else # Once 'configure' exists, run it. # Finally, run the actual 'make'. -default $(filter-out configure Makefile,$(MAKECMDGOALS)): Makefile +ORDINARY_GOALS = $(filter-out configure Makefile bootstrap,$(MAKECMDGOALS)) + +default $(ORDINARY_GOALS): Makefile $(MAKE) -f Makefile $(MAKECMDGOALS) # Execute in sequence, so that multiple user goals don't conflict. .NOTPARALLEL: +# 'all' if a .git subdirectory is present, empty otherwise. +ALL_IF_GIT = $(subst .git,all,$(wildcard .git)) + configure: @echo >&2 'There seems to be no "configure" file in this directory.' - @echo >&2 'Running ./autogen.sh ...' - ./autogen.sh + @echo >&2 Running ./autogen.sh $(ALL_IF_GIT) ... + ./autogen.sh $(ALL_IF_GIT) @echo >&2 '"configure" file built.' Makefile: configure @@ -72,5 +77,11 @@ Makefile: configure ./configure @echo >&2 'Makefile built.' +# 'make bootstrap' in a fresh checkout needn't run 'configure' twice. +bootstrap: Makefile + $(MAKE) -f Makefile all + +.PHONY: bootstrap default $(ORDINARY_GOALS) + endif endif