diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-02-16 19:52:37 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-02-16 19:52:58 +0100 |
commit | 86e9e0e331e5008ab5ca9db77d74c542042dcfe8 (patch) | |
tree | 410298de3384131b636b3ab830cd6d137ea1c58e /GNUmakefile | |
parent | 0699a84a6f7a085acb76446caa81ce3133dedaf2 (diff) | |
download | automake-86e9e0e331e5008ab5ca9db77d74c542042dcfe8.tar.gz |
build: clearer diagnostic if "make" is invoked before "./configure"
Since a GNUmakefile wrapper has been introduced in our build
system, a "make" invocation issued before a "./configure" one
has caused GNU make to die with the cryptic message:
GNUmakefile:18: Makefile: No such file or directory
GNUmakefile:19: /syntax-checks.mk: No such file or directory
make: *** No rule to make target `/syntax-checks.mk'. Stop.
* GNUmakefile: Detect when we are being run from an unconfigured
tree, and give helpful diagnostic.
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile index 134e74323..9d83dbaa3 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -15,5 +15,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -include ./Makefile -include $(srcdir)/syntax-checks.mk +# If the user runs GNU make but has not yet run ./configure, +# give them an helpful diagnostic instead of a cryptic error. +am--Makefile := $(wildcard Makefile) +ifeq ($(am--Makefile),) + $(warning There seems to be no Makefile in this directory.) + $(warning You must run ./configure before running 'make'.) + $(error Fatal Error) +else + include ./Makefile + include $(srcdir)/syntax-checks.mk +endif |