X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/427c285b5782e1c1c581be01e085a77343bb2c79..refs/heads/wip:/GNUmakefile diff --git a/GNUmakefile b/GNUmakefile index 5fd329c78e..b4b33f4dbb 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,6 @@ # Build Emacs from a fresh tarball or version-control checkout. -# Copyright 2011 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -32,7 +32,6 @@ # run "configure" by hand. But run autogen.sh first, if the source # was checked out directly from the repository. - # If a Makefile already exists, just use it. ifeq ($(wildcard Makefile),Makefile) @@ -56,15 +55,17 @@ 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: configure: @echo >&2 'There seems to be no "configure" file in this directory.' - @echo >&2 'Running ./autogen.sh || autogen/copy_autogen ...' - ./autogen.sh || autogen/copy_autogen + @echo >&2 'Running ./autogen.sh ...' + ./autogen.sh @echo >&2 '"configure" file built.' Makefile: configure @@ -73,5 +74,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