From mboxrd@z Thu Jan 1 00:00:00 1970 From: Craig Burley To: g77-alpha@gnu.org, egcs@cygnus.com, gcc2@cygnus.com Subject: Re: Require GNU Make Somehow? Date: Mon, 04 May 1998 12:46:00 -0000 Message-id: <199805041624.MAA29687@melange.gnu.org> References: <87af8zc6r0.fsf@eng.ascend.com> X-SW-Source: 1998-05/msg00091.html >This isn't quite the same, since GNU make isn't required to >build the fileutils, but it might be useful... Thanks! We're going to try a simple solution in the next g77 0.5.23 alpha release, which is a release that will be based on gcc 2.8: # We want to try to catch the common trap of building outside srcdir # without GNU make. We do that by adding a phony target to the # all the LANGUAGES dependencies, and doing the check in the phony target. $(LANGUAGES): gnumake-check gnumake-check: @if [ $(srcdir) != . ]; then \ case `$(MAKE) --version 2>/dev/null` in \ *GNU*) true ;; \ *) echo 1>&2 ''; \ echo 1>&2 'You must use GNU make to build outside the source directory.'; \ echo 1>&2 ''; \ false;; \ esac; \ else true; \ fi (This goes into g77's Make-lang.in, a fragment that gets pulled into the "master" Makefile for gcc when configuring with g77 present. $(LANGUAGES) is the list of languages the user wants to build; I'd thought about making this just "F77 f77" to catch the problem only when g77 itself gets built, but then realized that happens well into a build, so this approach, which Dave Love came up with, seems best, because it kicks back on error quite quickly after issuing the non-GNU `make' command.) tq vm, (burley)