> There was a bug fixed with if in 3.79.  Please try the latest version
> and re-report if it still fails.  Thanks.

Okay, 3.79 appears to have fixed that bug.  Both reported variations of
makefile core-dumps now work fine.

It seems to have fixed the $(if $(strip ...)) bug [which I hadn't yet
reported] too.

I can not seem to recreate the $(if $(filter ...) ...) incorrect filtering
right now, so can not confirm or deny that.  [ but since I can't recreate
it, I can't report it as a bug either, so let's assume it's gone too :) ].

Jonathan

original mail follows (though is now unnecessary):


To: [EMAIL PROTECTED]
Subject: gmake 3.78.1 and (if) problems
Reply-to: [EMAIL PROTECTED]
X-url: http://www.gordian.com/~jonboy/
Date: Mon, 22 May 2000 19:45:52 -0700
From: Jonathan Walton <[EMAIL PROTECTED]>

There seems to be some unreliability in parsing $(if ...)
Here's a bug where I have an extra parenthesis after my $(if ...), and it
causes a coredump [on BSD, Linux, and SGI compiles of gmake-3.78.1]

I've also seen $(if $(filter ...) ...) incorrectly filter, and $(if $(strip
...)) coredump, even when parentheses _are_ properly balanced, [but I'm
having problems recreate those right now].

I include two makefiles which fail below, since one of them only fails when
the target file doesn't exist, and the other one fails in both cases.  Odd.

Jonathan

> rm foo
        rm: foo: No such file or directory
> gmake -f Makefile2 foo
        Bus error (core dumped)
> gmake -f Makefile3 foo
        Bus error (core dumped)

> touch foo
> gmake -f Makefile2 foo
        echo foo
        foo
        false)
        Syntax error: ")" unexpected
        gmake: *** [foo] Error 2
> gmake -f Makefile3 foo
        Bus error (core dumped)

> gmake --version
        GNU Make version 3.78.1, by Richard Stallman and Roland McGrath.
        Built for i386--freebsd2.2.6
        Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
                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.

        Report bugs to <[EMAIL PROTECTED]>.

> cat Makefile2
        #!gmake

        USESUBFILES = $(wildcard */$1)

        DOCOPYFILE = $(if $(call USESUBFILES, $1), false, true))

        foo: force
                echo $@
                $(call DOCOPYFILE,$@)

        force: ;

> cat Makefile3
        #!gmake

        USESUBFILES = $(wildcard */$1)

        foo: force
                echo $@
                $(if $(call USESUBFILES, asdf), false, true))

        force: ;

Reply via email to