NetBSD-Bugs archive

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

bin/43502: make failes to stip suffix if target is phony

>Number:         43502
>Category:       bin
>Synopsis:       make failes to stip suffix if target is phony
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 24 10:15:00 +0000 2010
>Originator:     Wolfgang Stukenbrock
>Release:        NetBSD 4.0
Dr. Nagler & Company GmbH
System: NetBSD test-s0 4.0 NetBSD 4.0 (NSW-WS) #2: Fri Nov 6 11:14:49 CET 2009 
Architecture: x86_64
Machine: amd64
        The following makefile fails to do the rigth thing - at least from my 
understanding of make.

--- start of makefile
.SUFFIXES: .tg .ttg

.PHONY: t2.ttg t4.ttg

all: t1.ttg t2.ttg t3.ttg

        @echo "@ |$@|"
        @echo "* |$*|"
        @echo "@ |$@|"
        @echo "* |$*|"
        @echo "@ |$@|"
        @echo "* |$*|"

tst: t5.ttg t4.ttg

--- end of makefile
        The problem seems to be, that if a target is marked PHONY the suffix 
detection stuff in make does not work
        Running "make all" reports the makro '$*' correctly for t1 and t3 but 
it is empty for t2.
        Running "make tst" will build t5 correctly but fails to build t4. The 
suffix rule ".tg.ttg:" is not found.
        try to run the makefile above.
        $* is not setup correctly for t3 and it will fail to build t4
        not analysed up to now
        workaround: do not add the targets to the PHONY list


Home | Main Index | Thread Index | Old Index