]> code.delx.au - gnu-emacs/blobdiff - GNUmakefile
Fix epg-related compilation warnings in mml-sec
[gnu-emacs] / GNUmakefile
index a2a630ba9d573c6e3f39d2a4f281bda90521ec69..e6941b03b30912f07ec1b9cdac1e8d63f4f1d0a1 100644 (file)
@@ -1,6 +1,6 @@
 # Build Emacs from a fresh tarball or version-control checkout.
 
-# Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# Copyright (C) 2011-2016 Free Software Foundation, Inc.
 #
 # This file is part of GNU Emacs.
 #
 # run "configure" by hand.  But run autogen.sh first, if the source
 # was checked out directly from the repository.
 
-ifneq ($(MSYSTEM),)
-CFG = CONFIG_SITE=$(CURDIR)/nt/mingw-cfg.site
-else
-CFG =
-endif
-
 # If a Makefile already exists, just use it.
 
 ifeq ($(wildcard Makefile),Makefile)
@@ -61,22 +55,33 @@ 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/copy_autogen ...'
-       ./autogen.sh || autogen/copy_autogen
+       @echo >&2 Running ./autogen.sh $(ALL_IF_GIT) ...
+       ./autogen.sh $(ALL_IF_GIT)
        @echo >&2 '"configure" file built.'
 
 Makefile: configure
        @echo >&2 'There seems to be no Makefile in this directory.'
        @echo >&2 'Running ./configure ...'
-       $(CFG) ./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