NetBSD-Bugs archive

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

bin/43821: make: longstanding bug with loop variables

>Number:         43821
>Category:       bin
>Synopsis:       make: oldstanding bug with loop variables
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 31 12:20:00 +0000 2010
>Originator:     Aleksey Cheusov
>Release:        Linux 2.6.18-194.el5xen
<organization of PR author (multiple lines)>
System: Linux 2.6.18-194.el5xen #1 SMP Fri Apr 2 
16:16:54 EDT 2010 i686 i686 i386 GNU/Linux
Architecture: i686


    .for i in 1 2
    .if empty(i:M2)

            @echo ${res}

With Makefile shown above bmake works like this

    0 cheusov>nbmake -f ~/tmp/
    nbmake: "/home/cheusov/tmp/" line 2: Malformed conditional (empty(i:M2))
    nbmake: "/home/cheusov/tmp/" line 2: Malformed conditional (empty(i:M2))
    nbmake: Fatal errors encountered -- cannot continue

    nbmake: stopped in /home/cheusov
    1 cheusov>

At the same time 

    .for i in 1 2
    .if empty(j:M2)

            @echo ${res}

works normally.

    0 cheusov>nbmake -f ~/tmp/
    0 cheusov>

As far as I understand this bug is very old. In
we can see

    # for obscure reasons, we can't do a simple .if ${dir} == ".WAIT"
    # but have to assign to __TARGDIR first.
    .for targ in ${TARGETS}
    .for dir in ${__REALSUBDIR}
    __TARGDIR := ${dir}
    .if ${__TARGDIR} == ".WAIT"

but I cannot find any explanation in bmake.1.
So, I assume this is a bug and hope it can be fixed.


Home | Main Index | Thread Index | Old Index