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
>Organization:
Dr. Nagler & Company GmbH
        
>Environment:
        
        
System: NetBSD test-s0 4.0 NetBSD 4.0 (NSW-WS) #2: Fri Nov 6 11:14:49 CET 2009 
wgstuken@s012:/export/NetBSD-4.0/N+C-build/.OBJDIR_amd64/export/NetBSD-4.0/src/sys/arch/amd64/compile/NSW-WS
 amd64
Architecture: x86_64
Machine: amd64
>Description:
        The following makefile fails to do the rigth thing - at least from my 
understanding of make.

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

.PHONY: t1.tg t2.tg t3.tg t4.tg t5.tg t2.ttg t4.ttg

all: t1.ttg t2.ttg t3.ttg

.tg.ttg:
        @echo "@ |$@|"
        @echo "* |$*|"

t1.ttg:t1.tg
        @echo "@ |$@|"
        @echo "* |$*|"

t2.ttg:t2.tg
        @echo "@ |$@|"
        @echo "* |$*|"

t1.tg:

t2.tg:

t3.tg:

t4.tg:

t5.tg:

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
        anymore.
        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.
>How-To-Repeat:
        try to run the makefile above.
        $* is not setup correctly for t3 and it will fail to build t4
>Fix:
        not analysed up to now
        workaround: do not add the targets to the PHONY list

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index