[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding second route through rules

From: Steven Simpson
Subject: Re: Finding second route through rules
Date: Mon, 13 Jun 2016 15:22:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

Hi again!

On 01/02/16 21:29, Luke Shumaker wrote:
Here is an "improved" makefile that I think demonstrates the situation
more clearly.

                @echo $@ from $<
                @echo $@ from $<
        %.correct: %.correct_src
                @echo $@ from $<
        %.mislead: %.mislead_src
                @echo $@ from $<
                @echo touch $@
        # Note that there is no rule to make a.mislead_src
        # If the misleading_target line is commented out, 'default' succeeds:
        # > a.correct from correct_src
        # > from a.correct
        # If the line isn't commented out, 'default' fails:
        # > make: *** No rule to make target 'a.mislead', needed by ''.  
        misleading_target: a.mislead

I had to work through this several times to convince myself that this
wasn't a simple misunderstanding of trying to apply ≤3.81 pattern
rules in a post-3.82 world.
Without looking at the source, this feels a lot like the
.DELETE_ON_ERROR: bug that was in either 3.81 or 3.82 (I can't
recall which).

A little more info which might be pertinent... In moving to a newer Kubuntu (14.04 to 16.04), I've implicitly switched from GNU Make 3.81 to 4.1. Having hit what is likely the same problem, I had to try out some other versions. Both the code I'm working on now and Luke's test above manifest a problem in 3.82, 4.1 and 4.2.1, but not in 3.81.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]