Hello,

On Wednesday 28 January 2009 18:56, Ian Lynagh wrote:
> ...
> We can put something like this in Makefiles:
> 
> ifeq "$(MAKE_VERSION)" "3.80"
> $(error GNU make 3.80 has bugs that make it unable to build GHC. Please 
upgrade to 3.81 or higher.)
> endif
> 
> (Thorkil, do you still have 3.80 installed anywhere? If so, can you
> check if that works properly please? I'm not sure if MAKE_VERSION will
> be 3.80 or 3.8. Just put those 3 lines in an empty Makefile, run "make",
> and see if it fails with that error message)

Your proposed test works:

> t...@linux:~/tn/test/make> make --version
> GNU Make 3.80
> Copyright (C) 2002  Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> t...@linux:~/tn/test/make> cat Makefile
> ifeq "$(MAKE_VERSION)" "3.80"
> $(error GNU make 3.80 has bugs that make it unable to build GHC. Please 
upgrade to 3.81 or higher.)
> endif
> t...@linux:~/tn/test/make> make
> Makefile:2: *** GNU make 3.80 has bugs that make it unable to build GHC. 
Please upgrade to 3.81 or higher..  Stop.
> t...@linux:~/tn/test/make>


> 
> However, we can't put that in any Makefile that exhibits the bug, or
> you'll just get the "missing `endif'" error instead. Putting it in only
> the top-level Makefile for GHC and the testsuite might be enough.
> 
> Alternatively, we could look into whether we can work around the bugs in
> 3.80.

I looked more closely and the make problem seems to be 
http://savannah.gnu.org/bugs/index.php?1516:

> bug #1516: $(eval ...) inside conditionals causes errors
>
> Submitted by:         Paul D. Smith <psmith>
> Submitted on:         Fri 25 Oct 2002 08:43:18 PM UTC
>
> Severity:     3 - Normal      Item Group:     Bug
> Status:       Fixed   Privacy:        Public
> Assigned to:  Paul D. Smith <psmith>  Open/Closed:    Closed
> Component Version:    3.80    Operating System:       None
> Fixed Release:        3.81
> (+) Post a Comment
> (-) Discussion
> Mon 27 Jan 2003 05:58:48 PM UTC, comment #2:
> Until this patch is in official release, you can put the code inside the if 
into a separate file and use include to workaround this bug...
> Anonymous
> Fri 25 Oct 2002 09:21:42 PM UTC, comment #1:
> Need to install a new set of conditionals inside the eval. This means that, 
just like include, you cannot open a conditional but not close it within an 
$(eval ...) call.
> Patch included.
> Paul D. Smith <psmith>
>
> Fri 25 Oct 2002 08:43:18 PM UTC, original submission:
> Using $(eval ...) inside a conditional (that is parsed) will cause an error 
like this:
> Makefile:10: *** missing `endif'. Stop.

The proposed workaround seems rather inconvenient.

> ...

Best regards
Thorkil

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to