Edit

kc3-lang/automake/GNUmakefile

Branch :

  • Show log

    Commit

  • Author : Stefano Lattarini
    Date : 2012-02-16 19:52:37
    Hash : 86e9e0e3
    Message : 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.

  • GNUmakefile
  • # Maintainer makefile for Automake.  Requires GNU make.
    
    # Copyright (C) 2012 Free Software Foundation, Inc.
    #
    # This program is free software; you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation; either version 2, or (at your option)
    # any later version.
    #
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    # 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